Qwen-Image-2.1-Uncensored-Omni-Quantized

chatrlabs/Qwen-Image-2.1-Uncensored-Omni-Quantized

作者
chatrlabs
任务
图像生成
下载量
3,606
点赞数
29
趋势分
29
许可证
other
收录时间
2026/11/7

license: other license_name: qwen-research license_link: LICENSE base_model:

  • Qwen/Qwen-Image-2.1 base_model_relation: quantized pipeline_tag: text-to-image library_name: diffusers tags:
  • qwen-image
  • qwen-image-2.1
  • text-to-image
  • image-editing
  • gguf
  • fp8
  • int8
  • nvfp4
  • nf4
  • quantized
  • comfyui
  • diffusers
  • uncensored

ChatR Labs Uncensored Omni — Quantized

Try the Playground Base model

Quantized builds at adapter weight 1.0, for text-to-image generation and image editing.

This repository ships quantized transformer weights only. The model is our rank-128 Omni adapter merged into Qwen/Qwen-Image-2.1 at LoRA strength 1.0, then quantized. The text encoder, processor and VAE are not included; take them from the base repository.

Download

FileFormatLayoutSizeRuntime
qwen-image-2.1-step90000-BF16.ggufGGUF BF1629714.23 GBComfyUI, Diffusers
qwen-image-2.1-step90000-Q8_0.ggufGGUF Q8_02977.69 GBComfyUI, Diffusers
qwen-image-2.1-step90000-Q6_K.ggufGGUF Q6_K2976.00 GBComfyUI, Diffusers
qwen-image-2.1-step90000-Q5_K_M.ggufGGUF Q5_K_M2975.21 GBComfyUI, Diffusers
qwen-image-2.1-step90000-Q4_K_M.ggufGGUF Q4_K_M2974.47 GBComfyUI, Diffusers
qwen-image-2.1-step90000-Q4_0.ggufGGUF Q4_02974.20 GBComfyUI, Diffusers
qwen-image-2.1-step90000-FP8-comfy.safetensorsFP8 E4M32657.12 GBComfyUI only
qwen-image-2.1-step90000-INT8-ConvRot-comfy.safetensorsINT8 ConvRot2657.26 GBComfyUI only
qwen-image-2.1-step90000-NVFP4-comfy.safetensorsNVFP42654.20 GBComfyUI only
qwen-image-2.1-step90000-FP8-torchao/FP8 (torchao)2977.12 GBDiffusers only
qwen-image-2.1-step90000-NF4-bnb/NF4 (bitsandbytes)2973.67 GBDiffusers only
qwen-image-2.1-step90000-INT8-bnb/INT8 (bitsandbytes)2977.12 GBDiffusers only
qwen-image-2.1-step90000-BF16/BF16 safetensors29714.23 GBDiffusers only

File integrity information is in SHA256SUMS.

Which build should I use?

  • ComfyUI, one file, both workflows -> any GGUF. It also loads in Diffusers via from_single_file.
  • ComfyUI, native quant ops -> FP8, INT8 ConvRot or NVFP4.
  • Diffusers, smallest download -> NF4 (needs bitsandbytes).
  • Diffusers, best fidelity -> FP8 (torchao) (needs torchao).
  • Maximum fidelity overall -> BF16 GGUF, BF16 safetensors or Q8_0.
  • Diffusers without the gguf package -> the BF16 folder (plain from_pretrained).

The 297 and 265 layouts are not interchangeable. 265 uses the fused img_mlp.gate_up projection ComfyUI expects; 297 keeps the separate gate_layer / proj pair Diffusers expects. Loading a 265 file in Diffusers, or a 297 Diffusers-layout file through ComfyUI's native loader, will fail.

Recommended settings

These are the values from our inference grid search for the non-distilled model.

SettingStarting value
Base componentsText encoder, processor and VAE from Qwen/Qwen-Image-2.1
Sampling steps35
True CFG scale5.0 (both text-to-image and editing)
Samplerer_sde with the simple scheduler (ComfyUI)
Negative promptA single space: " "
Output resolution768 x 1152 or 1024 x 1024
KV cacheEnabled

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. This is a regular LoRA merge; it does not provide few-step distillation.

Usage with ComfyUI

