Downloads · 30 days
36
1% of all-time downloads
Disty0/FLUX.2-dev-SDNQ-uint4-svd-r32
FLUX.2-dev-SDNQ-uint4-svd-r32 is a image-to-image model from Disty0. Use it when you need one image transformed into another. It is set up for diffusers. The card lists the license as other.
4 bit (UINT4 with SVD rank 32) quantization of black-forest-labs/FLUX.2-dev using SDNQ.
Downloads · 30 days
36
1% of all-time downloads
All-time downloads
2.7K
Public
Parameters
17.2B
34.3 GB on disk
Likes
14
Public
Click a slice to open those files.
.safetensors34.2 GB · 100%
How the weights are stored.
U815.7B · 91%
From the Hugging Face model README
4 bit (UINT4 with SVD rank 32) quantization of black-forest-labs/FLUX.2-dev using SDNQ.
Usage:
pip install sdnq
import torch
import diffusers
from sdnq import SDNQConfig # import sdnq to register it into diffusers and transformers
from sdnq.common import use_torch_compile as triton_is_available
from sdnq.loader import apply_sdnq_options_to_model
pipe = diffusers.Flux2Pipeline.from_pretrained("Disty0/FLUX.2-dev-SDNQ-uint4-svd-r32", torch_dtype=torch.bfloat16)
# Enable INT8 MatMul for AMD, Intel ARC and Nvidia GPUs:
if triton_is_available and (torch.cuda.is_available() or torch.xpu.is_available()):
pipe.transformer = apply_sdnq_options_to_model(pipe.transformer, use_quantized_matmul=True)
pipe.text_encoder = apply_sdnq_options_to_model(pipe.text_encoder, use_quantized_matmul=True)
# pipe.transformer = torch.compile(pipe.transformer) # optional for faster speeds
pipe.enable_model_cpu_offload()
prompt = "Realistic macro photograph of a hermit crab using a soda can as its shell, partially emerging from the can, captured with sharp detail and natural colors, on a sunlit beach with soft shadows and a shallow depth of field, with blurred ocean waves in the background. The can has the text `BFL Diffusers` on it and it has a color gradient that start with #FF5733 at the top and transitions to #33FF57 at the bottom."
image = pipe(
prompt=prompt,
generator=torch.manual_seed(42),
num_inference_steps=50,
guidance_scale=4,
).images[0]
image.save("flux-2-dev-sdnq-uint4-svd-r32.png")