Instructions to use black-forest-labs/FLUX.1-Fill-dev with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use black-forest-labs/FLUX.1-Fill-dev with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-Fill-dev", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Diffusion Single File
How to use black-forest-labs/FLUX.1-Fill-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
How to use gguf model without ComfyUI?
As the title says..
The original model is too big for me. But I only found how to use the existing quantitative model in comfyui.
Also i want to know why 32GB RAM still not enough to inference.
I've tried quantize the tokenizer2 as "https://huggingface.co/black-forest-labs/FLUX.1-dev/discussions/50"
But it still occur error:CUDA out of memory
packages/diffusers/models/attention_processor.py", line 1911, in call hidden_states = F.scaled_dot_product_attention( torch.OutOfMemoryError: CUDA out of memory. Tried to allocate 6.26 GiB. GPU 0 has a total capacity of 31.74 GiB of which 4.11 GiB is free. Process 207695 has 27.62 GiB memory in use. Of the allocated memory 26.09 GiB is allocated by PyTorch, and 440.07 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation