Nodes/LLS-node/LLS Pro Image Edit Prepare
ComfyUI Node

LLS Pro Image Edit Prepare

The front half of a proper edit pipeline — build the workspace, pick the backend

By Gin3601·Created 3 months ago·Updated 3 months ago· 0
LLS Pro Image Edit Prepare
  • image
  • mask
  • vae
  • positive
  • negative
  • model
  • latent
  • work_image
  • work_mask
  • edit_info
  • recommended_denoise
  • positive
  • negative
backend_modeauto
edit_scopeauto
mask_grow24
mask_blur8.0
mask_threshold0.50
invert_maskfalse
crop_context64
crop_context_factor1.5
min_size256
max_size1024
resize_modefit
expand_left0
expand_right0
expand_top0
expand_bottom0
canvas_filledge
auto_recommendenabled
model_info

The LLS pack draws a line between its "Simple" repair chain and its "Pro" chain, and the distinction matters: Simple is lightweight masked latent resampling, Pro is a real image-edit pipeline for models that genuinely support native edit/inpaint semantics. LLS Pro Image Edit Prepare is the front half of Pro - the node that takes your image, mask, and conditioning and builds the actual workspace the rest of the chain samples.

It does three things at once. First, it cleans up your input: mask_grow (default 24px), mask_blur (8), mask_threshold (0.5), and invert_mask let you shape the region before anything runs. Second, it decides the edit geometry through edit_scope - region (edit in place), crop (crop around the mask for higher local detail, then re-paste), or canvas (expand the canvas for outpainting), with all the crop_context, min_size/max_size, resize_mode, and expand_* knobs that geometry needs. Third, it routes the backend.

The backend routing

backend_mode defaults to auto, and this is where the pack's profile system kicks in. The loader tags the model with a resolved profile; Prepare reads it and decides whether this model gets a native edit path or a fallback local-repair path. sdxl and flux force a family, but still validate compatibility. The LLS_EDIT_INFO output records all of it - including which path (native_edit vs fallback_repair) will actually run - and recommended_denoise hands you the right denoise for the route.

The outputs

latent (what the sampler consumes), work_image and work_mask (the prepared, resized, cropped-or-expanded workspace - inspect these to see what you're actually editing), edit_info, recommended_denoise, and passthrough positive / negative conditioning. The positive/negative outputs are passed through because the backend may need to re-encode them for the chosen route - always wire the outputs, not the originals, downstream.

Where it fits

The full Pro chain is: image + mask → Prepare → LLS Pro KSampler Bridge → VAE Decode → LLS Pro Image Edit Finish. Prepare is the one that turns your loose inputs into a self-contained edit job.

Installing it

cd ComfyUI/custom_nodes
git clone https://github.com/Gin3601/LLS-node
# restart ComfyUI

Or ComfyUI Manager → search "LLS-node". No pip deps - it uses ComfyUI core and the pack's own backend modules.

Gotchas

The model input is optional but recommended: without it, backend routing has nothing to sniff and auto degrades toward a generic fallback. And the crop scope trades global coherence for local detail - if your edit region is huge, crop can produce a scale/style mismatch at the seam, which is exactly what the Finish node's feather and color-match controls exist to fix. Start with edit_scope on auto and let it pick until you have a reason not to.

CategoryLLS/Image Edit

Inputs (24)

NameTypeDefaultDescription
imageIMAGE
maskMASK
vaeVAE
positiveCONDITIONING
negativeCONDITIONING
backend_modeCOMBOauto3 options: auto, sdxl, flux
edit_scopeCOMBOauto4 options: auto, region, crop, canvas
mask_growINT240–2048
mask_blurFLOAT8.00–256
mask_thresholdFLOAT0.500–1
invert_maskBOOLEANfalse
crop_contextINT640–512
crop_context_factorFLOAT1.51–8
min_sizeINT25664–8192
max_sizeINT102464–8192
resize_modeCOMBOfit3 options: fit, pad, stretch
expand_leftINT00–4096
expand_rightINT00–4096
expand_topINT00–4096
expand_bottomINT00–4096
canvas_fillCOMBOedge5 options: edge, blur, black, white, neutral
auto_recommendCOMBOenabled2 options: enabled, disabled
modeloptMODEL
model_infooptSTRING

Outputs (7)

NameTypeDescription
latentLATENT
work_imageIMAGE
work_maskMASK
edit_infoLLS_EDIT_INFO
recommended_denoiseFLOAT
positiveCONDITIONING
negativeCONDITIONING