Sign In

How to use Potatcats comfy regional prompter workflow.

How to use Potatcats comfy regional prompter workflow.

Introduction

This workflow lets you do regional prompting in comfyui. Mask area and input prompt for that area.

THIS IS GUIDE ON HOW TO USE WORKFLOW THAT IS HERE

0. Updates

02.01.25

-Updated guide with example of using 2 characters loras with masks.

1. The workflow

All custom nodes should be able to be installed from comfyui manager. As long as you have up to date comfyui there should be no issues.

It gives good control over the generation, but it does not give absolute control. Can take few tries to get good results.

2. How to use

The usability is simple and straightforward. I will go through each step in this guide.

2.1 Basic settings

  • Lora loader: Loads necessary loras. Lora affects whole image, but the triggers should be contained within the masked area.

  • Load checkpoint and VAE

  • Empty latent image: Width and height for empty latent image is taken from the first mask. The width and height must match the mask. More of that later.

  • CLIP set last layer: It is on bypass mode as for XL there is no need to use. CRTL + B will unbypass it if you need.

  • BASE PROMPT mask weight: This will change how strong the base prompt is OVER the masked areas. Base prompt will be 100% outside the masked areas. It can go to 0.01 for least effect over the masked areas.

2.2 Base prompt settings

  • Negative prompt: same for all masks

  • Quality etc...: It will be on front of EVERY prompt. Base and masked.

  • BASE prompt: Base prompt is prompt that will cover the whole image. Base prompt mask weight that was on basic settings above will determine how strong it is over the masked areas.

2.3 Mask settings

Includes fast bypasser for each mask. You can make more of them if you want. I included 5 possible masks, i think that is plenty.

Each mask looks like this. It includes mask and prompt. I recommend having empty layouts in comfyui/input folder. That way you can easily switch between ratio/resolution. The resolution of the first mask will be used for the latent image:

2.4 Creating mask

Mask can be easily created with right clicking load image -> open in mask editor.

Then you can just create mask. You can make fully circled mask and it will fill the empty area inside the circle:

example how the mask will look with circled:

All the masks/prompts go into attention couple node that is used for the separation on generation.

2.5 Generation

Basic generation settings.

Included 2pass generation. You can edit this to your liking.

Does image upscale between samplers. Known working upscale sizes with the attention couple are 1.5x and 2x.

3. Example of usage

In this example i will be using lora

For prompt i will be using base prompt for background. I will be adding grass, and tree.

I will be using 3 masks

1st mask will be the character

2nd mask will have mushroom and some glowing

3rd mask will be sky and clouds.

With these settings i got this image:

4. Fast example using 2 character loras.

4.1 Base settings

For this example i will be using 2 loras Elie and Diamond. Model used can be found here. I will be doing simple example, nothing complicated.

For Base prompt and quality prompts i went with pretty basic for the example.

First mask is going to be for elie. Fast mask, nothing complicated. For prompt just sitting, smiling doing v. Including the the amount of characters on each mask can help.

Second mask for diamond. Fast mask, nothing complicated. hugging,smiling,blanket.

These were only settings i changed compared to the other example.

Here are some results with different seeds::

There is some minor "leak" between the characters. it is not perfect, but pretty good.

5. Known problems with the workflow

If you get this error, it means the upscale ratio you are using is not good.

Upscale sizes i know that work:

  • 1.5x

  • 2x

Feedback

Please drop feedback on here or the comment page of the workflow in HERE. (~ ̄▽ ̄)~

38

Comments