KJNodes/masking/conditioninggenerated

ConditioningSetMaskAndCombine5

This node technically receives five sets of CONDITIONING inputs and corresponding MASK inputs, achieving regional generation control by applying each mask and its intensity coefficient to the corresponding conditioning data.

Conditioning Set Mask And Combine5

positive_1
negative_1
positive_2
negative_2
positive_3
negative_3
positive_4
negative_4
positive_5
negative_5
mask_1
mask_2
mask_3
mask_4
mask_5
combined_positive
combined_negative
mask_1_strength
1.00
mask_2_strength
1.00
mask_3_strength
1.00
mask_4_strength
1.00
mask_5_strength
1.00
set_cond_area
COMBO
KJNodes

The ConditioningSetMaskAndCombine5 node technically receives five sets of CONDITIONING inputs and corresponding MASK inputs. It achieves regional generation control by applying each mask and its strength coefficient to the respective conditioning data.

ConditioningSetMaskAndCombine5 is a powerful node for image generation that integrates multiple conditional masks with prompt combination functionality. Its core function is to allow users to apply independent masks to five different sets of positive and negative prompts, ultimately merging them to output unified positive and negative conditioning data.

Node Functionality

This node technically receives five sets of CONDITIONING inputs and corresponding MASK inputs. It achieves regional generation control by applying each mask and its strength coefficient to the respective conditioning data. It supports two conditional area setting modes: "default" and "mask bounds". Its internal processing logic is completely consistent with ComfyUI's native nodes, ensuring functional stability and compatibility.

Node Parameter Description - ConditioningSetMaskAndCombine5

Connection Inputs (Inputs)

Parameter NameData TypeRequiredDefault ValueValue Range/OptionsDescription
positive_1CONDITIONINGYes--positive_1 (Input Parameter): The first set of positive prompt conditioning input, used to describe the desired image content.
negative_1CONDITIONINGYes--negative_1 (Input Parameter): The first set of negative prompt conditioning input, used to describe image content to avoid generating.
positive_2CONDITIONINGYes--positive_2 (Input Parameter): The second set of positive prompt conditioning input.
negative_2CONDITIONINGYes--negative_2 (Input Parameter): The second set of negative prompt conditioning input.
positive_3CONDITIONINGYes--positive_3 (Input Parameter): The third set of positive prompt conditioning input.
negative_3CONDITIONINGYes--negative_3 (Input Parameter): The third set of negative prompt conditioning input.
positive_4CONDITIONINGYes--positive_4 (Input Parameter): The fourth set of positive prompt conditioning input.
negative_4CONDITIONINGYes--negative_4 (Input Parameter): The fourth set of negative prompt conditioning input.
positive_5CONDITIONINGYes--positive_5 (Input Parameter): The fifth set of positive prompt conditioning input.
negative_5CONDITIONINGYes--negative_5 (Input Parameter): The fifth set of negative prompt conditioning input.
mask_1MASKYes--mask_1 (Input Parameter): The mask applied to the first set of conditioning data, where white areas represent the effective region.
mask_2MASKYes--mask_2 (Input Parameter): The mask applied to the second set of conditioning data.
mask_3MASKYes--mask_3 (Input Parameter): The mask applied to the third set of conditioning data.
mask_4MASKYes--mask_4 (Input Parameter): The mask applied to the fourth set of conditioning data.
mask_5MASKYes--mask_5 (Input Parameter): The mask applied to the fifth set of conditioning data.

Control Parameters (Parameters)

Parameter NameData TypeRequiredDefault ValueValue Range/OptionsDescription
set_cond_areaCOMBOYesdefault"default", "mask bounds"set_cond_area (Input Parameter): Sets the conditional area mode, options are "default" or "mask bounds", affecting the application scope of the masks.
mask_1_strengthFLOATYes1.00.0 - 10.0 (Step: 0.01)mask_1_strength (Input Parameter): Controls the influence strength of the first mask, range 0.0 to 10.0, step 0.01.
mask_2_strengthFLOATYes1.00.0 - 10.0 (Step: 0.01)mask_2_strength (Input Parameter): Controls the influence strength of the second mask, range 0.0 to 10.0, step 0.01.
mask_3_strengthFLOATYes1.00.0 - 10.0 (Step: 0.01)mask_3_strength (Input Parameter): Controls the influence strength of the third mask, range 0.0 to 10.0, step 0.01.
mask_4_strengthFLOATYes1.00.0 - 10.0 (Step: 0.01)mask_4_strength (Input Parameter): Controls the influence strength of the fourth mask, range 0.0 to 10.0, step 0.01.
mask_5_strengthFLOATYes1.00.0 - 10.0 (Step: 0.01)mask_5_strength (Input Parameter): Controls the influence strength of the fifth mask, range 0.0 to 10.0, step 0.01.

Output

Parameter NameData TypeDescription
combined_positiveCONDITIONINGcombined_positive (Output Parameter): The output after merging all positive conditioning, for use by subsequent sampling nodes.
combined_negativeCONDITIONINGcombined_negative (Output Parameter): The output after merging all negative conditioning, for use by subsequent sampling nodes.

Usage Scenarios

This node is very useful in complex image synthesis workflows. For example, when you need to precisely control the foreground character, background environment, specific objects, lighting effects, and artistic style separately within a single scene, you can create five sets of prompts and masks respectively. This node integrates them all at once, enabling efficient generation of highly customized images.

Notes

Please note that this node requires the five sets of input conditioning data and masks to correspond in quantity. Additionally, the mask dimensions should match the dimensions of the generated image; otherwise, it may affect the expected results or cause errors.

ConditioningSetMaskAndCombine5 node is from the ComfyUI-KJNodes node package.

Comments

Sign in with GitHub to join the discussion.

Loading comments…