ComfyUI_SamplingUtils
DEPRECATED. Install ComfyUI-UtilsCollection instead from https://github.com/silveroxides/ComfyUI-UtilsCollection
Nodes (63)
Two resolutions from one set of numbers, so base and hires can't disagree
Bundle a pile of anything into one wire
Weight individual phrases by biasing their attention, not their tokens
Drop in a hand-tuned style paragraph without writing it yourself
The same style shelf, rewritten for video models
Camera language that actually moves the shot, without the typos
One color, three formats, zero guessing
Pick a branch, or just pass through
An any-type A/B switch that keeps old workflows alive
The action half of an edit instruction, pre-written and phrased right
Tell the edit model *what* you're editing, in its own language
The prompt that reads like 𝕱𝖗𝖆𝖐𝖙𝖚𝖗 to word filters
API-key rotation and config lookup from a plain JSON file
Ideogram 4's official step counts, as a drag-in sigma node
The CJK-aware cousin of Joiner Padding
Padding that respects sentence boundaries
For tag-style prompts and their filters
The compositing node done right — pure PyTorch, auto-resize, no hunting through other packs
Procedural color noise in eight flavors, seeded and repeatable
Fill a hole by pulling the surrounding pixels in, not by guessing
Stretch the edges inward, telescoping, for holes a single fill can't handle
Make a generated image inherit the reference's color and light
One node that resizes, crops to aspect, and hands you the numbers
Ready-made instruction blocks for image-editing models
Instruction blocks rewritten for video-edit conditioning
A random integer you can actually lock down and replay
Invisible characters between every letter
The padding knob for LLM-based text encoders
The one LoRA loader that actually works against a remote CLIP
Grow, shrink, blur, invert, and batch
Multi-Type Demo (Primitive) is a demo node. Treat it like one.
Paste an AI edit back onto the original without the seam
A random number you can wire to five things at once
Randomness you can reproduce — the seed-friendly integer roller
Stop typing the same number into five widgets
Stop doing the aspect-ratio math in your head
One node that answers 'what size are my tiles?'
`<cat=1.5>`
Klein's chat template with per-token emphasis on top
LTXV 2 conditioning with image reference, system prompt, and bias
One encoder, three model templates, zero guessing
Inject reasoning into a Z-Image prompt
Z-Image's system prompt slot, scaled-bias edition
Precise noise, exactly where you want it
Load a whole folder of images as a batch
Load an image from anywhere, not just the input folder
The system prompts this author spent days writing, for free
The same great edit system prompts, but aimed at video
Two taggers, one clean deduped list
The system prompt slot Flux 2 dev actually wants
The correct chat template for Flux 2 Klein, think block included
The LTX-2 encoder that puts your system prompt where it belongs
One text-encode node that understands all the 2026 chat-template models
Give Z-Image a thinking block it will actually use
The Z-Image encoder with a proper system prompt slot
Run a Qwen3.5 chat inside your graph — braces and all
Burn text onto images without leaving ComfyUI
Load Diffusion Model (Async) — the name oversells it, the loader is fine
The cleanup half of the fraktur trick
One dropdown that drives three prompt families in lockstep
Preset plus your own queries, wrapped in one string
A dropdown of ready-made captioning system prompts
Same node, old name
DEPRECATED
Install ComfyUI-UtilsCollection instead.
=========================================
ComfyUI_SamplingUtils
A collection of utility nodes for ComfyUI providing sampling parameter management, text encoding with system prompts, mask manipulation, image blending, text edit, and more.
Installation
Place this folder in your ComfyUI/custom_nodes/ directory.
Dependencies
pilgram- For image blending modeskornia- For morphological mask operationsscipy- For mask hole filling
Nodes
Sampling & Parameters
SamplingParameters
Category: utils
Centralized sampling parameter management node. Outputs width, height, batch size, upscaled dimensions, steps, CFG scale, seed, and calculated tile dimensions for tiled processing.
- Inputs: width, height, batch_size, scale_by, multiple, steps, cfg, seed
- Outputs: All input parameters plus computed upscaled_width, upscaled_height, tile_width, tile_height, tile_padding
JSON Utilities
GetJsonKeyValue
Category: utils
Loads values from a JSON key-value file with multiple selection methods. Useful for API key rotation or configuration management.
Key ID Methods:
custom- Select a specific key by namerandom_rotate- Randomly select from available keysincrement_rotate- Cycle through keys based on rotation interval
Text Encoding (Conditioning)
TextEncodeSystemPrompt
Category: advanced/conditioning
Unified text encoder supporting multiple model template formats. The recommended node for system prompt injection.
| Model Type | Template Format | Use Case |
|------------|-----------------|----------|
| flux2dev | [SYSTEM_PROMPT]...[/SYSTEM_PROMPT][INST]{}[/INST] | Flux 2 Dev |
| klein | <\|im_start\|>system... with <think> tags | Klein (supports thinking content) |
| z-image | <\|im_start\|>system... format | Z-Image models |
TextEncodeFlux2SystemPrompt
Category: advanced/conditioning
Dedicated encoder for Flux 2 models with LLAMA-style system prompt injection.
TextEncodeKleinSystemPrompt
Category: advanced/conditioning
Encoder for Klein models with support for custom thinking content injection.
TextEncodeZITSystemPrompt
Category: advanced/conditioning
Encoder for Z-Image models using the <|im_start|> template format.
SystemMessagePresets
Category: advanced/conditioning
Provides preset system prompts for Flux 2 models:
F2_SYSTEM_MESSAGE- Standard system messageF2_SYSTEM_MESSAGE_UPSAMPLING_I2I- Image-to-image upsampling promptF2_SYSTEM_MESSAGE_UPSAMPLING_T2I- Text-to-image upsampling prompt
Mask Operations
ModifyMask
Category: utils/mask
Advanced mask manipulation with expansion, contraction, blurring, and hole filling.
Features:
- Expand/contract masks using morphological operations
- Tapered or square corner modes
- Gaussian blur with original pixel preservation
- Incremental expansion rate for animated masks
- Lerp alpha and decay factor for temporal effects
- Optional hole filling
Image Operations
ImageBlendByMask
Category: utils/mask
Composite images using various Photoshop-style blending modes.
Supported Modes:
add, color, color_burn, color_dodge, darken, difference, exclusion, hard_light, hue, lighten, multiply, overlay, screen, soft_light
Image_Color_Noise
Category: utils
Generate procedural noise images with various frequency characteristics.
Noise Types:
grey- Grayscale noisewhite- RGB white noisered,green,blue- Single channel noisepink- 1/f noise (natural frequency distribution)mix- Multi-frequency RGB noise
SU_LoadImagePath
Category: image
Load images from arbitrary file system paths with proper mask handling.
Features:
- Loads from absolute file paths (not just ComfyUI input folder)
- Proper alpha channel extraction for RGBA and palette images
- Full-sized zero mask for images without alpha (not 64x64)
- 16-bit image support with correct normalization
- Multi-frame image support (GIFs)
- EXIF orientation handling
Text Edit
Frakturpad
Category: text
Edits text by converting ASCII letters to Unicode bold fraktur characters (𝕬𝖇𝖈...) and padding with word joiner characters (U+2060). Useful for bypassing text filters while maintaining readability.
UnFrakturPad
Category: text
Reverses the frakturpad operation - removes word joiners and converts bold fraktur back to ASCII.
API Version
This extension uses the ComfyUI V3 API (ComfyExtension, io.Schema).
License
See LICENSE file in the repository root.