Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > FunUI > FunUI Latent Resample

ComfyUI Node: FunUI Latent Resample

Class Name

FunUILatentResample

Category
FunUI/Latent
Author
digital-garbage (Account age: 1276days)
Extension
FunUI
Latest Updated
2026-11-03
Github Stars
0.02K

How to Install FunUI

Install this extension via the ComfyUI Manager by searching for FunUI
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter FunUI in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

FunUI Latent Resample Description

Sharpens or upscales video latents between sampling passes while preserving audio.

FunUI Latent Resample:

FunUI Latent Resample prepares a video’s latent representation—the compressed data used during generation—for another sampling pass. It offers two approaches: sharpening by enlarging the latent and then reducing it to its original spatial size, or upscaling by keeping the enlarged latent for the next pass. Sharpening lets you refine a clip without increasing its final dimensions, while upscaling lets the next sampling pass work at a higher spatial resolution. This is a between-passes processing step, not a sampler: a second sampler performs the subsequent refinement. When the spatial size increases, the node also updates supported size-dependent conditioning, such as anchor-frame information that must match the new latent grid. For supported combined video-and-audio latents, it processes the video while preserving the audio.

FunUI Latent Resample Input Parameters:

latent

Required; type: LATENT. Supplies the video latent you want to process, typically the result of your first sampling pass. The extracted video data must have five dimensions in the order [B, C, T, H, W], representing batch, channels, time, height, and width. This means the node expects a video latent rather than an ordinary four-dimensional image latent. The node replaces the video samples with the resampled version while retaining other entries in the latent container, including an existing noise_mask. For supported combined video-and-audio containers, the audio is preserved. There is no numerical range or default value for this connection.

upscaler

Required; type: LATENT_UPSCALE_MODEL. Supplies the latent upscaling model used to enlarge the video representation. Both operations use this model: sharpening enlarges the video before reducing it again, while upscaling retains the enlarged result. Connect a compatible latent upscaler, such as one loaded through FunUI Latent Upscaler Loader; a model designed to upscale decoded images is not interchangeable with a latent upscaler. Compatibility with your video model’s latent format matters, because different model families can use different channel layouts and representations. There is no numerical range or default value for this connection.

operation

Required; type: COMBO. Available options: sharpen and upscale; default: sharpen. With sharpen, the node first enlarges the video latent using the upscaler, then reduces its height and width back to their original values. This changes the video representation without increasing the spatial grid used by the second sampler, and the supplied conditioning is passed through unchanged. With upscale, the enlarged latent is retained and supported size-dependent positive and negative conditioning is adjusted to the resulting grid. Choose sharpening when you want a refinement pass at the original size, and upscaling when you want the second pass to work at a larger size, with a corresponding increase in resource requirements.

scale

Required; type: FLOAT. Default: 2.0; minimum: 1.0; maximum: 4.0; adjustment step: 0.05. Sets the enlargement factor requested from the latent upscaler. In sharpening mode, this controls the intermediate enlargement before returning to the original height and width; it is not a conventional sharpness-strength slider. In upscaling mode, the enlarged result becomes the new working size for the second pass. For example, when the upscaler produces exactly twice the height and twice the width at 2.0, the latent contains four times as many spatial positions. Larger values can increase processing and memory requirements, especially when the enlarged size is retained. The reported result uses the actual dimensions produced by the upscaler.

positive

Optional; type: CONDITIONING. Supplies the positive conditioning you intend to use for the second sampling pass, including any supported embedded anchor information. In sharpening mode, it is returned unchanged because the final spatial grid stays the same. In upscaling mode, it is processed to keep supported size-dependent conditioning compatible with the new height and width; the supplied tests specifically demonstrate resizing an embedded anchor latent. Connect this when you need the node to carry your positive conditioning forward and update it where supported. There is no numerical range or default conditioning content; when omitted, the execution argument defaults to None.

negative

Optional; type: CONDITIONING. Supplies the negative conditioning intended for the second sampling pass. It follows the same handling as positive conditioning: sharpening returns it unchanged, while upscaling processes supported size-dependent information to match the enlarged spatial grid. This is not a control for negative-prompt strength and does not generate negative conditioning on its own. Passing it through the node keeps the second sampler connected to the corresponding processed conditioning, particularly if it contains spatially dependent information. There is no numerical range or default conditioning content; when omitted, the execution argument defaults to None.

FunUI Latent Resample Output Parameters:

latent

Type: LATENT. Contains the processed video latent for your next sampler. In sharpening mode, its video height and width match the original dimensions, but the video samples have undergone enlargement and reduction. In upscaling mode, the video retains the dimensions produced by the upscaler. Other latent-container entries, including an existing noise_mask, are retained; the node does not explicitly resize that mask, relying on ComfyUI’s mask preparation to adapt it when used with the latent. Supported accompanying audio is preserved rather than upscaled. This remains a latent representation, not a decoded, viewable video.

positive

Type: CONDITIONING. Returns the positive conditioning supplied to the node, unchanged for sharpening or processed for supported size-dependent updates during upscaling. Connect this to the second sampler’s positive conditioning connection so that supported anchor information matches the processed latent. If no positive conditioning was supplied, the node does not create any; its execution default is None.

