Downloads · 30 days
0
shauray/svdquant-whl
svdquant-whl is a machine learning model from shauray. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
Python package for Nunchaku - post-training quantization with 4-bit weights and activations.
Downloads · 30 days
0
Access
Public
Updated Dec 23, 2024
Repo size
181 MB
Likes
0
Public
Click a slice to open those files.
.whl179 MB · 99%
From the Hugging Face model README
Python package for Nunchaku - post-training quantization with 4-bit weights and activations.
pip install nunchaku-0.0.2b0-cp311-cp311-linux_x86_64.whl
import torch
from diffusers import FluxPipeline
from nunchaku.models.transformer_flux import NunchakuFluxTransformer2dModel
transformer = NunchakuFluxTransformer2dModel.from_pretrained("mit-han-lab/svdq-int4-flux.1-schnell")
pipeline = FluxPipeline.from_pretrained(
"black-forest-labs/FLUX.1-schnell", transformer=transformer, torch_dtype=torch.bfloat16
).to("cuda")
image = pipeline("A cat holding a sign that says hello world", num_inference_steps=4, guidance_scale=0).images[0]
image.save("example.png")
refer to https://github.com/mit-han-lab/nunchaku for move details, this is not an official release of the pkg