Step-by-Step Guide to Building Your Own Realistic AI Image Generation Website with Stable Diffusion
This step‑by‑step tutorial shows how to set up a Stable Diffusion web UI, install the required Python environment and GPU‑enabled PyTorch, add Chinese localization and optional LoRA or Deforum extensions, generate realistic human images, create animated videos, and add speech with D‑ID, all ready for deployment on your own AI website.
This article introduces how to quickly set up a functional AI website that can generate realistic human images using Stable Diffusion. It provides a complete tutorial covering environment preparation, model and plugin acquisition, and deployment steps.
1. Environment Setup
Install Python 3.10.6 (or create a conda environment):
conda create -n novelai python==3.10.6
Clone the stable-diffusion-webui repository:
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui
Install the appropriate GPU version of PyTorch (copy the command from pytorch.org ).
Activate the newly created environment and install PyTorch:
./python -m pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu116
Install project dependencies:
python -m pip install -r requirements.txt
2. Model Download
Download a suitable Stable Diffusion model (e.g., ChilloutMix ) from Civitai (the “C site”) and place the model file into models/Stable-diffusion .
3. Chinese Localization Plugin
Clone the Chinese localization plugin:
git clone https://github.com/dtlnor/stable-diffusion-webui-localization-zh_CN
Extract the plugin archive into the extensions directory, enable it in the web UI, and restart the service.
4. Generating Images
Launch the web UI with python launch.py . Use the prompt box to input positive prompts and the negative prompt box for undesired concepts. Example prompts are shown in the article screenshots. After selecting the downloaded model (e.g., ChilloutMix), click “Generate” to obtain realistic human images.
4.1 Different Styles
Download Lora style models (e.g., a Genshin Impact Lora) from Civitai, place them into models/Lora , and enable them in the UI to produce images with specific artistic styles.
4.2 Video Animation (Deforum)
Install the Deforum extension for video generation:
git clone https://github.com/deforum-art/deforum-for-automatic1111-webui extensions/deforum
After restarting the UI, a new “Deforum” tab appears. Provide a series of prompts with keyframes (e.g., the JSON‑style prompt block shown in the article) to generate an animated video.
5. Speech Synthesis for Generated Images
Upload a generated image to D‑ID Studio , type the desired speech text, and produce a realistic talking‑head video.
The tutorial concludes with a reminder that the entire workflow (models, plugins, source code) can be obtained by replying “AI网站” to the associated WeChat public account, encouraging readers to share their results.
Tencent Cloud Developer
Official Tencent Cloud community account that brings together developers, shares practical tech insights, and fosters an influential tech exchange community.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.