Image-to-Image
Diffusers
Safetensors
English
image-generation
image-editing
flux
flux-3
black-forest-labs
Instructions to use Runware/flux-3-image-klein-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Runware/flux-3-image-klein-base 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("Runware/flux-3-image-klein-base", 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
File size: 805 Bytes
0557a3d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | {
"format_version": 1,
"model": "flux-3-image-klein",
"quantization": null,
"torch_dtype": "bfloat16",
"dit": {
"hidden": 3072,
"heads": 24,
"depth": 5,
"depth_single": 28,
"mlp_ratio": 3.0,
"axes_dim": [32, 32, 32, 32],
"theta": 10000,
"in_channels": {"image": 128, "image_cond": 128, "text": 20480},
"out_modes": ["image"],
"vec_in_dim": null,
"image_rope_scale": 0.5
},
"text_encoder": {
"path": "text_encoder",
"tokenizer": "text_encoder",
"layers": [4, 8, 12, 16, 20, 24, 28, 32],
"pad_multiple": 80,
"max_tokens": 8192,
"dtype": "bfloat16"
},
"vae": {
"path": "ae.safetensors",
"dtype": "float32"
},
"sampler": {
"steps": 50,
"guidance": 3.5,
"alpha": 6.93,
"size": [1024, 1024]
}
}
|