This repository contains a LoRA adapter for Qwen-Image-Edit-2511, trained for converting portrait and landscape images into a traditional Chinese gongbi painting style.
The LoRA is designed for image-to-image editing. It preserves the original subject, composition, and spatial structure while applying fine-line drawing, layered color, mineral-pigment aesthetics, and classical gongbi-style visual features.
Primary use case: converting real or generated portrait / landscape images into a refined traditional Chinese gongbi painting style while keeping the original image structure stable.
Important Compatibility Notes
Compatibility notice: This LoRA was trained with DiffSynth-Studio.
It is not released as a standard PEFT / diffusers adapter directory.
Do not directly use Hugging Face diffusers load_lora_weights() with this file. This LoRA is not released as a standard PEFT / diffusers adapter directory.
For Qwen-Image-Edit-2511 inference, you must also enable:
zero_cond_t=True
If zero_cond_t=True is not enabled, the output may show weak LoRA effects, unstable structure, or composition drift.
1import torch
2from PIL import Image
3from diffsynth.pipelines.qwen_image import ModelConfig, QwenImagePipeline
45pipe = QwenImagePipeline.from_pretrained(6 torch_dtype=torch.bfloat16,7 device="cuda",8 model_configs=[9 ModelConfig(10 model_id="Qwen/Qwen-Image-Edit-2511",11 origin_file_pattern="transformer/diffusion_pytorch_model*.safetensors",12),13 ModelConfig(14 model_id="Qwen/Qwen-Image",15 origin_file_pattern="text_encoder/model*.safetensors",16),17 ModelConfig(18 model_id="Qwen/Qwen-Image",19 origin_file_pattern="vae/diffusion_pytorch_model.safetensors",20),21],22 tokenizer_config=None,23 processor_config=ModelConfig(24 model_id="Qwen/Qwen-Image-Edit",25 origin_file_pattern="processor/",26),27)2829pipe.load_lora(30 pipe.dit,31"qwen_image_edit_2511_gongbi_lora_v1.safetensors",32 alpha=1.0,33)3435prompt =(36"Convert the input image into traditional Chinese gongbi painting style, "37"preserving the original composition, subject details, and spatial structure."38)3940edit_image = Image.open("input.png").convert("RGB").resize((1024,1024))4142output = pipe(43 prompt,44 edit_image=edit_image,45 seed=123,46 num_inference_steps=40,47 height=1024,48 width=1024,49 zero_cond_t=True,50)5152output.save("output_gongbi.png")
Recommended Prompts
Portrait
Convert the input portrait into traditional Chinese gongbi figure painting style. Preserve facial identity, pose, clothing structure, hands, hair, and original composition. Use precise fine-line drawing, refined color layers, soft mineral pigments, and classical figure-painting elegance.
Landscape
Convert the input landscape into traditional Chinese gongbi landscape painting style. Preserve mountain shapes, water paths, trees, rocks, buildings if present, depth, and original composition. Use delicate outlines, fine texture strokes, layered ink washes, and elegant mineral color.
General
Convert the input image into traditional Chinese gongbi painting style, preserving the original composition, subject details, and spatial structure.
Recommended Inference Parameters
Parameter
Recommended Value
Notes
height / width
1024
Recommended default resolution
num_inference_steps
40
Balanced quality and speed
seed
123 or fixed seed
Useful for reproducible comparisons
zero_cond_t
True
Required for Qwen-Image-Edit-2511
LoRA alpha
1.0
Try 0.7–0.9 if the style is too strong
This LoRA is intended for image-to-image editing. It requires an input image through edit_image.
For best presentation, upload example images to this model card in the following format:
Input Image
LoRA Output
Optional Reference Target
Original portrait image
Generated gongbi-style portrait
Optional style reference
Original landscape image
Generated gongbi-style landscape
Optional style reference
If a reference target is shown, it should be clearly marked as a training or style-supervision reference, not as the model output.
Recommended examples:
Portrait: 0001_input.png → LoRA output
Landscape: 0204_input.png → LoRA output
Limitations
This LoRA may perform less reliably in the following cases:
Extremely blurry, overexposed, or low-resolution inputs
Very complex human hands, faces, or crowded group portraits
Extreme camera angles or heavily distorted perspective
Inputs with conflicting style prompts such as "anime", "oil painting", or "photorealistic"
Very wide or very tall aspect ratios far from the training distribution
For more stable results, use clear input images, keep the original composition simple, and use the portrait or landscape prompt that matches the subject type.
FAQ
Can I use this LoRA directly with diffusers?
No. This LoRA is trained in DiffSynth-Studio format and should be loaded with:
pipe.load_lora(pipe.dit, path)
It is not a standard diffusers load_lora_weights() adapter.
Why does the output look unchanged?
Make sure the LoRA is loaded into pipe.dit and that zero_cond_t=True is enabled during inference.
Why does the composition drift?
Check that zero_cond_t=True is enabled. Also avoid prompts that conflict with gongbi painting, such as anime, oil painting, or photorealistic style terms.
Is this a text-to-image LoRA?
No. This LoRA is intended for image-to-image editing. You must provide an input image through edit_image.
How much VRAM is recommended?
For 1024×1024 inference with bf16, around 24GB VRAM is recommended. CPU inference is not recommended.
Environment
The LoRA was tested in a DiffSynth-Studio based environment.
Recommended environment:
Component
Recommendation
Python
3.10+
DiffSynth-Studio
2.x
PyTorch
2.x
CUDA
12.x
GPU
Around 24GB VRAM recommended for 1024×1024 inference