Instructions to use XLabs-AI/flux-controlnet-hed-v3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use XLabs-AI/flux-controlnet-hed-v3 with Diffusers:
pip install -U diffusers transformers accelerate
from diffusers import ControlNetModel, StableDiffusionControlNetPipeline controlnet = ControlNetModel.from_pretrained("XLabs-AI/flux-controlnet-hed-v3") pipe = StableDiffusionControlNetPipeline.from_pretrained( "fill-in-base-model", controlnet=controlnet ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- Draw Things
- DiffusionBee
Can we do inpainting along with controlnet?
#3
by sean-mediabox - opened
Is there a workflow that supports inpainting along with controlnet?
I tried to create a workflow(with attached png) but will get an exception (index out of range). I commented out a portion of sampling.py but it's no longer inpainting.
# if image2image_strength is not None and orig_image is not None:
#
# t_idx = int((1 - np.clip(image2image_strength, 0.0, 1.0)) * len(timesteps))-1
# t = timesteps[t_idx]
# timesteps = timesteps[t_idx:]
# orig_image = rearrange(orig_image, "b c (h ph) (w pw) -> b (h w) (c ph pw)", ph=2, pw=2).to(img.device, dtype = img.dtype)
# img = t * img + (1.0 - t) * orig_image
Thanks!