emaph / inpaint-controlnet-union

Inpaint a selected area of an image using controlnet union for SDXL.

  • Public
  • 303 runs
  • L40S
  • GitHub
  • License
Iterate in playground

Input

string
Shift + Return to add a new line

Default: ""

string
Shift + Return to add a new line

Things you do not want to see in your image

Default: ""

file
Preview
image

The image to inpaint

file
Preview
mask

The image with the masked area to inpaint

integer
(minimum: 1, maximum: 50)

Number of inference steps

Default: 20

number
(minimum: 0, maximum: 20)

Guidance scale

Default: 4

string

Format of the output images

Default: "webp"

integer
(minimum: 0, maximum: 100)

Quality of the output images, from 0 to 100. 100 is best quality, 0 is lowest quality.

Default: 80

integer

Set a seed for reproducibility. Random by default.

Output

output
Generated in

Run time and cost

This model costs approximately $0.044 to run on Replicate, or 22 runs per $1, but this varies depending on your inputs. It is also open source and you can run it on your own computer with Docker.

This model runs on Nvidia L40S GPU hardware. Predictions typically complete within 45 seconds. The predict time for this model varies significantly based on the inputs.

Readme

An image and mask must be provided as input. The mask is a PNG with an erased area to be inpainted. Uses controlnet++ for image editing.


ControlNet++: All-in-one ControlNet for image generations and editing!

ProMax Model has released!! 12 control + 5 advanced editing, just try it!!!

Advantages about the model

  • Use bucket training like novelai, can generate high resolutions images of any aspect ratio
  • Use large amount of high quality data(over 10000000 images), the dataset covers a diversity of situation
  • Use re-captioned prompt like DALLE.3, use CogVLM to generate detailed description, good prompt following ability
  • Use many useful tricks during training. Including but not limited to date augmentation, mutiple loss, multi resolution
  • Use almost the same parameter compared with original ControlNet. No obvious increase in network parameter or computation.
  • Support 10+ control conditions, no obvious performance drop on any single condition compared with training independently
  • Support multi condition generation, condition fusion is learned during training. No need to set hyperparameter or design prompts.
  • Compatible with other opensource SDXL models, such as BluePencilXL, CounterfeitXL. Compatible with other Lora models.

Inference scripts and more details can found: https://github.com/xinsir6/ControlNetPlus/tree/main

Image Inpainting