Area Composition Examples in ComfyUI
Area composition workflow examples in ComfyUI: use ConditioningSetArea to compose different prompts in different image regions.
Here are examples demonstrating the ConditioningSetArea node. You can load these images into ComfyUI to get the full workflow.
Area composition with Anything-V3 + second pass with AbyssOrangeMix2_hard
This image contains 4 different zones: night, evening, day, morning
Here is what the workflow looks like in ComfyUI:
This image contains the same zones as the previous one but in reverse order.
Adding a subject at the bottom center of the image by adding another area prompt.
Increasing Image Coherence with Area Composition
Stable Diffusion creates its most coherent images when generating square images with resolutions close to 512x512. But what if we want to generate an image with a 16:9 aspect ratio? Let's generate a 16:9 image with a sitting subject. If generated normally, the success rate will be low, with limbs stretching unnaturally across the image and other coherence issues.
By using Area Composition with a square area for the subject, coherence will be higher and, since it is generated at the same time as the rest of the image, the overall image coherence will be excellent.
This workflow uses Anything-V3. It is a 2-pass workflow with area composition used for the subject during the first pass on the left side of the image. The reason for the second pass is only to increase the resolution. If you are satisfied with a 1280x704 image, you can skip the second pass.
Adding a red-haired subject with an area prompt on the right side of the image.
First pass output (1280x704):
Second pass output (1920x1088):
This second pass output image illustrates one of the behaviors of Stable Diffusion. The second pass has no area prompts. You will notice that subject 1's hair is blonde with pink highlights and subject 2 has pink hair instead of red hair, unlike what was present in the first pass output. This is because Stable Diffusion tries to make the overall image coherent with itself, and one of the side effects is the blending of hair colors.
Comments
Sign in with GitHub to join the discussion.