EasyUse/PreSamplinggenerated

PreSampling (LayerDiffuse)(layerDiffusionSettings)

PreSampling (LayerDiffuse) node from ComfyUI-Easy-Use.

layer Diffusion Settings

pipe
image
blended_image
mask
pipe
method
COMBO
weight
1.00
steps
20
cfg
8
sampler_name
euler
scheduler
normal
denoise
1.00
seed
INT
Easy Use

This node is a pre-sampling control for Layer Diffusion workflows. It attaches Layer Diffusion settings and sampler parameters to a PIPE_LINE, so the downstream sampler nodes run with transparency-aware attention or convolution behavior instead of a plain latent denoise.

Description

PreSampling (LayerDiffuse) is used before the KSampler in an EasyUse pipeline. It takes an existing PIPE_LINE, applies the selected LayerDiffusion method and weight, and passes the modified PIPE_LINE forward. It also exposes the typical sampling controls — steps, CFG, sampler, scheduler, denoise, and seed — so you can configure the whole generation in one place. When optional image, blended_image, and mask inputs are provided, the node can participate in image-to-image or masked LayerDiffuse generation.

Inputs

  • pipe (PIPE_LINE, required):
    The upstream pipeline containing model, positive/negative conditioning, latents, and other sampler settings. This node reads from and writes back to this pipeline.

  • method (COMBO, required):
    Selects the LayerDiffusion injection method to apply. The available choices depend on your LayerDiffuse installation. Pick the method that matches the LayerDiffuse model and workflow you are using.

  • weight (FLOAT, required):
    Default: 1.0 — Minimum: -1.0 — Maximum: 3.0 — Step: 0.05
    Controls the strength of the Layer Diffusion effect. Higher values make the transparency-aware layers more influential; lower or negative values weaken or invert the effect.

  • steps (INT, required):
    Default: 20 — Minimum: 1 — Maximum: 10000
    Number of sampling steps to run.

  • cfg (FLOAT, required):
    Default: 8.0 — Minimum: 0 — Maximum: 100
    Classifier-free guidance scale.

  • sampler_name (COMBO, required):
    Default: euler
    The sampler to use for denoising. Options follow ComfyUI's standard sampler list.

  • scheduler (COMBO, required):
    Default: normal
    The scheduler used with the sampler.

  • denoise (FLOAT, required):
    Default: 1.0 — Minimum: 0 — Maximum: 1 — Step: 0.01
    The fraction of the latent to denoise. 1.0 runs a full denoise; lower values preserve more of the original structure when an input image is used.

  • seed (INT, required):
    Seed for the sampling process. Set a fixed value to make the generation reproducible. If the widget is left randomizing, the value may change on each run.

  • image (IMAGE, optional):
    Optional input image for image-to-image or masked Layer Diffusion workflows.

  • blended_image (IMAGE, optional):
    Optional pre-blended image used by Layer Diffusion as the compositing target. Supplying this can help the model understand how the foreground layer should fit into the scene.

  • mask (MASK, optional):
    Optional mask that defines the region to generate or edit. The masked area receives the Layer Diffusion treatment while unmasked areas are preserved.

Outputs

  • pipe (PIPE_LINE):
    The updated pipeline, ready to be passed to a downstream sampler node. The emitted pipeline includes the configured sampling parameters and LayerDiffuse settings.

Usage Notes

  • Use this node as the last pre-sampling step before a sampler that supports PIPE_LINE, such as the KSampler variants in ComfyUI-Easy-Use.
  • The optional image, blended_image, and mask inputs are not all required for every method. For a plain LayerDiffuse generation, you can leave them disconnected, and the node will work in a text-to-image style with Layer Diffusion applied.
  • When using denoise < 1.0, connect image (and usually mask) so the sampler has something to align the partial denoise against.
  • weight can go negative. In some LayerDiffuse methods this can produce an inverted or corrective effect; experiment with small steps around typical values such as 0.8, 1.0, or 1.2.
  • If the output looks unblended or the foreground/background separation is too weak, raise weight or check that method matches the LayerDiffuse model you loaded.
  • steps, cfg, sampler_name, and scheduler behave exactly like the same settings on a regular sampler node, so existing sampler presets can be reused here.

Comments

Sign in with GitHub to join the discussion.

Loading comments…