Instructions to use alimama-creative/FLUX.1-dev-Controlnet-Inpainting-Beta with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use alimama-creative/FLUX.1-dev-Controlnet-Inpainting-Beta 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("alimama-creative/FLUX.1-dev-Controlnet-Inpainting-Beta", 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
is this controlnet supporting inpainting for batch image and its mask
#13
by tianhe2023 - opened
i have batch images and its mask,wish to inpaint different images's same element,for example, different photo has a car.
can i input the images and mask ,and use one prompt,and get one same car on different photo?