Nodes/Model Utility Toolkit/CWB Embedding Self-Coalesce
ComfyUI Node

CWB Embedding Self-Coalesce

Reduce one embedding's locally similar encoded vectors with CWB while preserving optional visual boundaries.

By silveroxides·Created about a year ago·Updated about 21 hours ago· 14
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)

NameTypeDefaultDescription
embeddingCOMBOEmbedding to coalesce.
execution_modeCOMBOMERGEMERGE writes a new embedding. DOCUMENTATION ONLY opens no files.
cwb_presetCOMBObalanced_sim_meanEmbedding CWB preset used for multi-input alignment and coalesced row pairs.
target_vector_countINT00–100000Target body-row count. Zero coalesces every eligible pair; otherwise stops at this count or when no eligible pair remains.
coalesce_similarity_thresholdFLOAT0.950–1Minimum cosine similarity for a mutual-nearest body-row pair to coalesce.
coalesce_position_windowFLOAT0.100–1Maximum normalized row-position distance for an eligible pair.
vision_boundary_embeddingsBOOLEANfalseEnable for complete encoded visual blocks. Start/end rows are validated and preserved; False treats the full tensor as open textual inversion.
legacy_boundary_searchBOOLEANfalseSearch and trim legacy template rows using Boundary Reference Embedding. Requires vision boundary mode and a selected reference.
boundary_reference_embeddingCOMBONoneKnown-clean visual block used by legacy boundary search. Its first and last encoded rows define vision start/end.
boundary_similarity_thresholdFLOAT0.95-1–1Minimum encoded cosine similarity required independently for visual start and end validation.
output_filenameSTRINGcwb_coalesced_embeddingFilename without extension under ComfyUI's embeddings category.
save_dtypeCOMBOfp32Requested dtype for generated floating embedding tensors.
process_deviceCOMBOcudaPer-tensor FP32 CWB arithmetic device; CUDA OOM retries that tensor on CPU.
lazy_loadBOOLEANtrueUse bounded UEL streaming and release each tensor after its work unit.
force_clear_cacheBOOLEANtrueClear Python and CUDA caches before each tensor at a possible speed cost.
override_dtypeBOOLEANfalseForce generated floating tensors to Save Dtype.
cwb_configoptCWB_CONFIGOptional complete CWB configuration override.

Outputs (3)

NameTypeDescription
output_filename*
documentationSTRING
cwb_reportSTRING