Instructions to use UrNinja/FLUX.1-Fill-dev-ungated with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use UrNinja/FLUX.1-Fill-dev-ungated with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import FluxFillPipeline from diffusers.utils import load_image image = load_image("https://huggingface.co/datasets/diffusers/diffusers-images-docs/resolve/main/cup.png") mask = load_image("https://huggingface.co/datasets/diffusers/diffusers-images-docs/resolve/main/cup_mask.png") # switch to "mps" for apple devices pipe = FluxFillPipeline.from_pretrained("UrNinja/FLUX.1-Fill-dev-ungated", dtype=torch.bfloat16, device_map="cuda") image = pipe( prompt="a white paper cup", image=image, mask_image=mask, height=1632, width=1232, guidance_scale=30, num_inference_steps=50, max_sequence_length=512, generator=torch.Generator("cpu").manual_seed(0) ).images[0] image.save(f"flux-fill-dev.png") - Diffusion Single File
How to use UrNinja/FLUX.1-Fill-dev-ungated 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 UrNinja/FLUX.1-Fill-dev-ungated: direct link, hf CLI and curl.
- Browser
- Download file 561 Bytes
-
https://huggingface.co/UrNinja/FLUX.1-Fill-dev-ungated/resolve/main/text_encoder/config.json
- Command line
-
hf download hf://UrNinja/FLUX.1-Fill-dev-ungated/text_encoder/config.json
-
curl -L -o config.json https://huggingface.co/UrNinja/FLUX.1-Fill-dev-ungated/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.45.2", | |
| "vocab_size": 49408 | |
| } | |