4 bit (UINT4 with SVD rank 32) quantization of tencent/HunyuanImage-3.0 using SDNQ.

Usage:

pip install git+https://github.com/Disty0/sdnq
import torch
from transformers import AutoModelForCausalLM
from sdnq import SDNQConfig # import sdnq to register it into diffusers and transformers

model_id = "Disty0/HunyuanImage3-SDNQ-uint4-svd-r32"
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    attn_implementation="sdpa", # Use "flash_attention_2" if FlashAttention is installed
    trust_remote_code=True,
    torch_dtype=torch.bfloat16,
    device_map="auto",
    moe_impl="eager", # Use "flashinfer" if FlashInfer is installed
)
model.load_tokenizer(model_id)

# generate the image
prompt = "A brown and white dog is running on the grass"
image = model.generate_image(prompt=prompt, stream=True, diff_infer_steps=20)
image.save("hunyuan-image-3-sdnq-uint4-svd-r32.png")
Downloads last month
132
Safetensors
Model size
45B params
Tensor type
BF16
·
U8
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Disty0/HunyuanImage3-SDNQ-uint4-svd-r32

Quantized
(3)
this model

Collection including Disty0/HunyuanImage3-SDNQ-uint4-svd-r32