Visit ComfyUI Online for ready-to-use ComfyUI environment
Enhances sampling with two advanced samplers and a mask for refined image processing.
The TwoAdvancedSamplersForMask
node is designed to enhance the sampling process by utilizing two advanced samplers in conjunction with a mask. This node allows for more refined and controlled sampling, particularly useful in scenarios where different regions of the latent image require distinct sampling strategies. By leveraging a base sampler and a mask sampler, this node ensures that the masked and unmasked areas of the image are processed differently, leading to more precise and high-quality results. The node's primary function is to apply these samplers iteratively, taking into account the mask's influence, to produce a final latent image that meets the desired artistic or technical specifications.
The seed
parameter is an integer that initializes the random number generator used in the sampling process. This ensures reproducibility of results. The default value is 0, with a minimum of 0 and a maximum of 0xffffffffffffffff. Changing the seed will result in different sampling outcomes, providing variability in the generated images.
The steps
parameter defines the number of sampling steps to be performed. It is an integer with a default value of 20, a minimum of 1, and a maximum of 10000. More steps generally lead to higher quality results but will increase computation time.
The denoise
parameter is a float that controls the denoising strength during the sampling process. It ranges from 0.0 to 1.0, with a default value of 1.0 and a step size of 0.01. Lower values will retain more noise, while higher values will produce cleaner images.
The samples
parameter represents the latent image data that will be processed by the samplers. It is of type LATENT
and serves as the input image on which the sampling operations will be performed.
The base_sampler
parameter is of type KSAMPLER_ADVANCED
and is used to sample the unmasked regions of the latent image. This sampler applies the primary sampling strategy to the areas not affected by the mask.
The mask_sampler
parameter is also of type KSAMPLER_ADVANCED
and is used to sample the masked regions of the latent image. This allows for a different sampling strategy to be applied to the areas defined by the mask.
The mask
parameter is of type MASK
and defines the regions of the latent image that will be processed by the mask_sampler
. The mask is a binary image where the masked areas are typically represented by 1s and the unmasked areas by 0s.
The overlap_factor
parameter is an integer that determines the extent to which the mask is eroded or expanded during the sampling process. It has a default value of 10, with a minimum of 0 and a maximum of 10000. Adjusting this factor can influence the blending of the masked and unmasked regions.
The output parameter LATENT
represents the final latent image after the sampling process has been completed. This image has been processed by both the base and mask samplers, taking into account the mask's influence, and is ready for further use or final rendering.
steps
parameter, but be mindful of the increased computation time.seed
values to generate a variety of sampling outcomes and find the one that best suits your artistic vision.denoise
parameter to balance between retaining some noise for texture and achieving a cleaner image.overlap_factor
to fine-tune the transition between masked and unmasked regions, ensuring a smooth blend.KSAMPLER_ADVANCED
.base_sampler
and mask_sampler
are of the correct type and compatible with the node.denoise
parameter is set outside the allowed range of 0.0 to 1.0.denoise
value to be within the specified range to avoid this error.© Copyright 2024 RunComfy. All Rights Reserved.