Instructions to use Photoroom/FLUX.2-klein-4b-fp8-diffusers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Photoroom/FLUX.2-klein-4b-fp8-diffusers with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Photoroom/FLUX.2-klein-4b-fp8-diffusers", dtype=torch.bfloat16, device_map="cuda") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Xet hash:
- b4122e7314307c0cfa8da31036e05ecedc00e5511219d0944ae4bb739e494f12
- Size of remote file:
- 28 MB
- SHA256:
- ce7910c1a4342906105c2d5a39b175c2535553d6106389ee7c152c01b927face
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.