Team Ai
Modelpublic

Wuli-art/Gemma-4-for-Qwen-Image-Edit-2511-Prompt-Extend

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
15likes5.6kdownloads
Model Card

<div align="center"> <img src="https://img.alicdn.com/imgextra/i4/O1CN011xTzi6280yXyGmk9b_!!6000000007871-0-tps-3072-938.jpg" width=300 /> </div>

Prompt extend plays a critical role in image editing by helping models better understand editing intent and produce more accurate and stable results.

This model is fine-tuned from gemma-4-12B-it for prompt extend with Qwen Image Edit 2511. It takes an editing prompt together with input images and generates an enhanced editing prompt. The model is trained with Prompt Extend Reinforcement Learning (PERL) using ROLL, with Kimi K2.6 serving as the reward worker to evaluate editing results.

<div align="center"> <img src="https://img.alicdn.com/imgextra/i2/O1CN01EwAJvGc1D4D3OTaP_!!6000000001034-2-tps-1672-941.png" width=600 /> </div>

In real-world scenarios, this model delivers better and more stable editing results across a wide range of complex edit prompts. For now, we recommend using this model together with the Qwen Image Edit 2511 8steps LoRA from lightx2v for end-to-end image editing. Please refer to the provided ComfyUI workflow for more details.

ComfyUI Workflow

A ready-to-use ComfyUI workflow is provided here.

Model Download

For models provided by Comfy-Org, you may use any compatible precision or quantized variant. This guide uses the original BF16 version for demonstration.

Download the required model files and place each one in the corresponding ComfyUI directory listed below.

ComponentModel fileSourceComfyUI directory
Prompt extension modelgemma4_12b_qwen_image_edit_2511_pe.safetensors / gemma4_12b_qwen_image_edit_2511_pe_fp8_scaled.safetensorsModelScope / HuggingFaceComfyUI/models/text_encoders/
Text encoderqwen_2.5_vl_7b.safetensorsComfy-Org/Qwen-Image_ComfyUIComfyUI/models/text_encoders/
VAEqwen_image_vae.safetensorsComfy-Org/Qwen-Image_ComfyUIComfyUI/models/vae/
DiTqwen_image_edit_2511_bf16.safetensorsComfy-Org/Qwen-Image-Edit_ComfyUIComfyUI/models/diffusion_models/
Lightning LoRAQwen-Image-Edit-2511-Lightning-8steps-V1.0-bf16.safetensorslightx2v/Qwen-Image-Edit-2511-LightningComfyUI/models/loras/

Once downloaded, your ComfyUI model directory should have the following structure:

text
ComfyUI/
└── models/
    ├── text_encoders/
    │   ├── gemma4_12b_qwen_image_edit_2511_pe.safetensors
    │   └── qwen_2.5_vl_7b.safetensors
    ├── vae/
    │   └── qwen_image_vae.safetensors
    ├── diffusion_models/
    │   └── qwen_image_edit_2511_bf16.safetensors
    └── loras/
        └── Qwen-Image-Edit-2511-Lightning-8steps-V1.0-bf16.safetensors

Usage

  1. 1.Download all required model files and place them in the directories shown above.
  2. 2.Restart ComfyUI or refresh the model list.
  3. 3.Download the workflow JSON file and drag it onto the ComfyUI canvas.
  4. 4.Make sure each loader node points to the corresponding downloaded model.
  5. 5.Load one or more input images.
  6. 6.Enter the original editing instruction.
  7. 7.Run the workflow to obtain the extended prompt.

Result Visualization

The table below presents editing results of Qwen Image Edit 2511 based on four different prompt extend methods:

  • —No prompt extend
  • —Use Qwen3.7 Plus from Bailian
  • —Use the original gemma-4-12B-it
  • —Use the fine-tuned gemma-4-12B-it in this repo

All prompt extend methods use the same system prompt from the official GitHub Repo.

