ComfyUI Node
CWB Embedding Self-Coalesce
Reduce one embedding's locally similar encoded vectors with CWB while preserving optional visual boundaries.
CWB Embedding Self-Coalesce
- cwb_config
- output_filename
- documentation
- cwb_report
◄embedding▾►
◄execution_modeMERGE►
◄cwb_presetbalanced_sim_mean►
◄target_vector_count0►
◄coalesce_similarity_threshold0.95►
◄coalesce_position_window0.10►
◄vision_boundary_embeddingsfalse►
◄legacy_boundary_searchfalse►
◄boundary_reference_embeddingNone►
◄boundary_similarity_threshold0.95►
◄output_filenamecwb_coalesced_embedding►
◄save_dtypefp32►
◄process_devicecuda►
◄lazy_loadtrue►
◄force_clear_cachetrue►
◄override_dtypefalse►
CategoryModelUtils/Embeddings/Merge
Inputs (17)
| Name | Type | Default | Description |
|---|---|---|---|
| embedding | COMBO | Embedding to coalesce. | |
| execution_mode | COMBO | MERGE | MERGE writes a new embedding. DOCUMENTATION ONLY opens no files. |
| cwb_preset | COMBO | balanced_sim_mean | Embedding CWB preset used for multi-input alignment and coalesced row pairs. |
| target_vector_count | INT | 00–100000 | Target body-row count. Zero coalesces every eligible pair; otherwise stops at this count or when no eligible pair remains. |
| coalesce_similarity_threshold | FLOAT | 0.950–1 | Minimum cosine similarity for a mutual-nearest body-row pair to coalesce. |
| coalesce_position_window | FLOAT | 0.100–1 | Maximum normalized row-position distance for an eligible pair. |
| vision_boundary_embeddings | BOOLEAN | false | Enable for complete encoded visual blocks. Start/end rows are validated and preserved; False treats the full tensor as open textual inversion. |
| legacy_boundary_search | BOOLEAN | false | Search and trim legacy template rows using Boundary Reference Embedding. Requires vision boundary mode and a selected reference. |
| boundary_reference_embedding | COMBO | None | Known-clean visual block used by legacy boundary search. Its first and last encoded rows define vision start/end. |
| boundary_similarity_threshold | FLOAT | 0.95-1–1 | Minimum encoded cosine similarity required independently for visual start and end validation. |
| output_filename | STRING | cwb_coalesced_embedding | Filename without extension under ComfyUI's embeddings category. |
| save_dtype | COMBO | fp32 | Requested dtype for generated floating embedding tensors. |
| process_device | COMBO | cuda | Per-tensor FP32 CWB arithmetic device; CUDA OOM retries that tensor on CPU. |
| lazy_load | BOOLEAN | true | Use bounded UEL streaming and release each tensor after its work unit. |
| force_clear_cache | BOOLEAN | true | Clear Python and CUDA caches before each tensor at a possible speed cost. |
| override_dtype | BOOLEAN | false | Force generated floating tensors to Save Dtype. |
| cwb_configopt | CWB_CONFIG | Optional complete CWB configuration override. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| output_filename | * | — |
| documentation | STRING | — |
| cwb_report | STRING | — |