加载中…
加载中…
Qwen/Qwen-Image-2.1One LoRA for text-to-image generation and image editing. Built with Qwen.
ChatR Labs Uncensored Omni LoRA v0.1 is an experimental rank-128 adapter fine-tuned from Qwen/Qwen-Image-2.1. Create images from text or transform existing images with natural-language instructions, using one adapter for both workflows.
The download contains LoRA weights only. Load it on top of the original Qwen-Image-2.1 base model; the transformer, text encoder, processor, and VAE are downloaded separately from the base repository.
No account is required. Choose Text to Image or Image Editing, enter a prompt, and generate. The editing interface accepts one to three reference images. Requests share a queue.
| File | Format | Size | Use |
|---|---|---|---|
| chatrlabs-omni-lora-v0.1-bf16.safetensors | BF16, Diffusers/PEFT keys | 671 MB | Text-to-image and image editing |
File integrity information is in SHA256SUMS. This release contains a BF16 adapter, without merged base weights or GGUF/FP8 variants.
| Setting | Starting value |
|---|---|
| Base model | Qwen/Qwen-Image-2.1 |
| LoRA strength | 1.0 |
| Sampling steps | 35 |
| True CFG scale | 5.0 |
| Negative prompt | A single space: " " |
| Output resolution | Approximately 1 megapixel; e.g. 1024 × 1024 |
| KV cache | Enabled |
These are the settings used to evaluate this adapter. In the tested Diffusers pipeline, an omitted or empty negative prompt disables true CFG even when true_cfg_scale is greater than 1. Use a single space if you do not need a specific negative prompt.
The adapter is trained for Qwen-Image-2.1. Earlier Qwen-Image, Qwen-Image-2512, and Qwen-Image-Edit-2511 have different architectures and are not compatible bases. This is a regular LoRA; it does not provide few-step distillation.
Install a CUDA-compatible PyTorch build for your system, then install the dependencies in requirements.txt:
pip install -r requirements.txt
The requirements pin the Diffusers revision used by the Playground, including QwenImage21Pipeline, together with its tested Transformers, PEFT, and Accelerate versions. The deployment uses PyTorch 2.11.0 with CUDA 12.8.
import torch
from diffusers import QwenImage21Pipeline
pipe = QwenImage21Pipeline.from_pretrained(
"Qwen/Qwen-Image-2.1",
torch_dtype=torch.bfloat16,
)
pipe.load_lora_weights(
"chatrlabs/Qwen-Image-2.1-Uncensored-Omni-LoRA-v0.1",
weight_name="chatrlabs-omni-lora-v0.1-bf16.safetensors",
adapter_name="omni",
)
pipe.set_adapters("omni", adapter_weights=1.0)
# CPU offload reduces GPU residency; it needs sufficient system RAM.
pipe.enable_model_cpu_offload()
# Keep VAE tiling off: tiled decoding adds visible vertical colour streaks.
# With sufficient VRAM, replace CPU offload with pipe.to("cuda").
image = pipe(
prompt="A blue ceramic mug on a wooden table by a window, soft morning light, product photography",
negative_prompt=" ",
width=1024,
height=1024,
num_inference_steps=35,
true_cfg_scale=5.0,
use_kv_cache=True,
generator=torch.Generator("cuda").manual_seed(42),
).images[0]
image.save("generated.png")
Use the same loaded pipeline and pass reference images alongside the instruction:
from PIL import Image
reference = Image.open("generated.png").convert("RGBA")
image = pipe(
image=[reference],
prompt="Change the mug to green, keep everything else unchanged",
negative_prompt=" ",
width=1024,
height=1024,
output_resolution=1024,
num_inference_steps=35,
true_cfg_scale=5.0,
use_kv_cache=True,
generator=torch.Generator("cuda").manual_seed(45),
).images[0]
image.save("edited.png")
For multiple references, pass a list of PIL images. The Playground has been exercised with one and three references. More references increase memory requirements.
A command-line version of these examples is available in inference.py:
python inference.py --prompt "A blue ceramic mug on a wooden table" --output generated.png
python inference.py --image generated.png --prompt "Change the mug to green" --output edited.png
We compared both public checkpoints from this training run with the original Qwen-Image-2.1 base model, using the same prompts, seed and settings (35 steps, CFG 5.0). This repository is step 32,000. Scores are 0–100, higher is better, ± one standard error.
| Benchmark | Base | Step 32,000 (LoRA v0.1) | Step 90,000 (Quantized) |
|---|---|---|---|
| Adult prompt adherence (960 images) | 85.1 ± 0.9 | 87.4 ± 0.8 | 89.7 ± 0.7 |
| Anatomy (960 images) | 70.3 ± 1.4 | 67.7 ± 1.4 | 69.4 ± 1.4 |
| General SFW prompts (300 PartiPrompts) | 79.8 ± 2.0 | 75.8 ± 2.2 | 79.6 ± 2.0 |
Scores come from AI judges (Qwen3.8-27B for adherence, Gemma 4 31B for anatomy) on a held-out test set that does not overlap the training data. See BENCHMARK.md for per-caption-length and per-category results, the exact judge questions, and limitations.
The small adapter download does not reflect the full base model's memory requirements. Use CPU offload or a suitable multi-GPU setup when the complete BF16 pipeline does not fit on one GPU.
Our Playground uses two RTX 4090 24 GB GPUs with the BF16 pipeline split across them. Both GPUs serve one request together; simultaneous requests are queued. Observed server-side times after model loading, measured at 25 steps and CFG 4.0 (the previous recommendation; expect roughly 1.4x at the current 35 steps):
| Task | Output size | Time |
|---|---|---|
| Text to image | 1344 × 768 | 33.2 s |
| Editing with one reference | 1024 × 1024 | 38.4 s |
| Editing with three reference inputs | 1024 × 1024 | 50.5 s |
These are individual deployment checks, not comparative quality benchmarks. The three-reference check used the same source image in all three slots. Timing depends on the prompt, input images, hardware, and execution path; the CPU-offload example above does not reproduce this custom GPU split.
| Property | Value |
|---|---|
| Base | Qwen-Image-2.1 |
| Training checkpoint | Step 32,000 (about 1.75 of 8 planned epochs; 18,303 steps per epoch) |
| Training items recorded in checkpoint | 585,643 |
| Training resolution | 1024 × 1024, aspect-ratio bucketing enabled |
| Rank / original alpha | 128 / 128 |
| Adapted modules | 224 modules across 32 transformer blocks |
| Targets | Attention to_q, to_k, to_v, to_out.0; MLP proj, gate_layer, out |
| Published tensors | 448, BF16 |
| Training module | networks.lora_qwen_image_21 |
| Export | Kohya-style BF16 weights converted to Diffusers/PEFT keys; alpha/rank (1.0) folded into lora_B |
The training dataset is not included in this release. Checkpoint statistics above come from the embedded training metadata. See Benchmark for quality measurements.
The adapter and example inference code do not add a prompt filter or output safety checker. The name describes the intended release, rather than a guarantee that every requested concept will be rendered. Results depend on the base model, adapter, prompt, and the application running them.
790c92633540aa0cb11d9abf19eb46d86171475880c7ed262aeffbeb43ef13ae04baeb9b84515a69Built with Qwen. This is a community fine-tune by ChatR Labs, independent of the upstream Qwen team.
GPU compute used for the development and evaluation of Omni v0.1 was provided by Chatr AI.
We thank the Chatr AI team for supporting this research release.