Xurxowsky/flux2-klein-4b-playground
0
FLUX.2 klein 4B Playground
This Hugging Face Space runs black-forest-labs/FLUX.2-klein-4B with a Gradio UI for:
- Text to image
- Image to image
Notes
- The model is loaded with
torch.bfloat16when the available GPU supports BF16. - If BF16 is not available, the app falls back to
torch.float16on GPU andtorch.float32on CPU. - On Spaces or larger GPUs, the app uses
pipe.to("cuda"). - On smaller or mixed environments, the app uses
pipe.enable_model_cpu_offload(). - The official
Flux2KleinPipelinesupports image conditioning directly. Because it does not document a dedicatedstrengthargument, this Space implements the 0.0 to 1.0 intensity slider as a blend between the source image and the edited result.
ZeroGPU
To use ZeroGPU:
- Create the Space with the Gradio SDK.
- Upload these files.
- In the Space hardware settings, select ZeroGPU.
The README metadata cannot force ZeroGPU directly. ZeroGPU is chosen in the Space settings, while @spaces.GPU makes the app compatible with it.