<span style="display:inline-block;width:100px">Original Prompt</span>Input ImagesNo Prompt ExtendQwen3.7 PlusGemma BaseOurs
<span style="display:inline-block;width:100px">Refer to the goji-berry water cup design in Image 2 and place it on the desk next to the mouse</span><img src="https://gw.alicdn.com/imgextra/i3/O1CN01sHXBNibKx7F1chua!!6000000003833-0-tps-800-800.jpg" width="160" alt="Input image 1"><br><img src="https://gw.alicdn.com/imgextra/i2/O1CN01PJboIXew47J21stE!!6000000003704-0-tps-1000-1000.jpg" width="160" alt="Input image 2"><img src="https://gw.alicdn.com/imgextra/i1/O1CN01spU8T0jzPTK24uCu_!!6000000000438-2-tps-1024-1024.png" width="160" alt="No Prompt Extend result"><img src="https://gw.alicdn.com/imgextra/i3/O1CN01VrlcVtiPs4H24uCu_!!6000000003738-2-tps-1024-1024.png" width="160" alt="Qwen3.7 Plus result"><img src="https://gw.alicdn.com/imgextra/i3/O1CN01L3OL3LaeS6F24uCu_!!6000000001934-2-tps-1024-1024.png" width="160" alt="Gemma Base result"><img src="https://gw.alicdn.com/imgextra/i1/O1CN01WGupowSQWzB24uCu_!!6000000000921-2-tps-1024-1024.png" width="160" alt="Ours result">
<span style="display:inline-block;width:100px">Help me generate a half-body image of this person</span><img src="https://gw.alicdn.com/imgextra/i3/O1CN01XLbtqxbmDmJ2WLmU_!!6000000004406-0-tps-1242-1656.jpg" width="160" alt="Input image"><img src="https://gw.alicdn.com/imgextra/i2/O1CN01sdqKA7B3QuI1onFw_!!6000000007974-2-tps-896-1184.png" width="160" alt="No Prompt Extend result"><img src="https://gw.alicdn.com/imgextra/i1/O1CN01uCITd1a3AUJ1onFw_!!6000000007907-2-tps-896-1184.png" width="160" alt="Qwen3.7 Plus result"><img src="https://gw.alicdn.com/imgextra/i4/O1CN01wZvNPSQetiH1onFw_!!6000000001400-2-tps-896-1184.png" width="160" alt="Gemma Base result"><img src="https://gw.alicdn.com/imgextra/i1/O1CN016o1wUFhldrG1onFw_!!6000000006836-2-tps-896-1184.png" width="160" alt="Ours result">
<span style="display:inline-block;width:100px">Keep the main subject unchanged and generate a three-view sheet from different angles</span><img src="https://gw.alicdn.com/imgextra/i2/O1CN01RFRbkTViukK1tZrB_!!6000000003288-0-tps-934-1279.jpg" width="160" alt="Input image"><img src="https://gw.alicdn.com/imgextra/i2/O1CN0109D9Hx91dcL1klVY_!!6000000006284-2-tps-864-1184.png" width="160" alt="No Prompt Extend result"><img src="https://gw.alicdn.com/imgextra/i3/O1CN01hgCphpaf9zJ1klVY_!!6000000001825-2-tps-864-1184.png" width="160" alt="Qwen3.7 Plus result"><img src="https://gw.alicdn.com/imgextra/i4/O1CN01wHNbGmUG0fE1klVY_!!6000000004226-2-tps-864-1184.png" width="160" alt="Gemma Base result"><img src="https://gw.alicdn.com/imgextra/i1/O1CN01y4jK7933f5H1klVY_!!6000000007945-2-tps-864-1184.png" width="160" alt="Ours result">
<span style="display:inline-block;width:100px">Generate a high-altitude, top-down view of the ground from Image 1</span><img src="https://gw.alicdn.com/imgextra/i2/O1CN01XiiT3ZqExlF1Kpka_!!6000000001054-0-tps-658-1170.jpg" width="160" alt="Input image"><img src="https://gw.alicdn.com/imgextra/i1/O1CN012ElXBEDjuiH1RNd0_!!6000000006027-2-tps-710-1312.png" width="160" alt="No Prompt Extend result"><img src="https://gw.alicdn.com/imgextra/i2/O1CN01JPWQa8UghSI1YgJU_!!6000000006869-2-tps-768-1376.png" width="160" alt="Qwen3.7 Plus result"><img src="https://gw.alicdn.com/imgextra/i2/O1CN01xUu8uA0dXyI1YgJU_!!6000000003699-2-tps-768-1376.png" width="160" alt="Gemma Base result"><img src="https://gw.alicdn.com/imgextra/i2/O1CN01CqgrSjDyTNC1YgJU_!!6000000002740-2-tps-768-1376.png" width="160" alt="Ours result">
<span style="display:inline-block;width:100px">Generate a CAD drawing of this image.</span><img src="https://gw.alicdn.com/imgextra/i1/O1CN01VHr7ao8TvZC2R3rs_!!6000000001433-0-tps-1200-1200.jpg" width="160" alt="Input image"><img src="https://gw.alicdn.com/imgextra/i1/O1CN01C5q2cVtafyG24uCu_!!6000000007924-2-tps-1024-1024.png" width="160" alt="No Prompt Extend result"><img src="https://gw.alicdn.com/imgextra/i4/O1CN01eAaInEKBKGI24uCu_!!6000000000555-2-tps-1024-1024.png" width="160" alt="Qwen3.7 Plus result"><img src="https://gw.alicdn.com/imgextra/i2/O1CN01BSjcnV3kIuE2miJM_!!6000000005120-2-tps-1372-1380.png" width="160" alt="Gemma Base result"><img src="https://gw.alicdn.com/imgextra/i1/O1CN01XkXluZmMB8B24uCu_!!6000000003374-2-tps-1024-1024.png" width="160" alt="Ours result">