4-bit NF4 quantized version of
Qwen-Image-Edit-2511 using BitsAndBytes.
This quantized model significantly reduces VRAM requirements, making it accessible on consumer GPUs like RTX 3090/4080/4090.
1import torch
2from PIL import Image
3from diffusers import QwenImageEditPlusPipeline
4
5# Load quantized model
6pipe = QwenImageEditPlusPipeline.from_pretrained(
7 "seochan99/Qwen-Image-Edit-2511-bnb-nf4",
8 torch_dtype=torch.bfloat16,
9)
10pipe.to("cuda")
11
12# Single image editing
13image = Image.open("input.png")
14result = pipe(
15 image=[image],
16 prompt="Turn this into anime style",
17 true_cfg_scale=4.0,
18 negative_prompt=" ",
19 num_inference_steps=50,
20).images[0]
21result.save("output.png")
1img1 = Image.open("person.png")
2img2 = Image.open("background.png")
3
4result = pipe(
5 image=[img1, img2],
6 prompt="Person standing in the forest, natural lighting",
7 true_cfg_scale=4.0,
8 negative_prompt=" ",
9 num_inference_steps=50,
10).images[0]
Tested on NVIDIA RTX 4090.