ComfyUI/models/
|-- diffusion_models/    qwen-image-2.1-step90000-Q5_K_M.gguf
|-- text_encoders/       <Qwen-Image-2.1 text encoder>
`-- vae/                 <Qwen-Image-2.1 VAE>
  • GGUF: Unet Loader (GGUF) -> pick the file. Works for both text-to-image and editing.
  • Comfy native: Load Diffusion Model -> pick a -comfy.safetensors file.
  • Editing: encode the reference image with Text Encoder (Qwen-Image) in edit mode; the latent comes from that node.
  • Sampler: er_sde, scheduler simple, 35 steps, CFG 5.0.

Usage with Diffusers

GGUF

import torch
from diffusers import QwenImage21Pipeline, QwenImage21Transformer2DModel, GGUFQuantizationConfig

transformer = QwenImage21Transformer2DModel.from_single_file(
    "qwen-image-2.1-step90000-Q5_K_M.gguf",
    quantization_config=GGUFQuantizationConfig(compute_dtype=torch.bfloat16),
    config="Qwen/Qwen-Image-2.1",
    subfolder="transformer",
    torch_dtype=torch.bfloat16,
)
pipe = QwenImage21Pipeline.from_pretrained(
    "Qwen/Qwen-Image-2.1", transformer=transformer, torch_dtype=torch.bfloat16,
)
pipe.enable_model_cpu_offload()

FP8 / NF4 / INT8 folders

import torch
from diffusers import QwenImage21Pipeline, QwenImage21Transformer2DModel

transformer = QwenImage21Transformer2DModel.from_pretrained(
    "chatrlabs/Qwen-Image-2.1-Uncensored-Omni-Quantized",
    subfolder="qwen-image-2.1-step90000-FP8-torchao",
    torch_dtype=torch.bfloat16,
)
pipe = QwenImage21Pipeline.from_pretrained(
    "Qwen/Qwen-Image-2.1", transformer=transformer, torch_dtype=torch.bfloat16,
)

The INT8 build stores its non-quantized tensors in FP16, so load both the transformer and the pipeline with torch_dtype=torch.float16.

Text to image

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")

Image editing

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")

Keep VAE tiling off: tiled decoding adds visible vertical colour streaks.

Memory and performance

Measured on a single RTX 5090 (32 GB), 35 steps, er_sde, 768 x 1152:

BuildPeak VRAMTime per image (text to image)Time per image (edit)
BF16~14 GB~28 s~32 s
Q5_K_M~8 GB~28 s~32 s
NVFP4~4 GB~30 s~34 s

Editing and ControlNet runs add reference and control latents; budget a few GB more. The BF16 pipeline does not fit comfortably beside a full text encoder on a 24 GB card - use CPU offload there.

These are individual timings, not comparative quality benchmarks.

Quantization details

PropertyValue
BaseQwen-Image-2.1
AdapterChatR Labs rank-128 Omni LoRA, merged at strength 1.0
Training checkpointStep 90000
Adapted modules224
Diffusers-layout tensors297
Comfy-layout tensors265
GGUF toolComfyUI-GGUF convert.py, per-block quantization
Comfy FP8TensorCoreFP8E4M3Layout, per-tensor scale, 229 modules
Comfy INT8 ConvRotconvrot, group size 256, 224 modules
Comfy NVFP4TensorCoreNVFP4Layout, 192 fused modules
Diffusers FP8torchao Float8WeightOnlyConfig, per-row scale
Diffusers NF4bitsandbytes 4-bit NF4 with double quantization
Diffusers INT8bitsandbytes 8-bit

The text encoder and VAE are untouched in every build; differences between builds come from the transformer only.

About "uncensored"

The checkpoints and example code do not add a prompt filter or output safety checker. The name describes the intended release, not a guarantee that every requested concept will be rendered. Results depend on the prompt, the build you load, and the application running it.

Source and license

  • Released by: ChatR Labs
  • Base model: Qwen/Qwen-Image-2.1
  • Modification: ChatR Labs merged a rank-128 adapter into the base transformer at strength 1.0 and produced GGUF, FP8, INT8, NVFP4 and NF4 builds. This repository distributes quantized transformer weights only.
  • License: Qwen Research License Agreement. Use is limited to non-commercial research and evaluation unless separately licensed by the upstream rights holder.
  • Checksums: SHA256SUMS

Built with Qwen. This is a community fine-tune by ChatR Labs, independent of the upstream Qwen team.

Infrastructure Support

GPU compute used for the development and evaluation of this release was provided by Chatr AI.

We thank the Chatr AI team for supporting this research release.

内容来源:Hugging Face 模型卡

在 Hugging Face 查看