Views
No views yet
Silan10/flux-quantized-half is a half-precision (FP16) variant of the
black-forest-labs/FLUX.1-dev
text-to-image model. In this version, the transformers, text_encoder and
text_encoder_2 folders have been converted to FP16.torch.float16 using PyTorch. This is not real quantization (like int8/int4). Still,
converting the model to float16 saves memory, reduces RAM usage and speeds up loading times.1import torch
2from diffusers import FluxPipeline
3
4pipe = FluxPipeline.from_pretrained(
5 "Silan10/flux-quantized-half",
6 torch_dtype=torch.float16
7)
8pipe.to("cuda") # or pipe.enable_model_cpu_offload() for low VRAM
9
10prompt = "Close-up portrait photo of a standing 30 year old female with twin braids hairstyle."
11image = pipe(
12 prompt,
13 guidance_scale=3.5,
14 num_inference_steps=20,
15 generator=torch.Generator("cpu").manual_seed(0)
16).images[0]
17
18image.save("flux_half_sample.png")