Views
No views yet
pip install git+https://github.com/Disty0/sdnq1import torch
2import diffusers
3from sdnq import SDNQConfig # import sdnq to register it into diffusers and transformers
4
5pipe = diffusers.ChromaPipeline.from_pretrained("Disty0/Chroma1-HD-SDNQ-uint4-svd-r32", torch_dtype=torch.bfloat16)
6pipe.enable_model_cpu_offload()
7
8prompt = [
9 "A high-fashion close-up portrait of a blonde woman in clear sunglasses. The image uses a bold teal and red color split for dramatic lighting. The background is a simple teal-green. The photo is sharp and well-composed, and is designed for viewing with anaglyph 3D glasses for optimal effect. It looks professionally done."
10]
11negative_prompt = ["low quality, ugly, unfinished, out of focus, deformed, disfigure, blurry, smudged, restricted palette, flat colors"]
12
13image = pipe(
14 prompt=prompt,
15 negative_prompt=negative_prompt,
16 generator=torch.Generator("cpu").manual_seed(433),
17 num_inference_steps=40,
18 guidance_scale=3.0,
19 num_images_per_prompt=1,
20).images[0]
21image.save("chroma-1-hd-sdnq-uint4-svd-r32.png")| Quantization | Model Size | Visualization |
|---|---|---|
| Original BF16 | 17.8 GB | ![]() |
| SDNQ UINT4 | 5.4 GB | ![]() |