Skip to content

Artificial-Sweetener/SimpleSyrup

Repository files navigation

SimpleSyrup

License: AGPL-3.0-or-later Comfy Registry Comfy Registry downloads Python

SimpleSyrup is a ComfyUI node pack that grew out of moving my A1111/WebUI image workflows into ComfyUI graphs.

The WebUI side shows up in the things I kept reaching for: ADetailer-style inline [SEP] prompt batches, tiled diffusion, familiar checkpoint loader controls, CLIP skip where WebUI users expect it, and sampler/scheduler extras. The Comfy side matters just as much: the detailers are modeled heavily on ComfyUI Impact Pack's SEGS workflow, and the utility nodes are built for graph readability, ordered data, and explicit runtime behavior.

SimpleSyrup pulls from a few different places:

  • Moving from A1111/WebUI to ComfyUI is the reason this pack brings tiled diffusion, familiar checkpoint loader control grouping, ADetailer-style prompt splitting, and A1111-flavored sampler behavior into node graphs.
  • ComfyUI Impact Pack is the main influence for the SEGS and detailer shape: detectors create SEGS, detailers sample cropped areas, masks are feathered, and results are composited back into the source image.
  • ADetailer is the influence for inline [SEP] per-segment prompt batches.
  • The remaining utility pieces cover practical graph needs: GPU Lanczos resizing through TorchLanc, latent provenance helpers, and smaller nodes for image, prompt, and conditioning workflows.

Highlights

  • Impact-compatible SEGS detection, sorting, combining, tiling, and detailing.
  • Detailer nodes modeled heavily on ComfyUI Impact Pack's SEGS workflow.
  • ADetailer-style inline [SEP] per-segment prompt batches.
  • MultiDiffusion, Mixture of Diffusers, and regional MultiDiffusion sampling paths.
  • A WebUI-familiar checkpoint loader with CLIP skip and VAE override controls.
  • A Simple Anima loader that keeps Anima's model, VAE, dtype, and device controls together.
  • Loaders for SAM, GroundingDINO, ViTMatte, Ultralytics, and WD14.
  • Tile, tag, and guide workflows that can generate conditioning from WD14 or a configured external vision LLM.
  • KSampler extras including A1111-style Euler ancestral behavior, AYS, GITS, automatic A1111 scheduling, and beta57.
  • GPU Lanczos resizing through TorchLanc, with batch and mask handling.
  • Normal and tiled VAE encode/decode option nodes with spatial and temporal tiling controls.
  • Expandable SEGS and conditioning batch helpers for larger regional graphs.
  • Provenance-aware latent helpers for recovering the latent behind an unmodified decoded image.
  • Settings-backed model dropdowns that can show known downloadable models or only locally installed ones.

Installation

Recommended: install through ComfyUI Manager

Open Manager from the ComfyUI toolbar, click Custom Nodes Manager, search for SimpleSyrup, and click Install. Restart ComfyUI after installation.

Manual install

If you would rather install it yourself, clone this repo into ComfyUI/custom_nodes/, activate your ComfyUI venv, and install this node pack's requirements.

cd ComfyUI\custom_nodes
git clone https://github.com/Artificial-Sweetener/SimpleSyrup.git
cd SimpleSyrup
pip install -r requirements.txt

ComfyUI already provides the heavy shared runtime stack, including PyTorch. SimpleSyrup adds the packages it needs for specific features, including TorchLanc, Ultralytics, ONNX Runtime, Segment Anything, and Hugging Face download helpers.

The Nodes

SimpleSyrup is organized around workflow jobs, not socket types.

Impact-Style SEGS Workflows

SimpleSyrup speaks the Impact Pack SEGS shape on purpose. It can read Impact-style SEGS, sort them, combine them, tile them, and emit SEGS payloads that Impact-style consumers can read.

The detailer nodes are modeled heavily on ComfyUI Impact Pack. Detectors create SEGS, SEGS choose the crop areas, crops are sampled, masks are feathered, and the results are composited back into the source image.

  • Prompt SEGS w/ SAM uses GroundingDINO to find prompt-matched boxes, SAM to segment them, optional negative prompting to subtract unwanted areas, and optional ViTMatte refinement to clean up mask edges. It returns both SEGS and a combined mask.
  • Detect SEGS w/ Ultralytics runs bbox or segmentation detection, filters by threshold and size, supports label filtering, and returns Impact-compatible SEGS plus a combined mask.
  • Batch SEGS combines multiple SEGS inputs into one ordered SEGS payload.
  • Detail SEGS by Scale Factor upscales each SEG crop, samples it, downsizes it back, and composites it into the original image with feathering and optional denoise masks.
  • Detail SEGS by Scale Factor w/ Tiled Diffusion uses the same crop/detail idea, but samples large crops through SimpleSyrup's tiled diffusion path.
  • Detail SEGS as Regions runs one regional MultiDiffusion pass over the image and pairs every SEG with its matching CONDITIONING_BATCH entry.

