Instructions to use lightx2v/Qwen-Image-Lightning with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use lightx2v/Qwen-Image-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", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("lightx2v/Qwen-Image-Lightning") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- Draw Things
- DiffusionBee
Cannot use torch.compile with that LoRA
#5
by NielsGx - opened
When I try to use torch.compile with that LoRA, it fails complaining about recompilation limits reached.
Could it be caused by a lack of VRAM (and this being FP32) ?
Or could be an issue of ComfyUI with Qwen-Image and LoRA for it in general...
I opened issues:
ComfyUI: https://github.com/comfyanonymous/ComfyUI/issues/9289
KJ Nodes: https://github.com/kijai/ComfyUI-KJNodes/issues/363
EDIT: I tried to resave this lora as BF16 (except the INT64 parts ofc), and same issue
This was resolved by updating to PyTorch nightly
NielsGx changed discussion status to closed