Instructions to use ShinoharaHare/Waifu-Colorize-XL with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use ShinoharaHare/Waifu-Colorize-XL 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("ShinoharaHare/Waifu-Colorize-XL", 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
What is the best way to use this model with comfyUI?
I am quite struggling to think of a basic workflow to colorize an image, could there be a example workflow out there that i am not aware of? Simply KSampler with latent image seems to not work
I'm not very familiar with ComfyUI, but I believe the workflow should be similar to that of an inpainting model.
The key difference is that standard inpainting fills the masked area with a solid color (like gray), whereas this model requires the original content within the masked area to be preserved.
I'm not sure if there's an existing node that can achieve this functionality.
I might need to develop a custom node for it.
After a bit of research, I confirmed that the built-in nodes can't achieve this.
However, it only required a very small modification to implement.
Therefore, I created a custom node to handle it.
- Install the custom node: https://github.com/ShinoharaHare/ComfyUI-InpaintModelConditioningAdvanced
- Add
InpaintModelConditioningAdvancednode, and change the following options:- Set
concat_latent_imagetooriginal. - Set
noise_masktofalse.
- Set


