Image-to-Image
Diffusers
Safetensors
Diffusion Single File
English
FluxKontextPipeline
image-generation
flux
Instructions to use HelloTestUser/FLUX.1-Kontext-dev with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use HelloTestUser/FLUX.1-Kontext-dev 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("HelloTestUser/FLUX.1-Kontext-dev", 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] - Diffusion Single File
How to use HelloTestUser/FLUX.1-Kontext-dev with Diffusion Single File:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Download text_encoder/config.json from HelloTestUser/FLUX.1-Kontext-dev: direct link, hf CLI and curl.
- Browser
- Download file 561 Bytes
-
https://huggingface.co/HelloTestUser/FLUX.1-Kontext-dev/resolve/main/text_encoder/config.json
- Command line
-
hf download hf://HelloTestUser/FLUX.1-Kontext-dev/text_encoder/config.json
-
curl -L -o config.json https://huggingface.co/HelloTestUser/FLUX.1-Kontext-dev/resolve/main/text_encoder/config.json
561 Bytes
| { | |
| "architectures": [ | |
| "CLIPTextModel" | |
| ], | |
| "attention_dropout": 0.0, | |
| "bos_token_id": 0, | |
| "dropout": 0.0, | |
| "eos_token_id": 2, | |
| "hidden_act": "quick_gelu", | |
| "hidden_size": 768, | |
| "initializer_factor": 1.0, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 3072, | |
| "layer_norm_eps": 1e-05, | |
| "max_position_embeddings": 77, | |
| "model_type": "clip_text_model", | |
| "num_attention_heads": 12, | |
| "num_hidden_layers": 12, | |
| "pad_token_id": 1, | |
| "projection_dim": 768, | |
| "torch_dtype": "bfloat16", | |
| "transformers_version": "4.52.3", | |
| "vocab_size": 49408 | |
| } | |