Qwen Image Edit - AIOs / Compression
Collection
Collection of FP8 compression techniques, DiffusersβTransformers converted weights, and more for QIE. β’ 9 items β’ Updated β’ 1
Run prithivMLmods/Qwen-Image-Edit-Rapid-AIO-V4 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Use HF Jobs to fine-tune https://huggingface.co/prithivMLmods/Qwen-Image-Edit-Rapid-AIO-V4. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Use HF Jobs to run batch inference with https://huggingface.co/prithivMLmods/Qwen-Image-Edit-Rapid-AIO-V4 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
How to use prithivMLmods/Qwen-Image-Edit-Rapid-AIO-V4 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("prithivMLmods/Qwen-Image-Edit-Rapid-AIO-V4", dtype=torch.bfloat16, device_map="cuda")
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]Diffusers-compatible transformer weights extracted from Phr00t/Qwen-Image-Edit-Rapid-AIO-V4 for 4-step accelerated Qwen Image Edit inference.
pip install -U torch transformers diffusers
import torch
from diffusers.models import QwenImageTransformer2DModel
from diffusers import QwenImageEditPlusPipeline
from diffusers.utils import load_image
transformer = QwenImageTransformer2DModel.from_pretrained(
"prithivMLmods/Qwen-Image-Edit-Rapid-AIO-V4",
torch_dtype=torch.bfloat16
)
pipeline = QwenImageEditPlusPipeline.from_pretrained(
"Qwen/Qwen-Image-Edit-2511", # (or) 2509
transformer=transformer,
torch_dtype=torch.bfloat16
)
pipeline.to("cuda")
image1 = load_image("grumpycat.png")
prompt = "turn the cat into an orange cat"
inputs = {
"image": [image1],
"prompt": prompt,
"generator": torch.manual_seed(42),
"true_cfg_scale": 1.0,
"negative_prompt": " ",
"num_inference_steps": 4,
"guidance_scale": 1.0,
"num_images_per_prompt": 1,
}
output = pipeline(**inputs)
output_image = output.images[0]
output_image.save("output_image_edit_plus.png")
Base model
Qwen/Qwen-Image-Edit-2511