You need to agree to share your contact information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

Waifu-Inpaint-XL

image/png

Waifu-Inpaint-XL is an SDXL-based model specifically designed for inpainting anime-themed images.

Overview

Waifu-Inpaint-XL is initialized from WAI-NSFW-illustrious-SDXL-V14.0-V-Prediction, with its input channels expanded from 4 to 9. Among these, 1 additional channel is dedicated to the mask, and 4 extra channels are used for masked latents.

Model Details

🧨 Diffusers

image1 image2 image3
import torch
from diffusers import StableDiffusionXLInpaintPipeline
from diffusers.utils import load_image

pipeline = StableDiffusionXLInpaintPipeline.from_pretrained(
  'ShinoharaHare/Waifu-Inpaint-XL',
  torch_dtype=torch.half
)
pipeline.to('cuda')

image = load_image('https://cdn-uploads.huggingface.co/production/uploads/630ed69a31970d1cd4fd575d/tPo5oPJQpxWamM-tGIYqj.png')
mask_image = load_image('https://cdn-uploads.huggingface.co/production/uploads/630ed69a31970d1cd4fd575d/QpmzmgROUM0eP53Cxx2Ih.png', lambda x: x.convert('L'))

inpainted_image = pipeline(
  prompt='blue eyes, holding red spider lily in hand',
  image=image,
  mask_image=mask_image,
  num_inference_steps=28,
  guidance_scale=5.0,
  height=image.height,
  width=image.width,
  generator=torch.Generator(pipeline.device).manual_seed(5)
).images[0]

inpainted_image.show()
Downloads last month
54
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for ShinoharaHare/Waifu-Inpaint-XL

Dataset used to train ShinoharaHare/Waifu-Inpaint-XL

Collection including ShinoharaHare/Waifu-Inpaint-XL