ComfyUI-UtilsCollection
A ComfyUI extension with 229 custom nodes.
Nodes (229)
ComfyUI-UtilsCollection
A collection of ComfyUI nodes for modern text and multimodal conditioning, image and mask processing, prompt presets, workflow parameters, loading, and general utilities. The encoder nodes track current ComfyUI Core behavior while retaining compatible legacy node IDs where practical.
Available nodes
The list below uses the canonical node IDs. Deprecated compatibility aliases remain registered for existing workflows but are not duplicated here.
Text encoding and conditioning
UC_TextEncodeSystemPromptUC_TextEncodeLtxv2SystemPromptUC_WeightedTextEncodeSystemPromptUC_TextEncodeSystemEditAdvancedUC_TextEncodeGemmaSystemEditAdvancedUC_AdvancedVisualConditioningEncodeUC_AdvancedVisualConditioningEncodeTokenFusionUC_AdvancedMiniMaxH3ImageToVideoUC_AdvMiniMaxH3ImageToVideoTokenFusionUC_AdvancedMiniMaxH3ImageToVideoCombinedUC_AdvMiniMaxH3ImageToVideoCombinedTokenFusionUC_MiniMaxH3MediaConfigUC_MiniMaxH3FirstFrameReferencesUC_AdvancedVisConEncoderUC_AdvancedVisConEncoderTokenFusionUC_VisualConsensusConfigurationUC_AdvancedConsensusConfigurationUC_Krea2TokenAttentionWeightUC_Krea2TokenAttentionWeightTokenFusionUC_AttentionBiasTextEncodeUC_TextConsensusBlendConfigUC_VisualFusionConfigUC_ConditioningConsensusBlendUC_VLMInputEmbedsUC_Krea2LayerProbeUC_Krea2LayerAblatorUC_MiniMaxH3ClipProjectionPatcherUC_EncoderNodesGuide
MiniMax H3 CLIP projection models
UC_MiniMaxH3ClipProjectionPatcher projects a Qwen3-VL 4B or 8B text encoder into MiniMax H3's 32B conditioning space. Load the encoder with Core's Load CLIP node using type minimax, then connect it to the projection patcher.
Download one projection matching the encoder size into ComfyUI/models/clip_projections/:
- Qwen3-VL 4B v3.1
- Qwen3-VL 4B v3.1 with residual MLP
- Qwen3-VL 8B v3.1
- Qwen3-VL 8B v3.1 with residual MLP
Only one projection is used at a time. The control and obsolete/ files in the model repository are not normal generation models.
UC_AdvancedMiniMaxH3ImageToVideo: Qwen-only 1024 VLM example
The optional MiniMax H3 Media Configurator adds ordered timestamped images as one Qwen Video timeline without VAE-encoding those images. Existing Pictures remain first and may still use Picture fusion; Video blocks are never fused. Optional audio is encoded by the connected MiniMax H3 audio VAE as native reference audio, while Qwen receives only an Audio label. User timestamp precision is preserved in Qwen's Video labels.
Workflow JSON | API workflow JSON | Workflow overview | Reference images | Turbo LoRA used
This example uses eight chronological storyboard frames as 1024-resolution Qwen3-VL/DeepStack references. The prompt associates each ordered <Picture N> entry with a target timestamp. With ref_image_size set to none, the images provide visual-token conditioning without VAE reference encoding.
The workflow demonstrates strong subject, composition, and approximate timeline control without a native reference video. Its eight images reproduced the main framing and progression of a 12.25-second source sequence in seven sampling steps on a 16 GB GPU. Picture timestamps are prompt instructions, not fixed frame anchors, so results remain stochastic.
Extract the separately hosted reference-image ZIP into ComfyUI/input before loading either workflow.
The workflow uses Core's Create Video and Save Video nodes and requires no other custom-node collection.
For headless use, start ComfyUI with its API reachable, extract the reference ZIP, then run:
python workflows/UC_AdvancedMiniMaxH3ImageToVideo/run_api_workflow.py C:\path\to\reference-images
The standard-library runner uploads the eight images, substitutes the returned server filenames into the unchanged API workflow, queues it, waits for completion, and prints the saved-output metadata. Use --server http://host:8188 for another ComfyUI server and --seed N to override the workflow seed.
Advanced visual consensus
UC_AdvancedVisConEncoder runs two sequential stages: it first constructs a
complete spatially fused conditioning independently at every selected VLM
resolution, then passes those complete conditionings through the same consensus
mathematics as UC_ConditioningConsensusBlend. Spatial fusion and consensus
are not alternatives and are never crossfaded.
UC_AdvancedVisConEncoderTokenFusion is the additive token-first alternative.
At each lane and resolution it fuses per-source visual and DeepStack tokens,
runs one conditioning encode, then applies the same complete-conditioning
consensus across resolution samples. The original node remains unchanged.
Use UC_VisualConsensusConfiguration to combine one complete
UC_VisualFusionConfig with one UC_AdvancedConsensusConfiguration. Fusion
method off disables the spatial stage; consensus preset off disables the
cross-resolution consensus stage. Advanced Consensus Configuration inherits
the complete Text Consensus Blend Configurator contract and adds
resolution_samples plus a 32-aligned sample_offset.
block_size is specific to block-interleave. dither_ratio and
dither_secondary_pattern are specific to random-dither. Advanced Consensus
Configuration exposes resolution_samples and sample_offset. Offset defaults
to 32 and supports 32 through 512 in 32-unit steps. The configured sample
count is exact, so 1 remains one
resolution sample regardless of visual-source or batch-lane count. Original VLM
resolution supports one sample but cannot construct adjacent resolution
variants.
A batch in the only connected image socket behaves like its images were connected as separate visual sources. With multiple connected batched sockets, equal indices form independent lanes, singleton sockets broadcast, and all other batch lengths must match. Raw visual export uses the same spatial mask as the base-resolution conditioning fusion.
Image, mask, and compositing
UC_Image_Color_NoiseUC_ExtractPrevalentColorsUC_ModifyMaskUC_ImageBlendByMaskUC_ImagePadUC_CropByMaskUC_StagedLayerCropsUC_ImageCropMergeUC_ExtractMaskUC_ExtractImageUC_ImageAndMaskResizeUC_ResizeMaskUC_BackgroundRemovalPreserveAlphaUC_UnifiedBackgroundReplaceUC_StagedLayeredBackgroundCompositeUC_StagedIndividualCompositesUC_StagedLayeredBackgroundCompositeOptionsUC_StagedMediaPipeFaceBackgroundCompositeUC_StagedMediaPipeFaceOptionsUC_LayeredBackgroundCompositeUC_MediaPipeFaceCompositeOptionsUC_MediaPipeFaceCompositeUC_ListToImageBatchUC_ImageMatchPropertiesUC_OpticalFlowCompositeUC_ImageInwardEdgeFillUC_ImageIterativeStretchFillUC_TextOverlayNodeUC_CompositeNodesGuide
UC_StagedLayeredBackgroundComposite builds a scene from a background and ordered foreground sockets. Use run_staging to retain cutouts and populate the placement editor. Use run_staged to composite retained cutouts without loading models or evaluating foreground branches. Use full_run to restage and composite in one queue. foreground_0 is the backmost layer. Retained cutouts are held in server memory and must be recreated after restarting ComfyUI.
UC_StagedMediaPipeFaceBackgroundComposite detects faces in each foreground and adds them as independently placeable layers. The background and face options nodes contain removal, extraction, feathering, and blend settings. UC_StagedIndividualComposites provides the same ordinary foreground staging editor but returns one full-background image, placement mask, and box per included foreground without stacking them. UC_BackgroundRemovalPreserveAlpha directly returns source-resolution RGBA images and their soft alpha masks; existing RGBA inputs keep their supplied alpha without model execution.
Staged compositor example
Workflow JSON | Workflow overview | Source assets
<img src="workflows/CompositorExampleWorkflow.jpg" alt="Staged MediaPipe face background compositor workflow" width="1200">Resolution and workflow parameters
UC_AdjustedResolutionParametersUC_ResolutionSelectorExtendedUC_VideoResolutionSelectorUC_ImageScaleAndResolutionPickerUC_SwitchInverseNodeUC_SoftSwitchInverseNodeUC_IntegerRangeRandomUC_RandIntUC_StaticIntUC_StaticFloatUC_RandIntRangeUC_ColorConvertNodeUC_SeedClusterUC_FromSeedClusterUC_ExtractBoundingBoxUC_AdjustBoundingBoxUC_Ideogram4BoundingBoxCropUC_HighResolutionTileSplitUC_HighResolutionTileAccumulatorUC_HighResolutionTilingGuide
Prompt presets
UC_SystemMessagePresetsUC_SystemMessageVideoPresetsUC_InstructPromptPresetsUC_InstructPromptVideoPresetsUC_BonusPromptPresetsUC_BonusPromptVideoPresetsUC_EditTargetPresetsUC_EditOpPresetsUC_CameraShotPresetsUC_VLMSysInstrPresetsUC_VLMSysInstrPresetsExperimentalUC_VLMSysInstrLegacyPresetsUC_VLMSysQueryAddPresetsUC_VLMSysQueryRawPresetsUC_VLMSysInstrAdvPresetsUC_VLMSysInstrAdvPresetsExperimentalUC_MiniMaxH3VLMSysInstrPresetsUC_MiniMaxH3VLMSysInstrPresetsExperimentalUC_MiniMaxH3VLMSysInstrAdvPresetsUC_MiniMaxH3VLMSysInstrAdvPresetsExperimentalUC_LegacyPromptPresetsUC_UnifiedPresets
Loading, text generation, and text utilities
UC_LoadImagePathUC_LoadImageDirectoryUC_LoadImageWithAlphaUC_SampleVideoFramesAsImagesUC_ImagesToVideoTimelineUC_LoraLoaderCLIPOnlyUC_TextGenerateUC_TextGenerateQwen35SystemPromptUC_EmbeddingDetokenizerAnalysisUC_ImageToVideoPromptUC_TagNormalizeCombineUC_FromListUC_GetJsonValueUC_MiniMaxH3CacheUC_MiniMaxH3SpectrumUC_UnifiedAttentionPatcherUC_MarkdownPreviewUC_BoldFrakturTextStyleUC_UnBoldFrakturTextStyleUC_WordJoinerUC_UnWordJoinerUC_JSONMinifyRepairUC_StringUnescapeUC_TextConcatenateAutogrowUC_TextConcatenateListsAutogrowUC_Newline
Scheduler presets
Ideogram4SchedulerPresetUC_SigmaRescaleUC_DiscardPenultimateSigmaUC_SigmoidOffsetSchedulerUC_PowerShiftSchedulerUC_RadianceShiftSchedulerUC_SigmaCurveFromPointsSchedulerUC_SigmaCurvePchipScheduler
The migrated schedulers also register sigmoid_offset, power_shift,
radiance_shift, sigma_curve_from_points, and sigma_curve_pchip for Core
scheduler selectors. The Power Shift scheduler was inspired by
InverserSquaredScheduler.
UC_SigmaRescale maps an existing schedule to exact start and end sigma
values without changing its shape or number of steps.
The dedicated scheduler nodes do not include Core-style denoise controls or
optional penultimate-sigma controls. Connect UC_SigmaRescale after a
scheduler when setting image-to-image noise levels. Connect
UC_DiscardPenultimateSigma when the selected sampler requires penultimate
sigma removal. Radiance Shift performs its required compensated removal
internally. Sigmoid Offset retains its model-specific start_sigma
adjustment.
Logic and math
UC_LogicIFUC_LogicANDUC_LogicORUC_LogicNOTUC_LogicXORUC_MathAddUC_MathSubtractUC_MathMultiplyUC_MathDivideUC_MathPowerUC_MathFloorUC_MathCeilUC_MathRoundUC_MathModuloUC_MathAbsUC_MathSqrtUC_MathSinUC_MathCosUC_MathTanUC_MathMinUC_MathMaxUC_MathClampUC_MathNumberConvertUC_StringToNumberUC_NumberToStringUC_MathCompareUC_MathOperationUC_MathAspectRatio
These nodes replace the equivalent nodes from ComfyUI-LogicMath, ComfyUI_SigmoidOffsetScheduler, and ComfyUI_PowerShiftScheduler. Remove the standalone pack before accepting ComfyUI's workflow replacement prompt.