SDNQ
Collection
Models quantized with SDNQ
•
17 items
•
Updated
•
2
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")
Base model
tencent/HunyuanImage-3.0