comfyui-turing-utils Introduction
comfyui-turing-utils adds ComfyUI nodes and GPU optimizations for image and video workflows, with a particular focus on NVIDIA Tensor Core GPUs, including Turing-generation cards and newer architectures. It brings together model-loading options, attention strategies, reference and mask tools, and practical utilities for longer video projects.
For you, the main benefit is workflow control. You can prepare references once and reuse them, choose how a model handles attention, manage which parts of a video should be regenerated, and assemble continuation segments without loading an entire finished video as one image batch. Some performance and memory decisions happen automatically; others are exposed as node settings so you can balance speed, memory use, and workflow needs.
The extension supports workflows involving Qwen Image 2.1, Krea2 Identity Edit, Bernini, Wan, MiniMax H3, and SeC. It also includes general-purpose nodes that are useful beyond a single model, such as optional-input handling, mask-guided cropping, video outpainting preparation, and sigma-schedule export.
GPU acceleration depends on the supported CUDA environment and the appropriate companion kernel package. A node’s availability does not, by itself, guarantee that every model, attention backend, or workflow will run on every GPU. In particular, some reported performance results are operator benchmarks rather than validated end-to-end image or video results.
How comfyui-turing-utils Works
ComfyUI workflows are built by connecting nodes: one node loads a model, another prepares a reference or mask, a sampler generates a latent, and a decoder turns that latent into viewable images or video. comfyui-turing-utils adds specialized nodes at these points rather than replacing the whole workflow.
A few ideas help explain the extension:
- Latents are a model’s working canvas. They contain the video or image information the sampler works on before decoding. Several H3 tools modify or upscale this canvas without decoding and re-encoding every step.
- Masks tell a workflow what to protect or redraw. In video latent masking, black means preserve and white means redraw. The extension maps frame-by-frame masks onto the model’s smaller latent grid. Because several image pixels or frames can contribute to one latent cell, this mapping favors retaining small masked regions rather than accidentally losing them.
- References provide context. A character image, source video, first frame, or last frame can guide generation. H3 nodes separate the step that prepares semantic meaning from the step that combines references with a target latent, so changing the final canvas does not necessarily mean repeating reference understanding.
- Attention is how a model relates information across a sequence. Dense attention considers the full supported layout. Sparse strategies select or summarize parts of it to help with long sequences. Think of it as consulting a carefully chosen set of notes instead of repeatedly rereading every page. Different strategies make different trade-offs, so their settings should be tested on your own scenes.
- Continuation context is temporary. When extending a video, you can provide earlier frames and audio to guide the next segment, then trim that repeated prefix before saving. This prevents duplicated frames when the saved segments are merged.
For MiniMax H3, the extension also adjusts activation-memory use automatically. When a full operation will not fit comfortably, it can process rows or groups of attention heads in smaller pieces while keeping the operation’s intended full-sequence context. This may make a constrained workflow possible, but it cannot overcome every memory limit: the final output and the selected attention method’s essential working data must still fit.
comfyui-turing-utils Features
Model loading and image conditioning
Load ConvRot DiTloads compatible diffusion models and supports W8A8, W4A8, W4A4, and ComfyUI-native NVFP4 layers where applicable. Its attention choices arew8a8by default,sage, andsdpa. Mixed supported weight formats can be handled layer by layer rather than requiring you to convert an entire model to one format.Load ConvRot CLIPloads a compatible text encoder independently of the diffusion model. For Qwen Image 2.1, its quantized encoding is scoped to that text encoder.- Qwen Image 2.1 utilities include
Qwen Image 2.1 多图优化, a model-local multi-image optimization switch, andQwen Image 2.1 多图条件, which avoids encoding an unused negative prompt when CFG is 1. See the Qwen Image 2.1 integration notes for limits and measurements. Krea2 Identity Edit Conditioningcombines a required character image with an optional background or edit canvas. When both images are present, they are passed in the fixed order background, then character. The node prepares both references and returns a patched model and one conditioning output. Use the same target latent as an input to this node and as the latent input to KSampler; the node does not pass that latent through as an output. Its character/background strengths default to4/1. Setting both to1removes the extra attention bias and retains the fastest native attention path. For the recommended Turbo workflow at CFG 1, connect its conditioning output to both KSampler’s positive and negative inputs. Apply a compatible Identity Edit LoRA before this node.Bernini Inpaint Conditionbegins from a source-video latent and supports local or global repainting. It can also add the source as aligned context tokens.Bernini Context Windowsprovides reference-aware Wan context windows, with a choice of absolute or official relative temporal positions.
Attention and reference efficiency
Configure Attention Strategy provides one place to select Sol, SLA, Veda, Spark, or none. The controls shown depend on the selected strategy, so you do not have to work through unrelated settings.
- Sol is a model-generic sparse attention option for long sequences. It includes safeguards that keep selected sampling steps or layers dense and can protect reference regions. It inherits an explicitly selected
w8a8,sage, orsdpabackend where supported. - SLA implements the MiniMax H3 Turbo-SLA sparse runtime. It is intended for use with the SLA-trained LoRA;
sparsity_ratio=0.85matches the published runtime setting. It does not add Sol’s local blocks or skipped-block residual. - Spark uses W8A8 and, by default, reorganizes only target video tokens. You can separately choose whether image, video, or audio references may be clustered; leaving a reference switch off keeps that modality exact. Its default
topk_ratiois0.20, with two dense prefix steps. Short sequences and certain unsupported layouts fall back to dense W8A8 attention. - Veda retains its trained 3D-tile approach. Reference-audio handling can be enabled, but defaults off and needs quality evaluation for the intended task.
noneadds no new strategy and preserves upstream execution.
The same node also offers vpack reference-video compression choices: 5/5 (the default, meaning no compression), 4/5, 3/5, and 2/5. It reduces selected H3 reference-video latent frames while retaining original first and last anchors and their timing information. It does not compress target latents, masks, images, semantic embeddings, or audio. The actual retained fraction may be higher than the selected ratio because anchors are protected. See node configuration and presets and the complete node inventory.
MiniMax H3 generation and references
-
H3 Image/Video/Audio Reference,H3 Keyframe Reference,H3 Semantic Reference, andH3 Build Conditioninglet you prepare different kinds of references and assemble final conditioning. Semantic presentation is prepared once and can be reused while you change the VAE references or target latent. Connected first and last keyframes must match the target’s spatial latent grid. Video references should be resampled to H3’s 24 FPS convention upstream. -
H3 Latent Inforeports the decoded dimensions, frame count, and H3’s 24 FPS model rate without running the VAE. -
MiniMax H3 KSampleraccepts one final-size original latent and one conditioning input. It offers three modes:Mode What it does Main choices singleRuns the main sampling curve at the input size. Main sigma schedule. progressiveStarts at lower resolution, then finishes the same curve at target size. Low-resolution scale and steps, upscaler, mask growth. Initially requires Euler. two_passCompletes a low-resolution pass, upscales, then independently re-noises and refines. Low-resolution scale, second curve, upscaler, mask growth. The main scheduler defaults to
simple, four steps, and one tail step—the extension’s 4+1 recipe. A sigma schedule is the sequence of noise levels the sampler follows. For example,steps=4, tail_steps=2adds two subdivisions to the end of that four-step curve; it is not the same as choosing a new six-step simple schedule. Manual schedules are complete absolute values ending at zero. The sampler preserves the original final-size latent for protected regions rather than replacing them with an upscaled approximation. Its modes have numeric tests, but those tests are not a guarantee of facial identity or visual quality in every scene. See the H3 sampler mode examples. -
MiniMax H3 Latent Upscaleenlarges the video portion of an H3 latent while leaving audio unchanged. Its continuous scale spans 1×–16× in pixel/token area, or 1×–4× per spatial axis. An optional conditioning input also enlarges compatible first/last keyframe latents; other references keep their own geometry. The node includes model and precision selection. Compatible weights are available from LBH-123-AI/Minimax_h3_latent_Upscaler. If you are upscaling only a masked area, composite against the clean original high-resolution latent to restore everything outside that area. -
MiniMax H3 Video VAE Decode/Encodeuses ComfyUI’s official VAE operations and retains progress reporting for typical single-video inputs. ComfyUI remains responsible for tiling, memory recovery, and model transfers. -
H3 Add Noiseprepares a clean latent for a continuation sampler whose noise is disabled. Supply the H3 model,RandomNoise, the remaining sigma schedule, and the clean latent. For a 6+2 upscale workflow, use the first sampler’s cleandenoised_outputfor the upscaled video, but carry forward unchanged audio from itsoutputunless you deliberately intend to restart audio from a clean state. The node prepares a noisy continuation state; it does not carry multistep solver history between sampler nodes.
Video masks, crops, and continuation
Set Video Latent Noise Maskconverts per-frame masks for Wan, MiniMax H3, LTX-Video/LTX-2 video, Hunyuan Video, Hunyuan Video 1.5, or Mochi into the matching latent time grid. Black protects; white redraws. Use a mask for each required frame—one mask is not automatically repeated across a video. The node maps mask groups conservatively, but a protected decoded boundary is not guaranteed to be pixel-identical.Video Latent Composite Maskedcopies selected regions from a replacement latent onto a matching clean original latent. Any positive mask value means full replacement, not partial opacity. The same selected region becomes the output noise mask. Both latents must already match in size and timing; the node does not resize, retime, or feather them.Video Frames Paddingpads images and masks to a model’s frame grid, including the MiniMax H317*n+5grid. Images and masks can be padded independently.Video Continuation Concatadds temporary image/audio context before a generated segment.concatadds the context ahead of the body;replacefills context slots already included in the body timeline.Trim Video Continuation Prefixremoves the exact repeated context from generated images and synchronized audio afterward.H3 Set Audio Prefix Noise Maskprotects the prefix in a standalone H3 audio latent.Video Prefix Context Noisechanges an image prefix used as continuation context. By default, it keeps the final five frames clean, gradually changes the preceding four, and applies block noise to earlier frames. On a 22-frame H3 prefix, that gives 13 noisy + 4 transition + 5 clean frames. You can adjust the transition and noise pattern. These defaults follow the H3 chained-character-swap recipe and its ComfyUI context-noise implementation.Load/Save Indexed Video Segmentworks with numbered MP4s such as000324.mp4. Loader index0means no previous segment; a positive indexiloads segmenti-1;-1loads the highest existing segment. The loader can return only the final continuation frames and matching audio.Merge Indexed Video Segmentschecks that segments begin at000000.mp4, are consecutive and video-compatible, then joins them while handling audio timing. Trim continuation prefixes before saving each segment: merging does not remove repeated context for you.Video Mask Guided Cropfollows a per-frame mask with a smoothed, fixed-aspect crop, including handling bounded gaps where a mask is missing.Video Mask Guided Stitchplaces regenerated crops back onto the source through the recorded transforms and composites only their masked pixels. Optional feathering is measured in source-video pixels.Video Pad For Outpaintplaces source frames on a larger final-size canvas and creates binary repaint masks. You can specify source-pixel margins or an aspect-expansion ratio and placement. Padding may extend edge pixels, use gray, or use black.Resize Image If Presentresizes, crops, or pads an optional image and mask. If no image is connected, it returns no image rather than inventing a black reference frame.
Visual prompting, tracking, and workflow utilities
Mask to Visual Promptsturns the first image and mask frame into reusable positive points, optional negative points, bounding boxes, and a preview showing the selected area. Its coordinate format works with KJNodes, SeC, and built-in SAM3 consumers.SeC Track Visual Conceptselects and runs a compatible SeC model to return tracked video masks. It accepts points and bounding boxes fromMask to Visual Prompts, or an optional direct mask. With a direct mask, that mask is authoritative. Itsannotation_frame_idxaccepts normal frame numbers or negative positions:-1is the last frame.autoattention chooses compatible implementations where available;sdpaforces the portable backend.Multimodal Prompt Chatsends a single text-and-media request to an OpenAI-compatible Chat Completions endpoint. It labels first/last-frame images, other pictures, and sampled video frames so the receiving model can distinguish their roles. This requires an endpoint you choose; it is not an image-generation model bundled with the extension.Video Motion Contact Sheet (Experimental)makes a chronological storyboard from video or decoded frames. Sampling can be uniform or motion-weighted, with optional frame numbers and timestamps outside each panel.Sigmas To Stringexports a sigma schedule as copyable decimal text. Connect it to ComfyUI’sPreview Anyto inspect or copy the values, or useManualSigmasfor the reverse conversion.Is Input Presentchecks whether an optional input is connected and non-empty;0andfalsestill count as present.Lazy If / Elseevaluates the selected branch only, unless another workflow output needs the other branch.Stage Barriercoordinates dependent workflow phases without forcing unrelated, unselected branches to run.- Material Workspace opens in ComfyUI’s native workflow tabs and organizes saved text, image, video, and audio materials into workflow cards. Executing a material runs only the portion needed back to preceding saved materials. See the Material Workspace guide.
- Temporary Job API supports submitting a ComfyUI API workflow with media attachments and retrieving results by job ID. It is primarily useful when your workflow is driven by another application. See its HTTP contract and Python client documentation.
comfyui-turing-utils Models
comfyui-turing-utils does not provide one universal image-generation model. It supplies loaders, conditioning, sampling, attention, and utility nodes for compatible models. The model or checkpoint you select still determines much of the image or video style and capability.
| Model or model family | How the extension uses it | When it is relevant |
|---|---|---|
| ConvRot-compatible diffusion models and text encoders | Load ConvRot DiT and Load ConvRot CLIP handle supported weight formats and attention choices. | When your workflow uses compatible quantized diffusion or text-encoder checkpoints. |
| Qwen Image 2.1 | Reference preparation, scoped text encoding, and multi-image conditioning utilities. | When working with Qwen Image 2.1 reference or multi-image workflows. |
| Krea2 Identity Edit | Combines character and optional background references with a target latent; expects a compatible Identity Edit LoRA upstream. | When editing while guiding a subject’s appearance from a character image. |
| MiniMax H3 | Provides reference preparation, semantic conditioning, sampling modes, video latent upscaling, VAE wrappers, and continuation tools. | When generating, refining, or extending H3 video and audio/video workflows. |
| MiniMax H3 latent upscaler | A separate learned upscaler selected by MiniMax H3 Latent Upscale or an H3 sampler mode that needs enlargement. | When you want to enlarge H3 video latents before further sampling or decoding. |
| SeC | SeC Track Visual Concept loads a selected checkpoint and tracks a prompted concept through frames. | When you need video masks for a subject or region identified by points, a box, or a mask. |
| Bernini and Wan | Bernini inpainting/context-window tools and Wan-compatible video frame-grid and latent-mask utilities. | When building source-video repainting or compatible video-conditioning workflows. |
Weight format is not the same as model identity. W8A8, W4A8, W4A4, and NVFP4 describe how supported layers are stored or computed; they are not separate creative models with distinct built-in styles. Likewise, Sol, SLA, Veda, and Spark are attention strategies, not interchangeable checkpoints. Choose a strategy only when it is compatible with your model and intended workflow.
What's New with comfyui-turing-utils
The supplied documentation describes changes but does not provide a complete dated version history. The notable workflow changes and additions are:
- Unified attention setup:
Configure Attention Strategyreplaces separate Sol/SLA/Veda configuration nodes and adds a shared place for Spark, protection controls, and H3 reference-videovpack. Older Sol/SLA patch nodes and H3 Image Sol/Static Virtual KV nodes have been removed. - Expanded ConvRot loading:
Load ConvRot DiTalso accepts compatible ComfyUI-native NVFP4 layers. The formerLoad NVFP4 DiTnode has been removed; saved workflows should useLoad ConvRot DiTinstead. - H3 sampler modes:
MiniMax H3 KSamplernow exposessingle,progressive, andtwo_passmodes with a final-size original latent and conditioning. Older workflows using separate second-latent and second-conditioning inputs must be rewired; the obsolete connection pattern is rejected rather than silently reinterpreted. - Shared model loading: H3 latent upscaling and SeC tracking include their own model selectors. Matching model selections in one submitted workflow can share an internal loader, including across frontend subgraphs.
- More explicit continuation handling: Prefix concatenation, context noise, audio-prefix masking, trimming, numbered segments, and segment merging provide a clearer path from one generated segment to the next.
- Updated native-node use: For H3 audio/video streams, use ComfyUI’s core
Concat AV LatentandSeparate AV Latent; the extension’s duplicate nodes have been removed. Old Wan/H3-specific padding node IDs have also been replaced by the sharedVideo Frames Paddingnode. - Workspace and automation tools: Material Workspace runs within native ComfyUI workflow tabs, replacing its former standalone page. The Temporary Job API supports workflows submitted with their media attachments.
Some features depend on specific companion-kernel capabilities. For example, grouped-codebook asym_w4a8_int8 checkpoints require kernel 0.24.0; Spark/Veda reference-protection functionality requires 0.48.0. If a newly added control or model format does not work, check compatibility before changing artistic settings.
Troubleshooting comfyui-turing-utils
No troubleshooting screenshots or videos are included in the supplied documentation. The steps below focus on behavior the nodes explicitly define.
A saved workflow reports a missing node or has obsolete inputs
- Identify the missing node or rejected connection.
- Replace
Load NVFP4 DiTwithLoad ConvRot DiT. - Replace older Sol/SLA/Veda configuration or sparse-attention patch nodes with
Configure Attention Strategy, then select the intended strategy and inspect its currently visible controls. - For an older H3 KSampler workflow, provide one final-size original latent and one final-size conditioning, select a mode, and move second-pass settings into that mode’s controls. For an older 4+1 first curve, use scheduler
steps=4, tail_steps=1. - Replace extension-specific AV concatenation/separation with ComfyUI’s core
Concat AV LatentandSeparate AV Latent. Replace old model-specific padding nodes withVideo Frames Padding.
A video mask is rejected or protects the wrong region
- Confirm that the node’s model
typematches the video latent you are using. - Supply masks for the expected frame sequence; do not assume one frame’s mask will be broadcast across time.
- Use black for preserve and white for redraw in
Set Video Latent Noise Mask. - If compositing latents, confirm original and replacement have matching batch, channel, time, height, and width as required by the node. Align their frame sequences and crops, not just their tensor dimensions.
- For
Video Latent Composite Masked, threshold a soft mask upstream if you need a deliberate on/off boundary: any positive value selects full replacement. - If you need an exact final pixel boundary, perform final compositing after decoding; latent-grid protection alone does not guarantee identical decoded edge pixels.
An H3 continuation repeats frames or audio at a segment boundary
- Use the earlier frames and audio as temporary context through
Video Continuation Concat. - Pass the generated result through
Trim Video Continuation Prefixso both images and audio lose that same prefix. - Save the trimmed result as the numbered segment.
- Merge only after confirming the series starts at
000000.mp4and contains no missing indices. The merger joins saved content as-is; it does not detect and remove duplicated continuation frames.
An H3 upscale or long video runs out of GPU memory
- Check whether the workflow can run at a smaller resolution, shorter sequence, or lower reference load.
- In
MiniMax H3 KSampler, consider whethersingle,progressive, ortwo_passbetter suits the available memory and desired result. A mode change can also change the generation process, so compare outputs rather than assuming identical quality. - Where appropriate, evaluate attention and
vpacksettings on representative scenes; reference compression may change available context. - If you reserve GPU memory for your desktop, account for that limit when planning the workflow. H3’s automatic activation policy can split some operations, but cannot make an arbitrarily large workflow fit.
- Remember that
MiniMax H3 Latent Upscaleprocesses the full temporal volume without chunking; a large video can still require substantial memory.
Frequently asked questions
Does the extension include all the models it mentions?
No. It provides compatible nodes and model selectors; use appropriate checkpoints for the workflow. The H3 latent upscaler has its own model source.
Which attention strategy should I use for the best-looking output?
There is no universal choice in the supplied documentation. none preserves upstream behavior; sparse strategies can help with long sequences but introduce different approximations and safeguards. SLA is intended for an SLA-trained LoRA. Compare representative outputs for your model and scene.
Will a protected video mask produce a perfectly unchanged decoded edge?
Not necessarily. Masks are mapped onto the latent grid, and VAE decoding can affect pixel boundaries. Use a final pixel-space stitch or composite when that exact edge matters.
Can I change H3 reference images without repeating semantic preparation?
Yes. H3 Semantic Reference prepares semantic presentation separately from H3 Build Conditioning, allowing you to change build-stage references or the target latent without necessarily repeating that semantic step.
Why does Load Indexed Video Segment return nothing for index 0?
Index 0 intentionally represents the first segment, which has no preceding segment to load. Index i > 0 reads segment i-1; -1 selects the highest existing segment.
Does H3 progressive sampling produce the same result as a full-resolution single pass?
No equivalence is promised. It changes where in the sampling curve the video moves to target resolution. The documentation explicitly calls for visual validation on each model and task.
Learn More about comfyui-turing-utils
- Complete node inventory: Find the available nodes and their roles.
- Node configuration and reusable presets: Explore attention-strategy configuration.
- Qwen Image 2.1 integration notes: Review integration details, limits, and matched measurements.
- H3 sampler mode examples: Inspect example
single,progressive, andtwo_passworkflow settings. - Material Workspace guide: Learn how saved materials and workflow cards operate in ComfyUI tabs.
- H3 latent upscaler model page: Find the compatible learned upscaler referenced by the H3 nodes.
- H3 chained-character-swap recipe and context-noise implementation: See the sources behind the default continuation-prefix noise pattern.
