Instructions to use black-forest-labs/FLUX.1-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-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-dev", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- Draw Things
- DiffusionBee
Can this model be used for img2img?
#14
by liu00 - opened
Can this model be used for img2img? How to achieve
Yes, it can definitely be used for img2img when using ComfyUI. Just google "Flux img2img Workflow ".
As for using the API, there is a demo on https://fal.ai/models/fal-ai/flux/dev/image-to-image/playground
The JSON should look like this:
{
"image_url": "https://fal.media/files/koala/Chls9L2ZnvuipUTEwlnJC.png",
"prompt": "a cat dressed as a wizard with a background of a mystic forest.",
"strength": 0.95,
"image_size": "landscape_4_3",
"num_inference_steps": 40,
"guidance_scale": 3.5,
"num_images": 1,
"enable_safety_checker": true
}
Couldn't find a demo on Replicate but you should be able to adapt it from the JSON I think.
How to use img2img with diffusers library?
Sure, but I'd rather have img2img's pipline