LLS Pro Image Edit Prepare
The front half of a proper edit pipeline — build the workspace, pick the backend
- image
- mask
- vae
- positive
- negative
- model
- latent
- work_image
- work_mask
- edit_info
- recommended_denoise
- positive
- negative
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.
Inputs (24)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| mask | MASK | — | |
| vae | VAE | — | |
| positive | CONDITIONING | — | |
| negative | CONDITIONING | — | |
| backend_mode | COMBO | auto | 3 options: auto, sdxl, flux |
| edit_scope | COMBO | auto | 4 options: auto, region, crop, canvas |
| mask_grow | INT | 240–2048 | — |
| mask_blur | FLOAT | 8.00–256 | — |
| mask_threshold | FLOAT | 0.500–1 | — |
| invert_mask | BOOLEAN | false | — |
| crop_context | INT | 640–512 | — |
| crop_context_factor | FLOAT | 1.51–8 | — |
| min_size | INT | 25664–8192 | — |
| max_size | INT | 102464–8192 | — |
| resize_mode | COMBO | fit | 3 options: fit, pad, stretch |
| expand_left | INT | 00–4096 | — |
| expand_right | INT | 00–4096 | — |
| expand_top | INT | 00–4096 | — |
| expand_bottom | INT | 00–4096 | — |
| canvas_fill | COMBO | edge | 5 options: edge, blur, black, white, neutral |
| auto_recommend | COMBO | enabled | 2 options: enabled, disabled |
| modelopt | MODEL | — | |
| model_infoopt | STRING | — |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| latent | LATENT | — |
| work_image | IMAGE | — |
| work_mask | MASK | — |
| edit_info | LLS_EDIT_INFO | — |
| recommended_denoise | FLOAT | — |
| positive | CONDITIONING | — |
| negative | CONDITIONING | — |