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
ComfyUI_temp_siyhd_00001_.png

Thanks!

Sign up or log in to comment