Skip to content
Filters & more
15 min
Beginner
image-generationcomfyuiz-image-turbo
Device Family
Device
OS

Generating Images with ComfyUI and Z Image Turbo

Create stunning AI-generated images using ComfyUI with Z Image Turbo.

Generating Images with ComfyUI and Z Image Turbo

Overview

ComfyUI is a powerful, node-based interface for Stable Diffusion and other diffusion models. Unlike traditional text-to-image interfaces with simple prompt boxes, ComfyUI exposes the entire image generation pipeline as a visual graph, giving you fine-grained control over every step from text encoding to latent space manipulation to final decoding.

This tutorial teaches you how to use ComfyUI with the Z Image Turbo model on your GPU to generate high-quality AI images.

What You’ll Learn

  • How to launch ComfyUI and load the Z-Image Turbo template
  • Understanding diffusion pipeline components
  • Generating images and tuning generation parameters
  • Saving and sharing workflows

Setting the Memory Configuration

For the Ryzen AI Halo, the dedicated GPU memory defaults to 64GB, which is sufficient for most workloads. For larger models or longer contexts, increasing this to 96GB may help. To adjust, open AMD Software: Adrenalin Edition™ and navigate to Performance → Tuning → AMD Variable Graphics Memory. Reboot for the changes to take effect.

AMD Software Adrenalin Edition — AMD Variable Graphics Memory panel

To change the dedicated GPU memory value, open AMD Software: Adrenalin Edition™ and navigate to Performance → Tuning → AMD Variable Graphics Memory. Reboot for the changes to take effect.

AMD Software Adrenalin Edition — AMD Variable Graphics Memory panel

On Linux, to run larger models, increase the shared memory pool available to the GPU. This might involve setting the BIOS dedicated GPU memory to the minimum, so that the shared memory pool can be maximized.

For the AMD Ryzen™ AI Halo, the default is 96GB shared. To modify this, open the AMD Ryzen™ AI Developer Center and go to the Settings tab. Under Graphics Performance Settings, increase the Shared Video Memory slider, then click Apply Changes and reboot for the changes to take effect.

AMD Ryzen AI Developer Center — Graphics Performance Settings with Shared Video Memory slider

Increase the shared memory pool by changing the kernel’s Translation Table Manager (TTM) page setting. AMD recommends setting the minimum dedicated VRAM in the BIOS (0.5 GB) so the maximum amount is available as shared memory.

  1. Install the pipx utility and add the path for pipx-installed wheels to the system search path:
Terminal window
sudo apt install pipx
pipx ensurepath
  1. Install the amd-debug-tools wheel from PyPI:
Terminal window
pipx install amd-debug-tools
  1. Query the current shared memory settings:
Terminal window
amd-ttm
  1. Increase the shared memory allocation (units in GB):
Terminal window
amd-ttm --set <NUM>
  1. Reboot for the changes to take effect.

Check for Software Updates

Before starting, ensure your Ryzen AI Halo has the latest software installed. Open the AMD Ryzen™ AI Developer Center and check for available updates, both to the app itself and additional software.

Go to the Updates tab. If updates are available, install them and reboot before continuing.

AMD Ryzen AI Developer Center — Updates tab on Windows

Go to the Manage tab. If updates are available, install them and reboot before continuing.

AMD Ryzen AI Developer Center — Manage tab on Linux

Installing Software Prerequisites

AMD GPU Driver

Update to the latest AMD GPU driver using AMD Software: Adrenalin Edition™.

  1. Open AMD Software: Adrenalin Edition from your Start menu or system tray.
  2. Navigate to Driver and Software, click Manage Updates.
  3. If an update is available, follow the prompts to download and install.

AMD GPU Driver

Install the AMD GPU Driver (amdgpu) using the Radeon Software for Linux (RSL) flow. For instructions for your distribution, see Install the kernel driver.


ComfyUI

  1. Download the Windows ComfyUI v0.10.0 installer from download.comfy.org.
  2. Choose your hardware setup: Select AMD ROCm.
  3. Choose where to install ComfyUI: Use the default path or your preferred folder.
  4. Desktop App Settings: We recommend unselecting “Automatic Updates” to ensure you are using the recommended version of this app.
  5. Press “Next” to begin installation.

Clone ComfyUI

Terminal window
git clone https://github.com/Comfy-Org/ComfyUI.git

(Optional) Checkout a specific version

Terminal window
git checkout v0.19.2

Install ComfyUI requirements

With the Python virtual environment activated, run:

Terminal window
cd ComfyUI
pip install -r requirements.txt

