tonera/Nepotism_xii-Nunchaku
Model Card (SVDQuant · Nepotism_xii)
Language: English | 中文
Model name
- Model repo:
tonera/Nepotism_xii-Nunchaku - Source checkpoint (full-precision): Nepotism on Civitai — this quantization is derived from the XII (and Flux.1 D family) release; licensing and usage are also subject to upstream terms and Civitai’s policies.
- Full Diffusers layout (VAE, text encoders, scheduler, etc.):
{REPO_ID} - Quantized Transformer weights (for Nunchaku):
{REPO_ID}/svdq-fp4_r32-Nepotism_xii-Nunchaku.safetensors{REPO_ID}/svdq-int4_r32-Nepotism_xii-Nunchaku.safetensors
Quantization / inference
- Inference engine: Nunchaku (
https://github.com/nunchaku-ai/nunchaku)
Nunchaku targets 4-bit (FP4/INT4) inference to reduce VRAM and latency while preserving quality. The svdq-*_r32-Nepotism_xii-Nunchaku.safetensors files in this repo are SVDQuant-quantized Flux Transformer weights and should be used with FluxPipeline on supported setups.
Install Nunchaku first
- Official install docs (recommended):
https://nunchaku.tech/docs/nunchaku/installation/installation.html
(Recommended) Prebuilt wheel
- Prerequisite: Use a
PyTorchversion that matches the Nunchaku release notes (newer is often better). - Install: Pick a wheel for your Python, CUDA, and PyTorch from GitHub Releases / Hugging Face / ModelScope, e.g.:
# Example — replace with the correct wheel URL for your torch/cuda/python
pip install https://github.com/nunchaku-ai/nunchaku/releases/download/vX.Y.Z/nunchaku-X.Y.Z+torch2.9-cp311-cp311-linux_x86_64.whl- Tip (RTX 50 series): When supported by Nunchaku, FP4 weights often give better compatibility and speed (see Nunchaku docs).
Quality reference (N=25 samples)
Summary metrics (higher is generally closer to reference for PSNR/SSIM; lower LPIPS is better).
FP4
INT4
Usage (Diffusers + Nunchaku Flux Transformer)
Set REPO_ID to your Hugging Face repo id or local root. Load the `svdq-{precision}_r32-Nepotism_xii-Nunchaku.safetensors` transformer and the full pipeline from `{REPO_ID}` (alongside model_index.json, transformer/, vae/, etc.).
import torch
from diffusers import FluxPipeline
from nunchaku import NunchakuFluxTransformer2dModel
from nunchaku.utils import get_precision
REPO_ID = "tonera/Nepotism_xii-Nunchaku"
MODEL_STEM = "Nepotism_xii-Nunchaku"
if __name__ == "__main__":
precision = get_precision() # 'int4' or 'fp4' from GPU
transformer = NunchakuFluxTransformer2dModel.from_pretrained(
f"{REPO_ID}/svdq-{precision}_r32-{MODEL_STEM}.safetensors"
)
pipeline = FluxPipeline.from_pretrained(
f"{REPO_ID}",
transformer=transformer,
torch_dtype=torch.bfloat16,
).to("cuda")
image = pipeline(
"A cat holding a sign that says hello world",
num_inference_steps=50,
guidance_scale=3.5,
).images[0]
image.save(f"nepotism_xii-{precision}.png")Licensing follows LICENSE.md in this repo and upstream model terms.
If your Diffusers files live under a subfolder (e.g. local diffusers/), use f"{REPO_ID}/diffusers" for FluxPipeline.from_pretrained and prefix the transformer path the same way.
