Instructions to use lightx2v/Qwen-Image-2.1-Lightning with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use lightx2v/Qwen-Image-2.1-Lightning with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Qwen/Qwen-Image-2.1", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("lightx2v/Qwen-Image-2.1-Lightning") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
can you support comfyui lora
comfy thx
the pytorch_lora_weights.safetensors works in comfy as it is. you should go to around 0.5 strenght and feed a manual linear sigmas curve into a adv. custom sampler
the pytorch_lora_weights.safetensors works in comfy as it is. you should go to around 0.5 strenght and feed a manual linear sigmas curve into a adv. custom sampler
I tested a weight of 0.5 in ComfyUI and it was indeed good, though I set the steps to 8.
strengh 1 is needed when you need texts. This lora has bad offset and prompt following
We applied a shift during training and have updated the README example accordingly.
Thanks for the reply, can you give us a comfyui workflow. comfyui seems does not have that config.
pipe.scheduler = FlowMatchEulerDiscreteScheduler.from_config(
pipe.scheduler.config,
num_train_timesteps=1000,
use_dynamic_shifting=True,
time_shift_type="exponential",
base_image_seq_len=256,
max_image_seq_len=8192,
base_shift=0.5,
max_shift=0.9,
shift_terminal=None,
)
Nice to have a 4 steps lora.
i'm using the official turbo checkpoint.
Can have sth to test tonight.,
Nice. thanks.,