negative

Type: CONDITIONING. Returns the negative conditioning supplied to the node, unchanged for sharpening or processed for supported size-dependent updates during upscaling. Connect it to the second sampler’s negative conditioning connection when you have routed your negative conditioning through this node. As with the positive output, this is a continuation of supplied conditioning rather than newly generated content, and omitted conditioning defaults to None.

status

Type: STRING. Provides a readable summary of the operation and spatial dimensions, expressed in latent-grid units rather than decoded video pixels. Sharpening produces a message such as sharpen: 2x up and back to 4x4. Upscaling produces a message such as upscale: 4x4 -> 8x8 latent (4x the work in pass 2) and appends an anchor-resize count when supported anchors were updated. The work multiplier is calculated from the ratio of spatial grid areas; treat it as an indication of the increased workload, not an exact prediction of runtime or memory usage. The anchor count combines updates from positive and negative conditioning.

FunUI Latent Resample Usage Tips:

  • Place the node between samplers: first sampler, then FunUI Latent Resample, then a second sampler. Connect a compatible latent upscaler to the resample node; resampling alone does not perform the second denoising pass.
  • Start with operation set to sharpen and scale set to 2.0 when you want to test refinement without enlarging the final spatial grid. This is also the configuration shown in the supplied H3 pipeline.
  • Choose upscale when you want the second pass to operate at a larger size. Start with a modest scale and inspect the status: doubling both spatial dimensions produces four times the spatial positions, while quadrupling both produces sixteen times as many.
  • Route your positive and negative conditioning through this node and use its conditioning outputs for the second sampler, especially when upscaling with anchor frames. Reusing the original conditioning can bypass the size adjustments this node provides.
  • Configure the second sampler for refinement rather than assuming this node controls denoising. The module describes using a second FunUI Sampler with denoise below 1; the supplied H3 pipeline instead uses an explicit low-noise sigma schedule of 0.4, 0.3, 0.2, 0.1, 0.0 with denoise 1.0. Follow the schedule configuration appropriate to your workflow rather than treating either setting as universally required.
  • Preserve an existing noise_mask when working with pinned frames. This node retains it, and ComfyUI prepares the mask for the latent size downstream; retaining a mask and resizing embedded conditioning anchors are separate parts of keeping a constrained second pass consistent.
  • Read the status before committing to an expensive second pass. It confirms the actual latent dimensions and reports supported anchor updates, helping you catch an unexpected size or a missing conditioning route early.

FunUI Latent Resample Common Errors and Solutions:

expected a video latent [B, C, T, H, W], got (...)

  • Explanation: This is the node’s explicit error when the extracted video does not have five dimensions. A standard image latent commonly lacks the time dimension required here.
  • Solution: Connect a compatible video latent from your video workflow. Check that you have not connected an image-generation latent or decoded image data instead; do not simply add dimensions without confirming compatibility with the video model and upscaler.

KeyError: 'samples'

  • Explanation: The node directly reads the samples entry from the LATENT container. This Python error can occur if that entry is missing, usually because the supplied data is malformed or is not the expected latent container.
  • Solution: Use a standard LATENT output from a compatible sampler or latent-producing node. If an intermediate custom node modifies the container, verify that it preserves the samples entry.

Upscaler channel or tensor-shape mismatch

  • Explanation: An incompatible upscaler may fail during processing because the video latent’s channels or dimensions do not match what the model expects. The exact error text comes from the upscaler or underlying tensor operation and is not specified in the supplied node source.
  • Solution: Load an upscaler intended for your video model’s latent format, preferably through the appropriate FunUI loader. Check that the connected model is a latent upscaler, not an image upscaler.

CUDA out of memory

  • Explanation: This is a possible runtime resource error rather than a message explicitly raised by this node. Enlargement requires additional memory, and retaining the larger grid can make the second sampling pass substantially more demanding. Sharpening also creates an enlarged intermediate representation.
  • Solution: Lower scale, reduce the starting video dimensions or clip length, or reduce batch size where your workflow allows. Use sharpen if you do not need a larger final grid, while remembering that its intermediate enlargement still consumes memory.

Second sampler rejects an anchor after upscaling

  • Explanation: This is a downstream compatibility symptom, not a fixed error string shown in the node source. Supported anchor information must match the enlarged latent grid; connecting the original conditioning directly to the second sampler can leave an anchor at the old size.
  • Solution: Connect the relevant conditioning to this node, then connect its positive and negative outputs to the second sampler. Check the status for an anchor-resize count. If the problem persists, verify that your model’s conditioning format has supported rescaling.

Second sampler receives no conditioning

  • Explanation: The conditioning connections are optional on this node, but the node does not create conditioning when they are absent. Routing an unpopulated conditioning output into a sampler that requires conditioning can therefore cause a downstream failure.
  • Solution: Supply the required positive and negative conditioning before using those outputs. When upscaling with size-dependent conditioning, route it through this node rather than bypassing the resizing step.

FunUI Latent Resample Related Nodes

Go back to the extension to check out more related nodes.
FunUI
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

FunUI Latent Resample