Qwen Image Lightning
Please refer to Qwen-Image-Lightning github to learn how to use the models.
Fuente del modelo
- Tipo
- Other
- Tamaño del archivo
- 810 MB–19,0 GB
- Modelo base
- Qwen/Qwen-Image
- Versión
- vRevision e74da8d
- Actualizado
- 5 oct 2026
- Publicador
- @lightx2v
- Descargas
- 331,8 mil
- Tareas
- Edición de imagen, Texto a imagen
- Fuente
- Hugging Face
Descripción de la fuente
Please refer to Qwen-Image-Lightning github to learn how to use the models.
use with diffusers 🧨:
make sure to install diffusers from main (pip install git+https://github.com/huggingface/diffusers.git)
from diffusers import DiffusionPipeline, FlowMatchEulerDiscreteScheduler
import torch
import math
# From https://github.com/ModelTC/Qwen-Image-Lightning/blob/342260e8f5468d2f24d084ce04f55e101007118b/generate_with_diffusers.py#L82C9-L97C10
scheduler_config = {
"base_image_seq_len": 256,
"base_shift": math.log(3), # We use shift=3 in distillation
"invert_sigmas": False,
"max_image_seq_len": 8192,
"max_shift": math.log(3), # We use shift=3 in distillation
"num_train_timesteps": 1000,
"shift": 1.0,
"shift_terminal": None, # set shift_terminal to None
"stochastic_sampling": False,
"time_shift_type": "exponential",
"use_beta_sigmas": False,
"use_dynamic_shifting": True,
"use_exponential_sigmas": False,
"use_karras_sigmas": False,
}
scheduler = FlowMatchEulerDiscreteScheduler.from_config(scheduler_config)
pipe = DiffusionPipeline.from_pretrained(
"Qwen/Qwen-Image", scheduler=scheduler, torch_dtype=torch.bfloat16
).to("cuda")
pipe.load_lora_weights(
"lightx2v/Qwen-Image-Lightning", weight_name="Qwen-Image-Lightning-8steps-V1.0.safetensors"
)
prompt = "a tiny astronaut hatching from an egg on the moon, Ultra HD, 4K, cinematic composition."
negative_prompt = " "
image = pipe(
prompt=prompt,
negative_prompt=negative_prompt,
width=1024,
height=1024,
num_inference_steps=8,
true_cfg_scale=1.0,
generator=torch.manual_seed(0),
).images[0]
image.save("qwen_fewsteps.png")
Recursos relacionados
40 conexiones
Recursos relacionados
40 conexionesFuentes
1 fuente
Fuentes
1 fuenteVerificado 5 oct
Artefactos del modelo
21 artefactos
Artefactos del modelo
21 artefactosQwen-Image-Edit-2509/qwen_image_edit_2509_fp8_e4m3fn_scaled.safetensors
safetensors · 19,0 GB · SHA-256 cc7a73527bd4…a001 · Hugging Face
DescargarQwen-Image-Edit-2509/Qwen-Image-Edit-2509-Lightning-4steps-V1.0-bf16.safetensors
safetensors · 810 MB · SHA-256 2a32ce938ec7…1377 · Hugging Face
DescargarQwen-Image-Edit-2509/Qwen-Image-Edit-2509-Lightning-4steps-V1.0-fp32.safetensors
safetensors · 1,58 GB · SHA-256 6065f62669c9…36b1 · Hugging Face
DescargarQwen-Image-Edit-2509/Qwen-Image-Edit-2509-Lightning-8steps-V1.0-bf16.safetensors
safetensors · 810 MB · SHA-256 b5c48ba90d22…7f72 · Hugging Face
DescargarQwen-Image-Edit-2509/Qwen-Image-Edit-2509-Lightning-8steps-V1.0-fp32.safetensors
safetensors · 1,58 GB · SHA-256 eece790fc6ac…e841 · Hugging Face
DescargarQwen-Image-Edit-Lightning-4steps-V1.0-bf16.safetensors
safetensors · 810 MB · SHA-256 d8132c32e7df…beb1 · Hugging Face
DescargarQwen-Image-Edit-Lightning-4steps-V1.0.safetensors
safetensors · 1,58 GB · SHA-256 e752ea1553f0…cc1b · Hugging Face
DescargarQwen-Image-Edit-Lightning-8steps-V1.0-bf16.safetensors
safetensors · 810 MB · SHA-256 36ee4ff86085…01b9 · Hugging Face
DescargarQwen-Image-Edit-Lightning-8steps-V1.0.safetensors
safetensors · 1,58 GB · SHA-256 5910104f8922…a826 · Hugging Face
DescargarQwen-Image-fp8-e4m3fn-Lightning-4steps-V1.0-bf16.safetensors
safetensors · 810 MB · SHA-256 11704ff6034a…442c · Hugging Face
DescargarQwen-Image-fp8-e4m3fn-Lightning-4steps-V1.0-fp32.safetensors
safetensors · 1,58 GB · SHA-256 a74d58821ed0…ec6b · Hugging Face
DescargarQwen-Image-Lightning-4steps-V1.0-bf16.safetensors
safetensors · 810 MB · SHA-256 3ac242b4ff22…8c84 · Hugging Face
DescargarQwen-Image-Lightning-4steps-V1.0.safetensors
safetensors · 1,58 GB · SHA-256 9526e90d71c4…c8b1 · Hugging Face
DescargarQwen-Image-Lightning-4steps-V2.0-bf16.safetensors
safetensors · 810 MB · SHA-256 3e43b9796143…67c5 · Hugging Face
DescargarQwen-Image-Lightning-4steps-V2.0.safetensors
safetensors · 1,58 GB · SHA-256 878c519b75aa…c228 · Hugging Face
DescargarQwen-Image-Lightning-8steps-V1.0.safetensors
safetensors · 1,58 GB · SHA-256 07b5a9998814…fff9 · Hugging Face
DescargarQwen-Image-Lightning-8steps-V1.1-bf16.safetensors
safetensors · 810 MB · SHA-256 fe04c3ec1dd4…79c8 · Hugging Face
DescargarQwen-Image-Lightning-8steps-V1.1.safetensors
safetensors · 1,58 GB · SHA-256 c5f33b60c0e3…a508 · Hugging Face
DescargarQwen-Image-Lightning-8steps-V2.0-bf16.safetensors
safetensors · 810 MB · SHA-256 5bdbf6991228…57ee · Hugging Face
DescargarQwen-Image-Lightning-8steps-V2.0.safetensors
safetensors · 1,58 GB · SHA-256 f4f5b6607939…3d56 · Hugging Face
DescargarQwen-Image/qwen_image_fp8_e4m3fn_scaled.safetensors
safetensors · 19,0 GB · SHA-256 0b4ecbb63b40…7bae · Hugging Face
DescargarExtractos de fuentes
3 extractos
Extractos de fuentes
3 extractos--- license: apache-2.0 language: - en - zh base_model: - Qwen/Qwen-Image pipeline_tag: text-to-image tags: - Qwen-Image - distillation - LoRA - lora library_name: diffusers --- Please refer to [Qwen-Image-Lightning github](https://github.com/ModelTC/Qwen-Image-Lightning/) to learn how to use the models. use with diffusers 🧨: make sure to install diffusers from `main` (`pip install git+https://github.com/huggingface/diffusers.git`) ``` from diffusers import DiffusionPipeline, FlowMatchEulerDiscreteScheduler import torch import math # From https://github.com/ModelTC/Qwen-Image-Lightning/blob/342260e8f5468d2f24d084ce04f55e101007118b/generate_with_diffusers.py#L82C9-L97C10 scheduler_config = { "base_image_seq_len": 256, "base_shift": math.log(3), # We use shift=3 in distillation "invert_sigmas": False, "max_image_seq_len": 8192, "max_shift": math.log(3), # We use shift=3 in distillation "num_train_timesteps": 1000, "shift": 1.0, "shift_terminal": None, # set shift_terminal to None "stochastic_sampling": False, "time_shift_type": "exponential", "use_beta_sigmas": False, "use_dynamic_shifting": True, "use_exponential_sigmas": False, "use_karras_sigmas": False, } scheduler = FlowMatchEulerDiscreteScheduler.from_config(scheduler_config) pipe = DiffusionPipeline.from_pretrained( "Qwen/Qwen-Image", scheduler=scheduler, torch_dtype=torch.bfloat16 ).to("cuda") pipe.load_lora_weights( "lightx2v/Qwen-Image-Lightning", weight_name="Qwen-Image-Lightning-8steps-V1.0.safetensors" ) prompt = "a tiny astronaut hatching from an egg on the moon, Ultra HD, 4K, cinematic composition." negative_prompt = " " image = pipe( prompt=prompt, negative_prompt=negative_prompt, width=1024, height=1024, num_inference_steps=8, true_cfg_scale=1.0, generator=torch.manual_seed(0), ).images[0] image.save("qwen_fewsteps.png") ```
Source context: 331759 downloads · 835 likes · Pipeline text-to-image · Library diffusers · Repo lightx2v/Qwen-Image-Lightning
Source context: 396109 downloads · 811 likes · Pipeline text-to-image · Library diffusers · Repo lightx2v/Qwen-Image-Lightning
