KJNodes/masking/conditioninggenerated

ConditioningSetMaskAndCombine3

This node technically receives three pairs of 'positive/negative' conditioning inputs along with their corresponding masks. It uses the internal `append_helper` function to attach the mask information and its strength parameter to each set of conditioning data.

Conditioning Set Mask And Combine3

positive_1
negative_1
positive_2
negative_2
positive_3
negative_3
mask_1
mask_2
mask_3
combined_positive
combined_negative
mask_1_strength
1.00
mask_2_strength
1.00
mask_3_strength
1.00
set_cond_area
COMBO
KJNodes

The ConditioningSetMaskAndCombine3 node technically receives three pairs of "positive/negative" conditioning inputs along with their corresponding masks. It uses an internal append_helper function to append the mask information and its strength parameters to each set of conditioning data.

ConditioningSetMaskAndCombine3 is a powerful node for image generation that can bind and combine three independent sets of positive and negative prompts (Conditioning) with their corresponding masks. Its core functionality allows users to apply different guidance conditions to different areas of an image, enabling fine-grained control over the picture content.

Node Functionality

This node technically receives three pairs of "positive/negative" conditioning inputs along with their corresponding masks. It uses an internal append_helper function to append the mask information and its strength parameters to each set of conditioning data. It supports standard CONDITIONING and MASK data types and allows users to choose the calculation method for the conditional area (default or strictly confined within the mask boundaries). Its functionality is fully consistent with ComfyUI's native nodes.

Node Parameter Description - ConditioningSetMaskAndCombine3

Connection Inputs (Inputs)

Parameter NameData TypeRequiredDefault ValueValue Range/OptionsDescription
positive_1CONDITIONINGYes--positive_1 (Input Parameter): Input the first set of positive guidance prompts (Conditioning), used to describe the content expected to appear within the corresponding mask area.
negative_1CONDITIONINGYes--negative_1 (Input Parameter): Input the first set of negative guidance prompts (Conditioning), used to describe the content expected to be avoided within the corresponding mask area.
positive_2CONDITIONINGYes--positive_2 (Input Parameter): Input the second set of positive guidance prompts (Conditioning), used to describe the content expected to appear within the corresponding mask area.
negative_2CONDITIONINGYes--negative_2 (Input Parameter): Input the second set of negative guidance prompts (Conditioning), used to describe the content expected to be avoided within the corresponding mask area.
positive_3CONDITIONINGYes--positive_3 (Input Parameter): Input the third set of positive guidance prompts (Conditioning), used to describe the content expected to appear within the corresponding mask area.
negative_3CONDITIONINGYes--negative_3 (Input Parameter): Input the third set of negative guidance prompts (Conditioning), used to describe the content expected to be avoided within the corresponding mask area.
mask_1MASKYes--mask_1 (Input Parameter): Input the first mask (MASK), used to define the image area where the first set of conditions (positive_1/negative_1) takes effect.
mask_2MASKYes--mask_2 (Input Parameter): Input the second mask (MASK), used to define the image area where the second set of conditions (positive_2/negative_2) takes effect.
mask_3MASKYes--mask_3 (Input Parameter): Input the third mask (MASK), used to define the image area where the third set of conditions (positive_3/negative_3) takes effect.

Control Parameters (Parameters)

Parameter NameData TypeRequiredDefault ValueValue Range/OptionsDescription
set_cond_areaCOMBOYesdefault"default", "mask bounds"set_cond_area (Input Parameter): Sets the calculation method for the area where conditions take effect. Options are "default" or "mask bounds" (strictly confined within the mask boundaries).
mask_1_strengthFLOATYes1.00.0 - 10.0 (Step: 0.01)mask_1_strength (Input Parameter): Controls the influence strength of the conditions corresponding to the first mask. Value range is 0.0 to 10.0, with a step of 0.01.
mask_2_strengthFLOATYes1.00.0 - 10.0 (Step: 0.01)mask_2_strength (Input Parameter): Controls the influence strength of the conditions corresponding to the second mask. Value range is 0.0 to 10.0, with a step of 0.01.
mask_3_strengthFLOATYes1.00.0 - 10.0 (Step: 0.01)mask_3_strength (Input Parameter): Controls the influence strength of the conditions corresponding to the third mask. Value range is 0.0 to 10.0, with a step of 0.01.

Output

Parameter NameData TypeDescription
combined_positiveCONDITIONINGcombined_positive (Output Parameter): Outputs the combined positive conditioning data, containing all mask information.
combined_negativeCONDITIONINGcombined_negative (Output Parameter): Outputs the combined negative conditioning data, containing all mask information.

Usage Scenarios

In practical workflows, you can use it to create complex composite images. For example, you can apply "clear sky, white clouds" as a positive prompt and "overcast" as a negative prompt for the "sky" area, while applying "grass, flowers" as a positive prompt and "withered grass" as a negative prompt for the "ground" area, and then apply another independent set of prompts for the "character" in the image, ultimately generating a fused image where the details of each part meet expectations.

Notes

Please note that the input masks (MASK) need to match the image dimensions. This node primarily performs the combination and tagging of conditioning data and does not directly participate in the image sampling process. It needs to be connected to sampler nodes like KSampler to take effect.

The ConditioningSetMaskAndCombine3 node is from the ComfyUI-KJNodes node package.

Comments

Sign in with GitHub to join the discussion.

Loading comments…