Grant your user access to GPU devices (log out and back in for this to take effect):

Terminal window
sudo usermod -aG render,video $LOGNAME

Create a Virtual Environment

On Linux, open a terminal in the directory of your choice and run the following prompt to create a venv:

Terminal window
sudo apt update
sudo apt install -y python3-venv
python3 -m venv comfyui-env
source comfyui-env/bin/activate

AMD GPU Driver

Update to the latest AMD GPU driver using AMD Software: Adrenalin Edition™.

  1. Open AMD Software: Adrenalin Edition from your Start menu or system tray.
  2. Navigate to Driver and Software, click Manage Updates.
  3. If an update is available, follow the prompts to download and install.

AMD GPU Driver

Install the AMD GPU Driver (amdgpu) using the Radeon Software for Linux (RSL) flow. For instructions for your distribution, see Install the kernel driver.


PyTorch

Install PyTorch with AMD ROCm™ software support in the created virtual environment:

Terminal window
python -m pip install --index-url https://repo.amd.com/rocm/whl/gfx1151/ "torch==2.11.0+rocm7.13.0" "torchvision==0.26.0+rocm7.13.0" "torchaudio==2.11.0+rocm7.13.0"
Terminal window
python -m pip install --index-url https://repo.amd.com/rocm/whl/gfx1150/ "torch==2.11.0+rocm7.13.0" "torchvision==0.26.0+rocm7.13.0" "torchaudio==2.11.0+rocm7.13.0"
Terminal window
python -m pip install --index-url https://repo.amd.com/rocm/whl/gfx1152/ "torch==2.11.0+rocm7.13.0" "torchvision==0.26.0+rocm7.13.0" "torchaudio==2.11.0+rocm7.13.0"
Terminal window
python -m pip install --index-url https://repo.amd.com/rocm/whl/gfx110X-all/ "torch==2.11.0+rocm7.13.0" "torchvision==0.26.0+rocm7.13.0" "torchaudio==2.11.0+rocm7.13.0"
Terminal window
python -m pip install --index-url https://repo.amd.com/rocm/whl/gfx120X-all/ "torch==2.11.0+rocm7.13.0" "torchvision==0.26.0+rocm7.13.0" "torchaudio==2.11.0+rocm7.13.0"

For other devices, please refer to this link for full instructions.


ComfyUI

  1. Download the Windows ComfyUI v0.10.0 installer from download.comfy.org.
  2. Choose your hardware setup: Select AMD ROCm.
  3. Choose where to install ComfyUI: Use the default path or your preferred folder.
  4. Desktop App Settings: We recommend unselecting “Automatic Updates” to ensure you are using the recommended version of this app.
  5. Press “Next” to begin installation.

Clone ComfyUI

Terminal window
git clone https://github.com/Comfy-Org/ComfyUI.git

(Optional) Checkout a specific version

Terminal window
git checkout v0.19.2

Install ComfyUI requirements

With the Python virtual environment activated, run:

Terminal window
cd ComfyUI
pip install -r requirements.txt

Launching ComfyUI

To launch ComfyUI on Windows, click the ComfyUI Desktop Launcher which is found on your Desktop. Follow the steps to install the local version with AMD.

ComfyUI Desktop Launcher and Installer

Then, click the ComfyUI button at the top-middle of the app. This will open a settings tab. Open the Storage tab and make sure the paths are set as follows to access the pre-installed models.

ComfyUI Desktop Menu Storage Tab

To launch ComfyUI on Linux, click the ComfyUI shortcut in the taskbar. It should open by itself in a browser window.

To launch ComfyUI on Windows, simply click the ComfyUI shortcut on your Desktop.

To launch ComfyUI:

  1. Ensure you are within the ComfyUI directory.
  2. Run python3 main.py --use-pytorch-cross-attention

ComfyUI starts a local web server. Open your browser to http://127.0.0.1:8188 to access the interface.

Finding the Z-Image Turbo Template

Before generating images, you need to load the Z-Image Turbo template. Here’s how to find it:

  1. Look at the far left edge of the screen—there’s a vertical toolbar running from top to bottom on the leftmost side of the app.

  2. Find the folder icon—in that left toolbar, look for an icon that looks like a folder. When you hover over it, it’s labeled “Templates.”

Templates button in the left toolbar

  1. Click the folder icon—this opens the Templates panel.

  2. Search for “Z-Image Turbo”—use the search bar or scroll through the available templates to find the Z-Image Turbo Text To Image workflow, then click to load it.

Selecting the Z-Image Turbo template

Downloading Models

ComfyUI Models

If you previously deleted pre-downloaded ComfyUI models or want to download those for the first time, simply press the Download button on each of the models when prompted that missing models have been detected. You may need to manually place the model files in the correct locations.

ComfyUI Download Models

Understanding the Interface

When the Z-Image Turbo template loads, you’ll see a canvas with 2 main nodes. The first node is called ‘Text to Image (Z-Image-Turbo)’, and the second node is for viewing the image.

ComfyUI Main Node

On the Z-Image node, click the top right button to expand the Node and see the subgraph.

ComfyUI Node Subgraph

Pipeline Components

The Z-Image Turbo workflow uses four key model components that work together:

ComponentRole
Text Encoder (Qwen 3 4B)Converts your text prompt into embeddings the diffusion model understands
Diffusion Model (Z-Image Turbo)The core neural network that iteratively denoises latent representations into images
VAE (Variational Autoencoder)Encodes images to/from latent space (decodes the final latents into pixels)
LoRA (optional)Lightweight adapters that modify style or subject without retraining the base model

Each node in the workflow corresponds to one of these components. Data flows left-to-right: text → embeddings → guided denoising → latents → final image.

Generating Your First Image

The Z-Image Turbo model is already loaded. To generate an image:

  1. Enter your prompt in the main Z-Image Node. Be descriptive. Here is an example:
A photorealistic red fox sitting in a snowy forest clearing,
morning light filtering through pine trees,
detailed fur texture, bokeh background
  1. (Optional): Confirm or tweak any other specific settings within the subgraph.
  2. Click the blue “Run Workflow” in the right corner (or press Ctrl+Enter)
  3. Watch the nodes highlight as each step executes

The entire workflow execution should complete in less than 30 seconds. Your generated image appears in the Save Image node and is saved to the output/ folder.

Adjusting Generation Parameters

KSampler Settings

The KSampler node controls the core diffusion process:

ParameterWhat It ControlsRecommended for Z-Image Turbo
stepsNumber of denoising iterations4–10 (turbo models are distilled for fewer steps)
cfgClassifier-free guidance scale—how closely to follow the prompt1.0–2.0 (turbo models use very low guidance)
sampler_nameDenoising algorithmeuler and res_multistep work well for turbo models
schedulerNoise schedule curvenormal or simple
seedRandom seed for reproducibilitySet fixed values to iterate on a composition

Image Size

To adjust output dimensions, find the Empty Latent Image node and modify width and height. Keep dimensions at or below 1024 pixels on the longest side for optimal quality.

ModelSamplingAuraFlow

The ModelSamplingAuraFlow node is a specialized sampling modifier that adjusts how the diffusion process handles noise scheduling. You’ll see this node connected to the model output in the Z-Image Turbo workflow.

ParameterWhat It ControlsRecommended Values
shiftAdjusts the noise schedule timing—higher values push more detail refinement to later steps1.0–4.0 (default is 3.0)

When to adjust shift:

  • Lower values (1.0–2.0): Faster convergence, good for simple compositions
  • Higher values (3.0–4.0): More gradual refinement, can improve fine details in complex scenes

The AuraFlow sampling method is specifically designed for flow-matching models like Z-Image Turbo, ensuring proper noise distribution throughout the generation process.

Working with Workflows

Saving Workflows

Click the Save button in the menu to export your workflow as a JSON file. This captures:

  • All nodes and their parameters
  • All connections between nodes
  • Current prompt text

Loading Workflows

Drag a workflow JSON file onto the canvas, or use Load from the menu. The Z-Image Turbo workflow you see by default is loaded from a saved workflow file.

Sharing Workflows

Workflows are self-contained—share the JSON file with colleagues, and they can reproduce your exact setup. This makes ComfyUI excellent for collaborative experimentation.

Next Steps

  • Explore LoRA nodes: Apply style or subject adapters without retraining
  • Add negative prompts: Connect a second CLIP Text Encode node to the negative conditioning input of KSampler to guide the model away from unwanted features like blur, artifacts, or watermarks
  • Build custom workflows: Chain multiple generations, add upscaling, or create image variations
  • Browse community workflows: ComfyUI Examples has many ready-to-use workflows

ComfyUI’s strength is experimentation: connect nodes differently, adjust parameters, and observe how each change affects the output. This hands-on exploration builds intuition for how diffusion models work.

For more information, check out the ComfyUI Documentation.

Need help with this playbook?

Run into an issue or have a question? Open a GitHub issue and our team will take a look.