mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2026-01-11 03:01:03 +01:00
docs: Improve the image generation tutorial
This commit is contained in:
parent
5848c7884d
commit
eba8a59466
|
|
@ -1,20 +1,65 @@
|
|||
# Image Generation Tutorial
|
||||
|
||||
This feature allows you to generate images using high-speed models like Z-Image-Turbo directly within the web UI.
|
||||
This feature allows you to generate images using `diffusers` models like [Tongyi-MAI/Z-Image-Turbo](https://huggingface.co/Tongyi-MAI/Z-Image-Turbo) directly within the web UI.
|
||||
|
||||
## How to use
|
||||
## Installation
|
||||
|
||||
1. Click on the **Image AI** tab at the top of the interface.
|
||||
2. Select the **Model** sub-tab.
|
||||
3. Copy and paste the following link into the **Download model** box:
|
||||
1. Clone the repository with
|
||||
|
||||
```
|
||||
https://huggingface.co/Tongyi-MAI/Z-Image-Turbo
|
||||
git clone https://github.com/oobabooga/text-generation-webui
|
||||
```
|
||||
|
||||
4. Click the **Download** button and wait for the confirmation message.
|
||||
5. In the **Model** dropdown menu, select the model you just downloaded (if you don't see it, click the 🔄 refresh button).
|
||||
6. Click **Load**.
|
||||
7. Go to the **Generate** sub-tab, type a prompt, and click **GENERATE**.
|
||||
or download it from [here](https://github.com/oobabooga/text-generation-webui/archive/refs/heads/main.zip) and unzip it.
|
||||
|
||||
2. Use the one-click installer.
|
||||
|
||||
- Windows: Double click on `start_windows.bat`
|
||||
- Linux: Run `./start_linux.sh`
|
||||
- macOS: Run `./start_macos.sh`
|
||||
|
||||
Note: Image generation does not work with the portable builds in `.zip` format in the [Releases page](https://github.com/oobabooga/text-generation-webui/releases). You need the "full" version of the web UI.
|
||||
|
||||
## Downloading a model
|
||||
|
||||
1. Once installation ends, browse to `http://127.0.0.1:7860/`.
|
||||
2. Click on "Image AI" on the left.
|
||||
3. Click on "Model" at the top.
|
||||
4. In the "Download model" field, paste `https://huggingface.co/Tongyi-MAI/Z-Image-Turbo` and click "Download".
|
||||
5. Wait for the download to finish (it's 31 GB).
|
||||
|
||||
## Loading the model
|
||||
|
||||
Select the quantization option in the "Quantization" menu and click "Load".
|
||||
|
||||
The memory usage for `Z-Image-Turbo` for each option is:
|
||||
|
||||
If you have less GPU memory than _, check the "CPU Offload" option.
|
||||
|
||||
Note: The next time you launch the web UI, the model will get automatically loaded with your last settings when you try to generate an image. You do not need to go to the Model tab and click "Load" each time.
|
||||
|
||||
## Generating images:
|
||||
|
||||
1. While still in the "Image AI" page, go to the "Generate" tab.
|
||||
2. Type your prompt and click on the Generate button.
|
||||
|
||||
### LLM Prompt Variations
|
||||
|
||||
To use this feature, you need to load an LLM in the main "Model" tab on the left.
|
||||
|
||||
If you have no idea what to use, do this to get started:
|
||||
|
||||
1. Download [Qwen3-4B-Q3_K_M.gguf](https://huggingface.co/unsloth/Qwen3-4B-GGUF/resolve/main/Qwen3-4B-Q3_K_M.gguf) to your `text-generation-webui/user_data/models` folder.
|
||||
2. Select the model in the dropdown menu in the "Model" page.
|
||||
3. Click Load.
|
||||
|
||||
Then go back to the "Image AI" page and check "LLM Prompt Variations".
|
||||
|
||||
After that, your prompts will be automatically updated by the LLM each time you generate an image. If you use sequential batch count value greater than 1, a new prompt will be created for each sequential batch.
|
||||
|
||||
The improvement in creativity is striking:
|
||||
|
||||
### Model-specific settings
|
||||
|
||||
- For Z-Image-Turbo, make sure to keep CFG Scale at 0 and Steps at 9. Do not write a Negative Prompt as it will get ignored with this CFG Scale value.
|
||||
|
||||
> **Note for Z-Image-Turbo:** For the best results with this specific model, keep the **CFG Scale** slider at **0**.
|
||||
|
|
|
|||
Loading…
Reference in a new issue