Views
No views yet
Qwen/Qwen-Image-Edit-2511, with the
lightx2v/Qwen-Image-Edit-2511-Lightning 8-step LoRA pre-fused and then
fp8-quantized with torchao Float8DynamicActivationFloat8WeightConfig.1import torch
2from diffusers import QwenImageEditPlusPipeline, QwenImageTransformer2DModel
3
4# pickle (.bin) format — safetensors can't serialize torchao tensor subclasses,
5# so use_safetensors=False is REQUIRED.
6transformer = QwenImageTransformer2DModel.from_pretrained(
7 "reb82/qwen-image-edit-2511-lightning-fp8",
8 torch_dtype=torch.bfloat16, use_safetensors=False)
9
10# the text encoder / VAE / tokenizer / processor / scheduler come from the base repo
11pipe = QwenImageEditPlusPipeline.from_pretrained(
12 "Qwen/Qwen-Image-Edit-2511", transformer=transformer, torch_dtype=torch.bfloat16)
13pipe.to("cuda")
14img = pipe(image=src, prompt="…", true_cfg_scale=1.0, num_inference_steps=8).images[0]torchao installed (the weights are Float8Tensor subclasses).true_cfg_scale=1.0 (the LoRA is CFG-distilled).safe_serialization=False (PyTorch pickle) because safetensors cannot hold
torchao tensor subclasses. Load only from a source you trust.Qwen/Qwen-Image-Edit-2511 and lightx2v/Qwen-Image-Edit-2511-Lightning.