EasyKSampler (LayerDiffuse)(samplerSimpleLayerDiffusion)
EasyKSampler (LayerDiffuse) node from ComfyUI-Easy-Use.
sampler Simple Layer Diffusion
Description
The EasyKSampler (LayerDiffuse) node runs the Easy-Use KSampler pipeline with support for Layer Diffusion transparent-image generation. It is designed to be dropped into a PIPE_LINE workflow wherever you would normally place a regular Easy KSampler when you want the result to include a foreground layer with an alpha channel.
The node reads the model, conditioning, latent, VAE, and other sampling data from the pipe, executes the sampling step, and returns an updated pipe along with the decoded image and the transparency mask produced by the Layer Diffusion process.
Inputs
pipe
The PIPE_LINE containing the full sampling state (model, positive/negative conditioning, latent image, VAE, etc.). This is the same pipe used by other Easy-Use nodes, so the node can be inserted directly into an existing Easy-Use sampling chain. All required sampling data is taken from this input unless explicitly overridden.
image_output
Controls what happens to the generated image after sampling. One of:
- Hide – the image is returned in the IMAGE outputs but is not shown in the UI or saved.
- Preview – the image is sent to the UI preview (default).
- Save – the image is saved to disk without being previewed.
- Hide&Save – the image is saved but not previewed.
- Sender – the image is sent to a matching receiver in another workflow via
link_id. - Sender&Save – the image is both sent via
link_idand saved to disk.
link_id
An integer used to pair this node with a receiving node when image_output is set to Sender or Sender&Save. The sender and receiver must use the same link_id for the image to be routed correctly. This value is ignored for the other image_output modes.
save_prefix
The filename prefix used when saving the output image(s). Images are written into the ComfyUI output directory with filenames beginning with this prefix. Default: ComfyUI.
model
Optional MODEL input. When connected, it overrides the model stored in the pipe for this sampling step. This is useful for sampling with a different checkpoint, refiner, or a model with different LoRA/attention modifications applied, without rebuilding the whole pipe.
Outputs
PIPE_LINE
The updated pipe with the sampled latent and post-sampling state written back into it. Chain this into further Easy-Use nodes (such as VAE decoding, upscaling, or a second sampling stage) to continue the workflow.
IMAGE
The decoded result image produced by the sampler.
IMAGE (Layer Diffusion)
The Layer Diffusion–aware image output. When Layer Diffusion is active, this image carries the transparency layer information (RGBA) for the generated content.
MASK
The alpha mask corresponding to the Layer Diffusion transparency channel. Use this output to separate the generated foreground layer from the background or as an input to compositing/alpha-aware nodes.
Usage Notes
- This node is a drop-in replacement for the regular Easy-Use KSampler when the pipe was set up for Layer Diffusion (for example, using a Layer Diffusion checkpoint or model configuration).
- Leave the
modelinput unconnected unless you specifically need to sample with a different model than the one stored in the pipe. - If you only need a standard RGB image, use the first IMAGE output. If you are compositing a transparent foreground, use the second IMAGE output together with the MASK output.
Comments
Sign in with GitHub to join the discussion.