The regional node is different from the per-crop detailers. It samples one full-image latent with regional conditioning, using the global prompt for full-image context while each SEG gets its own positive conditioning.

Per-Segment Prompt Batches

SimpleSyrup layers the ADetailer habit I missed from WebUI on top of the Impact-style detailer shape: writing per-segment prompt batches inline with [SEP].

Those prompts become an ordered CONDITIONING_BATCH, so prompt 1 stays matched to SEG 1, prompt 2 stays matched to SEG 2, and so on. This keeps the graph readable when each detected item needs its own prompt.

  • Encode Prompt Batch splits prompt text with [SEP] and encodes ordered positive and negative CONDITIONING_BATCH values.
  • Conditioning Batch Start and Conditioning Batch Append build ordered conditioning batches for per-segment and regional workflows.
  • Batch Region Conditioning combines normal CONDITIONING values and existing CONDITIONING_BATCH values into one ordered regional batch.
  • Encode Prompt Batch w/ Prompt Control is exported when Prompt Control is installed. It keeps the [SEP] batching workflow while letting Prompt Control handle prompt scheduling and encoding.
  • Schedule & Encode Prompts is also exported when Prompt Control is installed. It schedules Prompt Control LoRA tags, encodes positive and negative prompts, and returns normal conditioning or SimpleSyrup batches depending on whether [SEP] is used.

Tile, Tag, and Guide

Tile & Tag SEGS is for workflows where tile regions should carry their own generated prompt guidance.

It splits an image into deterministic tile SEGS, crops each tile, runs WD14 tagging on each crop, prefixes your universal positive prompt text, and CLIP-encodes the resulting prompts into a CONDITIONING_BATCH. The order matters: the conditioning batch is aligned to the tile SEGS order so downstream per-SEG or regional nodes can pick the right prompt for the right area.

That is the kind of thing that is easy to do once by hand and annoying to keep correct in a real graph.

  • Tag SEGS w/ WD14 tags existing SEGS crops with a connected WD14 tagger and returns conditioning aligned to the original SEGS order.
  • Tag SEGS w/ External LLM sends each SEG crop to a configured vision-capable external LLM, formats the returned tags, and returns aligned conditioning for detail or regional workflows.

External LLM Prompting

External LLM Prompt sends system and user prompts to a configured OpenAI-compatible provider and returns the assistant response as text. It can also include the first image from an optional image input when the selected provider model supports vision.

The external LLM nodes use the endpoint and API key configured in SimpleSyrup settings.

Tiled Sampling

KSampler (Tiled Diffusion) is a KSampler-style node with selectable MultiDiffusion and Mixture of Diffusers modes.

It splits the latent into tiles, denoises tile predictions, and blends them back together during sampling. MultiDiffusion averages overlapping predictions. Mixture of Diffusers uses weighted blending. Both are there because large images and large upscale passes often need a different strategy than normal full-latent denoising.

Tiled diffusion is here because it was one of the high-resolution workflow tools I kept reaching for in my WebUI setup. SimpleSyrup brings MultiDiffusion and Mixture of Diffusers behavior into normal Comfy sampling nodes, so large latent jobs can be tiled without giving up Comfy's explicit conditioning and graph wiring.

This also matters for Anima workflows. Anima can produce beautiful images, but pushing beyond its comfortable native size with untiled diffusion upscale can smear detail instead of improving it. The tiled path gives those workflows another route.

Diffusion Loaders

Simple Load Checkpoint is meant to feel familiar if you come from WebUI, where the common generation controls live near the model selection.

  • Simple Load Checkpoint loads a checkpoint, optionally replaces the checkpoint VAE, and keeps CLIP skip in the same place.
  • Simple Load Anima is for Anima workflows. It loads Anima with the Qwen text encoder and Qwen image VAE it expects. You can choose the files yourself or let SimpleSyrup resolve the known Anima assets automatically. It keeps model, VAE, dtype, and device decisions together so the rest of the graph can get on with the image.

Model and Detector Loaders

These nodes load the models used by detection, segmentation, tagging, matting, and compatibility workflows.

  • SAM Model Loader loads SAM, SAM-HQ, and MobileSAM choices for segmentation workflows.
  • GroundingDINO Model Loader loads GroundingDINO with an explicit BERT text encoder.
  • ViTMatte Model Loader loads ViTMatte for mask edge refinement.
  • Load Ultralytics Model loads an Ultralytics detector and exposes both SimpleSyrup's native detector model and Impact-style compatibility outputs.
  • Load WD14 Tagger loads a SmilingWolf WD14 ONNX model and its tag CSV.
  • LayerStyle SAM Models Adapter splits a LayerStyle LS_SAM_MODELS bundle into separate SAM_MODEL and DINO_MODEL outputs.
  • Grounded SAM Model Info returns JSON metadata for selected SAM and GroundingDINO models.

