CoolFace
Modelpublic

tonera/Nepotism_xii-Nunchaku

sourceHugging Faceotherupdated 6mo agoView on Hugging Face
1likes68downloads
Model Card

Model Card (SVDQuant · Nepotism_xii)

[image]

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 PyTorch version 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.:
bash
# 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

Metricmeanp50p90bestworst
PSNR21.815921.976629.44730.801613.0762
SSIM0.8119840.8358280.9380920.9441790.582228
LPIPS0.2094480.1786980.4006990.04616790.64835

INT4

Metricmeanp50p90bestworst
PSNR20.875920.879725.509330.038814.8672
SSIM0.789430.8123460.8906990.9136050.557165
LPIPS0.2433320.2034490.4193610.08681370.657203

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

python
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.