Nodes/ComfyUI_omost/Omost Greedy Bags Text Embedding
ComfyUI Node

Omost Greedy Bags Text Embedding

The clever prompt encoding, without the regional masks

By huchenlei·Created 2 years ago·Updated about a year ago· 445
Omost Greedy Bags Text Embedding
  • canvas_conds
  • clip
  • CONDITIONING

Omost Greedy Bags Text Embedding is the quiet utility of the pack, and it's the easiest to underrate. Two inputs - canvas_conds and clip - one output, CONDITIONING. All it does is encode the canvas conditions using Omost's greedy-bag approach and concatenate them into a single conditioning. No masks, no regions, no layout enforcement.

Why does that exist? Because the greedy-bag encoding is genuinely smarter than a naive prompt join, and it's worth having on its own. Omost's canvas regions each carry prefixes and suffixes, and the whole point of the greedy approach is to pack subprompt tokens into CLIP's 77-token window in a way that avoids the semantic truncation you get from naively concatenating long prompts. The node's own source is blunt about the alternative it replaces - joining everything with commas "has the issue of semantic truncation" - and the greedy encoder exists specifically to dodge that. There's even a test file in the repo (tests/greedy_encode_test.py) dedicated to it, which tells you the author treats it as a real piece of engineering, not an afterthought.

So when do you actually use it? When you want Omost's high-quality encoding of a rich, region-structured prompt but you don't want the regional conditioning itself. That's a real scenario: feeding one global prompt into a workflow that does no area conditioning, or testing whether the region masks are even helping your image, or building an A/B comparison - the pack ships examples/full_compare.json, which is exactly that kind of setup. It's the "encode it smart, let the sampler decide" option.

The tradeoff is obvious once stated: you lose all spatial control. The output is one global conditioning with every region's bags mashed together, and the pooled output comes from the first region. If your two subjects keep swapping attributes, this node won't help - that's what the layout nodes are for. But as a building block, say to isolate greedy encoding against a plain CLIP text encode in an experiment, it's the cleanest way to compare one variable at a time. Just know what you're giving up.

Categoryomost

Inputs (2)

NameTypeDefaultDescription
canvas_condsOMOST_CANVAS_CONDITIONING
clipCLIP

Outputs (1)

NameTypeDescription
CONDITIONINGCONDITIONING