The LayerStyle adapter exists because good ComfyUI workflows should not make you reload the same SAM or GroundingDINO model just because one node pack uses a different socket shape.

Sampler and Scheduler Extras

KSampler (Extras) keeps the normal Comfy sampler shape, but adds sampler and scheduler behavior I wanted available without dragging in a separate sampler stack.

It includes:

  • euler_a_a1111, an A1111/k-diffusion-style Euler ancestral sampler.
  • AYS SD1 and AYS SDXL schedules.
  • GITS.
  • automatic_a1111 scheduler behavior.
  • beta57, a local reimplementation of the RES4LYF beta57 scheduler preset.

The node still uses Comfy-style seed handling, partial denoise behavior, progress callbacks, and normal positive/negative conditioning inputs.

Image, Prompt, and Latent Utilities

These nodes handle the smaller jobs that show up all over image workflows.

  • Resize Image to Target resizes image batches with stretch, keep-aspect, crop, and pad modes. It can round output dimensions to a divisibility target, anchor crop or pad placement, process batches in chunks, resize a mask with the image, and use GPU Lanczos through TorchLanc.
  • Simple VAE Encode encodes an image to latent space, but reuses the source latent when the graph proves the image came from an unmodified VAEDecode.
  • Upscale Latent From Image finds the latent behind an unmodified decoded image and expands to Comfy's latent upscale behavior.
  • VAE Encode (Options) and VAE Decode (Options) wrap ComfyUI's normal and tiled VAE paths behind one explicit tiling toggle, with spatial and temporal tile controls available when tiling is enabled.
  • Latent Diagnostics passes a latent through unchanged while reporting shape, dtype, device, and tiling-fit details.
  • Prompt Encode Style creates Prompt Control style tags from an encode-style selection.
  • Prompt Encode Style & Normalization creates Prompt Control style and normalization tags together.
  • Scale Factor provides a bounded scale multiplier for nodes that expect one.
  • Seed provides a reusable seed value with ComfyUI seed controls.

The provenance nodes trace the graph. They do not guess from tensor values. If an image has been loaded, edited, cropped, detailed, resized, or otherwise changed, the original latent provenance is broken and the node will not pretend otherwise.

Settings

SimpleSyrup adds ComfyUI settings for model visibility and external LLM access:

  • SimpleSyrup: Show downloadable models in loader dropdowns controls whether known downloadable SAM, GroundingDINO, ViTMatte, and WD14 models appear before they are installed locally.
  • SimpleSyrup: External LLM endpoint stores the OpenAI-compatible base URL used by external LLM prompt nodes.
  • SimpleSyrup: External LLM API key stores the API key for that endpoint in OS credential storage.

When downloadable models are shown, supported loaders list known model choices even if the files are not installed yet. When they are hidden, those dropdowns only show models SimpleSyrup can verify locally. Anima's automatic Qwen text encoder and VAE resolution is handled by the Anima loader itself.

License & Acknowledgements

SimpleSyrup is licensed under the GNU Affero General Public License v3.0 or later (AGPL-3.0-or-later). Please read the full LICENSE included with this repo.

AGPL-3.0-or-later is a strong copyleft license. If you convey SimpleSyrup or a modified version, you must provide the corresponding source; and if you let users interact with a modified version over a network, you must offer those users the corresponding source for that modified version.

SimpleSyrup owes a lot to other projects:

SimpleSyrup also vendors or reimplements selected third-party behavior for SAM-HQ, MobileSAM, GroundingDINO, AUTOMATIC1111 sampler behavior, k-diffusion, and tiled diffusion behavior. See third_party/NOTICE.md for the full third-party notices.

Research Citations

SimpleSyrup's tiled diffusion behavior is based on ideas from MultiDiffusion and Mixture of Diffusers.

@article{bar2023multidiffusion,
  title={MultiDiffusion: Fusing Diffusion Paths for Controlled Image Generation},
  author={Bar-Tal, Omer and Yariv, Lior and Lipman, Yaron and Dekel, Tali},
  journal={arXiv preprint arXiv:2302.08113},
  year={2023}
}
@article{barbero2023mixture,
  title={Mixture of Diffusers for scene composition and high resolution image generation},
  author={Barbero Jimenez, Alvaro},
  journal={arXiv preprint arXiv:2302.02412},
  year={2023}
}

From the Developer 💖

  • Buy Me a Coffee: You can help fuel more projects like this at my Ko-fi page.
  • My Website & Socials: See my art, poetry, and other dev updates at artificialsweetener.ai.
  • If you like this project, it would mean a lot to me if you gave me a star here on GitHub!! ⭐

About

Practical ComfyUI nodes for image workflows

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors