Quantized weights we publish
Collection
FP8, INT8, NF4 and precision-cast variants of open models. Each card says exactly which tensors changed and which were left alone. • 16 items • Updated
How to use wavespeed/Qwen-Image-Edit-l8v1.1-e4m3 with Diffusers:
pip install -U diffusers transformers accelerate
import torch
from diffusers import DiffusionPipeline
from diffusers.utils import load_image
# switch to "mps" for apple devices
pipe = DiffusionPipeline.from_pretrained("Qwen/Qwen-Image-Edit,lightx2v/Qwen-Image-Lightning", dtype=torch.bfloat16, device_map="cuda")
pipe.load_lora_weights("wavespeed/Qwen-Image-Edit-l8v1.1-e4m3")
prompt = "Turn this cat into a dog"
input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png")
image = pipe(image=input_image, prompt=prompt).images[0]Qwen-Image-Edit with the
Qwen-Image-Lightning 8-step V1.1
LoRA fused into the transformer, then quantized to FP8 (e4m3). Saved as a
complete QwenImageEditPipeline.
l8v1.1 in the repo name is Lightning, 8 steps, V1.1.
Qwen-Image-Lightning-8steps-V1.1.safetensors is loaded as a LoRA, fused
into the base transformer, and unloaded — so the published weights carry the
step distillation directly and no LoRA is needed at inference.e4m3_e4m3_dynamic
(float8_e4m3fn weights, dynamically scaled float8_e4m3fn activations).The Qwen2.5-VL text encoder, the processor and the VAE are untouched and stay
in bf16. Weights are pickled .bin shards, so loading requires
use_safetensors=False.
Run it at roughly 8 steps with CFG off — that is what the fused LoRA was distilled for. Running it at 40 steps like the undistilled model wastes compute and does not improve the result.
import torch
from diffusers import QwenImageEditPipeline
from diffusers.utils import load_image
pipe = QwenImageEditPipeline.from_pretrained(
"wavespeed/Qwen-Image-Edit-l8v1.1-e4m3",
torch_dtype=torch.bfloat16,
use_safetensors=False,
).to("cuda")
out = pipe(
image=load_image("input.png"),
prompt="replace the sky with a clear night sky",
num_inference_steps=8,
true_cfg_scale=1.0,
).images[0]
Apache-2.0. Both Qwen-Image-Edit and Qwen-Image-Lightning are Apache-2.0.
Base model
Qwen/Qwen-Image-Edit