Qwen-Image-2.1-TurTurbo

136 downloads 0 likes on ModelScope updated

Model card

Qwen-Image-2.1 Distillation-Accelerated LoRA

This model is trained using OPD (On-Policy Distillation) distillation acceleration based on DiffSynth-Studio, providing inference acceleration for Qwen-Image-2.1 and Qwen-Image-2.1-Turbo.

Showcase

Turbo-T2I-3steps: A 3-step accelerated LoRA based on Qwen-Image-2.1-Turbo. The model has undergone secondary distillation, resulting in very fast inference speed.

Turbo-T2I-3steps (3 steps) Qwen-Image-2.1-Turbo (3 steps) Qwen-Image-2.1-Turbo (8 steps)
Example 1: Complex composition
Example 2: Text rendering
Example 3: Transparent background

T2I-8steps: An 8-step accelerated LoRA based on Qwen-Image-2.1. Compared with Qwen-Image-2.1-Turbo, this model spends more time in the low-noise stage, tending to generate more details, but this can sometimes make the composition look a bit cluttered.

T2I-8steps (8 steps) Qwen-Image-2.1 (8 steps) Qwen-Image-2.1-Turbo (8 steps) Qwen-Image-2.1 (50 steps)
Example 1: Complex composition
Example 2: Text rendering
Example 3: Transparent background
Prompts
  • Anime style. A sweet, innocent anime girl sits on a park bench, smiling directly at the viewer. She is holding a black camera and wearing a pink T-shirt pinned with a red heart-shaped brooch, paired with a white tennis skirt. Her hair is styled in twin tails, adorned with a colorful flower crown, and she wears a silver necklace along with a light blue wristband. Beside her rests a cardboard box containing a soccer ball, with a little orange kitten standing right on top of it. The warm glow of the setting sun illuminates her face against a backdrop of vibrant sunset clouds, while a yellow ginkgo tree stands in the park behind her. The entire scene is beautifully illustrated in a bright, anime art style.
  • A cinematic movie poster featuring a breathtaking, wide-angle landscape. The background showcases a vast, crystal-clear azure sky stretching upward, dotted with soft, volumetric white cumulus clouds drifting gently. Below the sky rises a majestic range of towering snow-capped mountains, their jagged peaks gleaming bright white against the deep blue atmosphere, rendered with crisp, photorealistic detail and dramatic lighting. In the center foreground, a magnificent eagle soars dynamically through the air, its wings fully extended in mid-flight, feathers catching the sunlight as it glides effortlessly above the alpine scenery. The composition evokes a sense of epic scale, freedom, and adventure, styled like a high-budget Hollywood blockbuster poster. At the bottom of the image, elegantly integrated into the lower third over the mountain base or sky gradient, is the text "DiffSynth-Studio". The typography is bold, modern, and cinematic, using a clean sans-serif font in crisp white or metallic silver, ensuring high legibility and a professional film-title aesthetic.
  • A cute, minimalist 2D vector illustration of a small teddy bear standing happily. Flat colors, smooth clean lines, simple geometric shapes, pastel brown and cream color palette. The bear has a sweet smile, rosy cheeks, and a tiny heart shape on its belly. Flat vector illustration style, clean lines, vibrant colors. PNG format, completely transparent background, no background elements, isolated subject.

Inference Code

Install DiffSynth-Studio:

git clone https://github.com/modelscope/DiffSynth-Studio.git
cd DiffSynth-Studio
pip install -e .

3-step accelerated LoRA for Qwen-Image-2.1-Turbo:

from diffsynth.pipelines.qwen_image_21 import QwenImage21Pipeline, ModelConfig
import torch

pipe = QwenImage21Pipeline.from_pretrained(
    torch_dtype=torch.bfloat16,
    device="cuda",
    model_configs=[
        ModelConfig(model_id="Qwen/Qwen-Image-2.1-Turbo", origin_file_pattern="transformer/diffusion_pytorch_model*.safetensors"),
        ModelConfig(model_id="Qwen/Qwen-Image-2.1", origin_file_pattern="text_encoder/model*.safetensors"),
        ModelConfig(model_id="Qwen/Qwen-Image-2.1", origin_file_pattern="vae/diffusion_pytorch_model*.safetensors"),
    ],
    processor_config=ModelConfig(model_id="Qwen/Qwen-Image-2.1", origin_file_pattern="processor/"),
)
pipe.load_lora(pipe.dit, ModelConfig(model_id="DiffSynth-Studio/Qwen-Image-2.1-TurTurbo", origin_file_pattern="Turbo-T2I-3steps.safetensors"))
prompt = "Anime style. A sweet, innocent anime girl sits on a park bench, smiling directly at the viewer. She is holding a black camera and wearing a pink T-shirt pinned with a red heart-shaped brooch, paired with a white tennis skirt. Her hair is styled in twin tails, adorned with a colorful flower crown, and she wears a silver necklace along with a light blue wristband. Beside her rests a cardboard box containing a soccer ball, with a little orange kitten standing right on top of it. The warm glow of the setting sun illuminates her face against a backdrop of vibrant sunset clouds, while a yellow ginkgo tree stands in the park behind her. The entire scene is beautifully illustrated in a bright, anime art style."
image = pipe(prompt, seed=0, sigmas=[1.0, 0.845148, 0.414568])
image.save("image.png")

8-step accelerated LoRA for Qwen-Image-2.1:

from diffsynth.pipelines.qwen_image_21 import QwenImage21Pipeline, ModelConfig
import torch

pipe = QwenImage21Pipeline.from_pretrained(
    torch_dtype=torch.bfloat16,
    device="cuda",
    model_configs=[
        ModelConfig(model_id="Qwen/Qwen-Image-2.1", origin_file_pattern="transformer/diffusion_pytorch_model*.safetensors"),
        ModelConfig(model_id="Qwen/Qwen-Image-2.1", origin_file_pattern="text_encoder/model*.safetensors"),
        ModelConfig(model_id="Qwen/Qwen-Image-2.1", origin_file_pattern="vae/diffusion_pytorch_model*.safetensors"),
    ],
    processor_config=ModelConfig(model_id="Qwen/Qwen-Image-2.1", origin_file_pattern="processor/"),
)
pipe.load_lora(pipe.dit, ModelConfig(model_id="DiffSynth-Studio/Qwen-Image-2.1-TurTurbo", origin_file_pattern="T2I-8steps.safetensors"))
prompt = "Anime style. A sweet, innocent anime girl sits on a park bench, smiling directly at the viewer. She is holding a black camera and wearing a pink T-shirt pinned with a red heart-shaped brooch, paired with a white tennis skirt. Her hair is styled in twin tails, adorned with a colorful flower crown, and she wears a silver necklace along with a light blue wristband. Beside her rests a cardboard box containing a soccer ball, with a little orange kitten standing right on top of it. The warm glow of the setting sun illuminates her face against a backdrop of vibrant sunset clouds, while a yellow ginkgo tree stands in the park behind her. The entire scene is beautifully illustrated in a bright, anime art style."
image = pipe(prompt, seed=0, num_inference_steps=8)
image.save("image.png")

The training code is also released. Please refer to our documents.