Nodes/Model Utility Toolkit/CWB Embedding Multi-Merge
ComfyUI Node

CWB Embedding Multi-Merge

CWB-merge 2 to 8 embeddings, then coalesce locally similar output vectors.

By silveroxides·Created about a year ago·Updated about 21 hours ago· 14
CWB Embedding Multi-Merge
  • cwb_config
  • output_filename
  • documentation
  • cwb_report
embedding_count2
embedding_1
embedding_2
embedding_3None
embedding_4None
embedding_5None
embedding_6None
embedding_7None
embedding_8None
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_merged_coalesced_embedding
save_dtypefp32
process_devicecuda
lazy_loadtrue
force_clear_cachetrue
override_dtypefalse
CategoryModelUtils/Embeddings/Merge

Inputs (25)

NameTypeDefaultDescription
embedding_countCOMBO2Number of consecutive embedding inputs to merge.
embedding_1COMBOPrimary embedding and normal visual-boundary anchor.
embedding_2COMBOSecond equal-prior embedding contributor.
embedding_3COMBONoneOptional embedding contributor.
embedding_4COMBONoneOptional embedding contributor.
embedding_5COMBONoneOptional embedding contributor.
embedding_6COMBONoneOptional embedding contributor.
embedding_7COMBONoneOptional embedding contributor.
embedding_8COMBONoneOptional embedding contributor.
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_merged_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