How to Use Qwen Text-to-Image in ComfyUI (GGUF & Lightning LoRA)

Table of Contents
1. Introduction
Welcome to this comprehensive tutorial on Qwen Image Generation with the GGUF Model and Lightning LoRa in ComfyUI. In this guide, we will explore how to effectively utilize the Qwen model for generating stunning images using the ComfyUI interface. The Qwen model is a powerful text-to-image generation tool that leverages advanced AI techniques to create high-quality visuals from textual descriptions.
This tutorial helps you harness the FAST Qwen GGUF model, even on low-resource systems. By the end, youโll know how to set up ComfyUI, configure settings, and generate your first text-to-image with Lightning LoRA. Letโs get started!
2. Requirements for Qwen Image Generation with GGUF Model
Before we begin the setup process, itโs essential to ensure that your system meets the requirements for running the Qwen Image Generation model in ComfyUI. The GGUF version of the Qwen model is optimized for efficiency, allowing for smooth performance even on systems with lower specifications (<12GB VRAM).
Requirement 1: ComfyUI Installed
To start using ComfyUI, you need to have it installed on your local machine. If you haven't done so already, follow the detailed instructions in the article below to get ComfyUI up and running on your windows operating system.
Option 1: Local Installation:
How to Install ComfyUI Locally on Windows?
Option 2: Cloud Based GPU (RunPod)
How to Run ComfyUI on RunPod with Network Volume
Requirement 2: Update ComfyUI
To ensure full compatibility with the Wan2.2 GGUF models, make sure your ComfyUI installation is up to date.
For Windows Portable Users (Local)
-
Open the folder:
...\ComfyUI_windows_portable\update -
Double-click update_comfyui.bat.
For Runpod Users:
From the RunPod root directory (/workspace), run the following command lines in your terminal one at a time:
ts1 2git pull origin master 3/workspace/ComfyUI/venv/bin/python -m pip install -r /workspace/ComfyUI/requirements.txt
Keeping ComfyUI updated guarantees you have the latest features and nodes, bug fixes and compatibility improvements.
Requirement 3: Download Qwen Model Files
Next, you will need to download the required model files for Qwen. Below is a table listing all the necessary files along with their corresponding directories where they should be placed:
File Name | Hugging Face Download Page | File Directory |
---|---|---|
qwen-image-Q3_K_S.gguf | Download Page | ..\ComfyUI\models\diffusion_models |
qwen_2.5_vl_7b_fp8_scaled.safetensors | Download Page | ..\ComfyUI\models\clip |
qwen_image_vae.safetensors | Download Page | ..\ComfyUI\models\vae |
Qwen-Image-Lightning-4steps-V1.0.safetensors | Download Page | ..\ComfyUI\models\loras |
4x_NMKD-Siax_200k.pth | Download Page | ..\ComfyUI\models\upscale_models |
Verify Folder Structure
Before proceeding, ensure that all Qwen model files are correctly placed in their respective ComfyUI folders.
ts1๐ ComfyUI 2โโโ ๐ models 3 โโโ ๐ diffusion_models 4 โ โโโ qwen-image-Q3_K_S.gguf 5 โโโ ๐ clip 6 โ โโโ qwen_2.5_vl_7b_fp8_scaled.safetensors 7 โโโ ๐ vae 8 โ โโโ qwen_image_vae.safetensors 9 โโโ ๐ loras 10 โ โโโ Qwen-Image-Lightning-4steps-V1.0.safetensors 11 โโโ ๐ upscale_models 12 โโโ 4x_NMKD-Siax_200k.pth
This organization is crucial for a smooth workflow without errors.
3. Downloading and Loading the Qwen Workflow for ComfyUI
With the requirements in place, the next step is to download and load the Qwen Text to Image GGUF Lightning LoRA JSON Workflow into ComfyUI. This workflow is essential for configuring the model and ensuring it operates correctly.
Step 1: Download the Workflow File
Begin by downloading the workflow file specifically designed for the Qwen GGUF model. This file contains all the necessary configurations and settings required for the model to function properly. You can find the download link below:
๐ Download Qwen T2I GGUF Lightning LoRA & Upscale Workflow JSON
Step 2: Load the Workflow in ComfyUI
Once youโve downloaded the workflow file, launch ComfyUI and simply drag and drop the .json file onto the canvas to load the full setup. This action will prepare the environment for working with the Qwen model.
Step 3: Verify Workflow Configuration
Once the workflow is loaded, take a moment to check that all nodes and connections are properly configured. This step helps ensure the model runs smoothly and efficiently. If any nodes are missing or incorrectly set up, consider updating ComfyUI or installing the required custom nodes for the workflow.
4. Configuring Qwen Image Generation Settings
Now that the Qwen GGUF workflow is loaded into ComfyUI, we can configure the settings for optimal image generation. Proper setup is essential for achieving high-quality outputs.
Step 1: Load Models
Unet Loader Node:
- Model: qwen-image-Q3_K_S.gguf (quantized version)
CLIP Node:
-
Clip Name: qwen_2.5_vl_7b_fp8_scaled.safetensors
-
Type: qwen_image
-
Device: default
VAE Node:
- File: qwen_image_vae.safetensors
Power LoRA Loader Node:
-
LoRA File: Qwen-Image-Lightning-4steps-V1.0.safetensors
-
Using this LoRA speeds up rendering, allowing only 4 steps later in the Ksampler node.
Step 2: Set Image Resolution
Use the Flux Resolution Calc node to select your preferred aspect ratio. This makes it easy to set the image dimensions quickly, and you can even preview the ratio below.
Step 3: Enter Text Prompt
To get the best results, write a detailed text prompt describing the image you want to generate. Be specific about the subject, style, and elements you want included. The more descriptive and clear your prompt, the higher the quality of the output.
-
Define the Subject: Clearly describe the main character or object (e.g., person, animal, creature).
-
Pose & Expression: Specify body position, angle, or facial expression (e.g., close-up, dynamic angle, looking at the camera).
-
Appearance & Features: Highlight distinctive traits like hair, color, or markings.
-
Clothing / Outfit / Style: Describe the attire or overall look, including style or theme.
-
Environment / Background: Mention the setting or backdrop (e.g., natural, urban, abstract, solid color).
-
Details & Textures: Include textures, patterns, or other fine details to enhance realism or style.
-
Lighting & Mood: Define lighting type, time of day, shadows, and overall atmosphere.
-
Artistic Style / Genre: Specify style preferences (e.g., realistic, anime, cartoon, cinematic, painterly).
-
Optional Extras: Add optional small details to enrich the image (e.g., glowing accents, subtle props, color highlights).
Step 4: Configure Ksampler Settings
Base Ksampler Settings:
Setting | Value |
---|---|
control_after_generate | randomize |
steps | 4 |
cfg | 1 |
sampler_name | res_multistep |
scheduler | simple |
denoise | 1.00 |
Step 5: Enable Upscaler (Optional)
To enhance the final output, enable the upscaler toggler.
Load Upscale Model Node:
- Select your downloaded upscaler model: 4x_NMKD-Siax_200k.pth
Ksampler Settings for Upscaling:
Setting | Value |
---|---|
control_after_generate | randomize |
steps | 4 |
sampler_name | res_multistep |
scheduler | simple |
denoise | 0.10 |
Note: Lowering the denoise value ensures the upscaled image remains close to the original, without adding unrelated noise.
Step 6: Click RUN
Once all nodes and settings are configured, click RUN to start image generation. Rendering times may vary depending on your hardware.
5. Example of Qwen Text to Image Generations
After configuring the settings and clicking "RUN", the Qwen model will begin generating your image. Depending on your hardware capabilities, the generation time may vary. Here are a couple of examples of images generated using the Qwen model:
Example 1: Character
Prompt: "Close-up upper-body portrait of a confident female soldier with a vibrant green ponytail, looking directly at the camera. Wearing a anime styled tactical outfit with subtle transparency accents, black yoga pants. Holding a futuristic machine gun aimed toward the viewer. A detailed metallic green badge with engraved text reading 'Low VRAM' is attached to her upper arm. smoky urban background battlefield with green neon accent lights, realistic shadows and lighting emphasizing depth, textures on skin, clothing, metal, and weapon."
Example 2: Game Asset
Prompt: "futuristic rifle with green accents and metallic details, angled slightly toward the camera. Highly detailed textures with subtle scratches, reflections, and glowing green highlights. Background: solid black for focus, cinematic shadows enhancing depth and realism."
Example 3: Game Badge / Icon
Prompt: "Close-up of a realistic green badge with engraved text reading 'Low VRAM' and subtle embossed symbols. Soft reflections on the metallic surface, highly detailed textures on the metal and edges. Slight tilt for cinematic depth. Background: solid black or dark neutral studio environment. Soft shadows emphasize the badge contours and surface details, realistic lighting highlighting vibrant green tones."
Example 5: Futuristic Device
Prompt: "Futuristic walkie-talkie with green LED indicators and small holographic display, "Low VRAM" on display. Detailed textures on metal and plastic casing with subtle scratches and reflections. Buttons and dials clearly visible, realistic ergonomic design. Background: solid black to emphasize the device"
Example 5: Fantasy Creature
Prompt: "Close-up of a realistic mystical green creature with glowing eyes and natural markings. Graceful, slightly dynamic pose emphasizing anatomy and textures. Background: softly blurred forest environment with green highlights. Detailed textures on scales, fur, or feathers, realistic lighting and shadows creating cinematic depth."
Tips for Success
-
Start with simple prompts to gauge performance on your system.
-
Experiment with various prompts to see how they influence the final output.
6. Conclusion
This tutorial has guided you through the process of using the Qwen image generation model with the GGUF format and Lightning LoRa in ComfyUI. From setting up your environment to configuring the workflow and generating images, you now have a full understanding of how to create stunning visuals from text prompts and even enhance the generated image with an upscaler. By integrating the Lightning LoRa, you can still maintain efficient image generation while achieving high visual quality.
While the Qwen model is powerful, it can sometimes fall short in generating fully realistic characters. To address this, you can enhance facial details using the Blazing Fast Face Detailer Workflow for ComfyUI, which weโve outlined in our guide here:
Thank you for following this guide! Weโll keep you updated with the latest news and updates around ComfyUI to help you get the most out of your creative projects.