Using ControlNet with img2img and inpaint.

Allow me to provide you with instructions on how to utilize the enhanced img2img (i2i) feature in ControlNet v1.1.140, which has been made more user-friendly with the recent update. Furthermore, the inpaint feature has also been improved for added convenience, although there are certain aspects that I have investigated that might cause confusion.

How to Use ControlNet img2img (i2i)

Let’s learn how to use i2i, starting with generating an image in the same pose as the cheerleader image provided in the PAKUTASO website, using ControlNet Openpose as the reference.

Jumping Cheerleader | PAKUTASO Free Material This photo of a jumping cheerleader is a free material related to jump, cheer, pom-pom, and female manager. You can download the material in high resolution (3257px x 4548px) for free!

1/4 Set the reference image in img2img
Switch to the img2img tab and input the prompt and negative prompt to set the image. Here are the prompt and negative prompt:

Prompt: (8k, RAW photo, best quality, masterpiece:1.2), (realistic, photo-realistic:1.4), (extremely detailed 8k wallpaper), Japanese woman in stadium, cheerleader

Negative Prompt: EasyNegative, (worst quality, low quality: 2.0), normal quality, ugly face, unclear eyes, bad mouth, bad anatomy, extra legs, beach, bad anatomy

2/4 Adjust the resolution
Adjust the resolution to match the aspect ratio of the reference image. It can be square, portrait, landscape, or roughly matching. Then open the ControlNet menu.

3/4 Set up ControlNet
Set up ControlNet by selecting Enable and choosing “OpenPose” as the Control Type. The Preprocessor and Model will be set automatically, but you can adjust them according to your preferences.

4/4 Generate the image
When you generate the image, feature extraction will be performed, and ControlNet will generate the image.

The benefits of this update are:

  1. Simpler image setting in the ControlNet menu: Previously, setting images in the ControlNet menu required multiple steps. With this update, it can now be done easily using the img2img feature. This is a significant advantage as it allows for setting multiple images in ControlNet with just one action.
  2. No need to click the feature extraction button: In the past, clicking the feature extraction button was necessary. However, this step has been eliminated with the update, providing another major advantage.

Overall, the usability of img2img has greatly improved, making it more convenient and time-saving compared to using ControlNet with txt2img for image generation. We highly recommend using img2img, especially when working with multiple ControlNets, as it offers a very convenient solution.

How to Use ControlNet Inpaint: Applying ControlNet with Inpaint

When using img2img, drawing masks for ControlNet inpaint is not possible. Instead, we can utilize the Inpaint tab. We will work with the provided image from pakutaso, which will be used to inpaint the eraser mark.

Blackboard and JK (high school girl) | Pakutaso’s Free MaterialThe photo of the blackboard and JK (high school girl) is a free material related to high school girls and blackboards. You can download the high-resolution material (5648px × 3677px) for freewww.pakutaso.com

Step 1/4 – Entering and Setting Prompt and Masked Image

  1. Switch to the img2img tab.
  2. Prompt: (8k, RAW photo, best quality, masterpiece:1.2), (realistic, photo-realistic:1.4), (extremely detailed 8k wallpaper), Japanese woman, blackboard
  3. Negative prompt: EasyNegative, (worst quality, low quality: 2.0), normal quality, ugly face, unclear eyes, bad mouth, bad anatomy, extra legs, beach, bad anatomy
  4. Switch to the Inpaint tab
  5. Set the image.
  6. Proceed to draw masks on the desired area for correction, specifically the eraser mark.


Step 2/4 – Adjusting the Resolution
Adjust the resolution to match the aspect ratio of the reference image. It can be square, vertical, horizontal, or any other orientation. Then, access the ControlNet menu.

Step 3/4 – Setting up ControlNet Inpaint
Configure ControlNet settings. Enable ControlNet and set the Control Type to “Inpaint.” The Preprocessor and Model will be set automatically, but you have the option to modify them if desired.

Step 4/4 – Generating the Image
Lastly, generating the image will perform feature extraction and produce a new image using ControlNet. You will be able to verify that the masked eraser mark has been seamlessly removed.

This update has made two points more convenient:

  1. Drawing masks in the inpaint screen has become easier. Previously, masks had to be drawn on the canvas within the ControlNet menu, but now, with the expanded inpaint screen, it is much simpler to draw masks.
  2. The effort required to click the feature extraction button has been reduced. Previously, it was necessary to click the “💥” button for feature extraction, but now this step has been eliminated, which is a significant advantage.

In addition to ControlNet Inpaint’s good performance, editing masks on the small canvas within the ControlNet menu was a cumbersome task. However, with the new update, this can now be done within the Inpaint menu, making it more convenient. Furthermore, it is now possible to upload and specify mask images, as well as use features that were previously exclusive to Inpaint, such as zooming the canvas when combined with other extensions. This unification within ControlNet represents a significant change.

Frequently Asked Questions (FAQ)

How do I upload a mask in ControlNet Inpaint?

To upload a mask for inpainting, follow these steps:

  1. Switch to “Inpaint upload” mode.
  2. Use the provided example mask, shown below, as a reference. The mask depicts the entire blackboard being modified.

How can I change the reference image for ControlNet in img2img?

Although uploading images to the ControlNet menu is no longer necessary, you can still set reference images if desired. By selecting the “Upload independent control image” option, you can set images as before.

Additional fields for setting images will appear. Please specify the reference image in this section.

コメント