FunUI Empty Latent:
FunUIEmptyLatent creates an empty latent—a starting workspace in the compressed representation that a generative model uses before producing a visible image or video. Its main purpose is to match that workspace to the connected model rather than assume that every model uses the same internal layout. It first checks whether an available model-specific builder can create the appropriate latent; if none takes responsibility, it derives the shape from the model’s own latent format. This approach supports both image and video workflows while reducing the need for you to manually choose a model-specific empty-latent node. It also accommodates specialized builders for models that generate sound alongside pictures. If a model-specific builder fails, the node stops instead of silently substituting a generic shape that could be unsuitable. This node prepares the starting representation for generation; it does not generate a finished image, video, or soundtrack by itself.
FunUI Empty Latent Input Parameters:
model
A required MODEL connection that determines how the empty latent should be structured. Different models can use different internal layouts, so this connection provides the information needed to select a model-specific builder or derive an appropriate shape from the model’s latent format. Connect the model you intend to use for the corresponding generation workflow so that the starting latent and the generation model agree. This parameter has no numeric minimum, maximum, or default value, and no fixed list of model options is defined in this node.
width
A required INT parameter specifying the requested image or video-frame width in pixels. The default is 768, the minimum is 16, the maximum is 16384, and the interface step is 16. The node passes this value to the selected builder or the model-based derivation process, which determines the corresponding internal latent dimensions. A larger width requests a wider result and generally increases memory and processing requirements during generation. The allowed interface range is not a guarantee that every model can use every listed resolution; choose a width appropriate for your model and available hardware.
height
A required INT parameter specifying the requested image or video-frame height in pixels. The default is 512, the minimum is 16, the maximum is 16384, and the interface step is 16. Together with width, it defines the requested frame proportions and spatial size before these are translated into the model’s latent representation. Increasing height generally increases the amount of data that generation must process. Use model-appropriate dimensions rather than assuming that a value accepted by this interface is necessarily supported by every connected model.
length
A required INT parameter specifying the requested number of video frames. The default is 1, the minimum is 1, and the maximum is 16384. This value is measured in frames, not seconds and not separate generated samples. It affects models whose latent representation includes a time dimension; models without a time dimension ignore it. For an image workflow, leaving it at 1 is a clear starting choice. For a video workflow, increasing it requests a longer sequence and generally increases resource requirements, although the exact internal temporal layout and supported frame counts depend on the model-specific builder or latent format.
batch_size
An optional INT parameter specifying the requested number of samples in the batch. The default is 1, the minimum is 1, and the maximum is 4096. This controls how many samples the latent is prepared to hold, rather than how many frames belong to a single video; use length for the frame count. The node forwards this value to the model-specific builder or the fallback derivation process. Increasing it can support generating multiple results in one batch, but also generally increases memory consumption. The high interface maximum does not imply that your model or hardware can handle a batch of that size.
audio_vae
An optional VAE connection for models that generate sound alongside the picture and need an audio VAE to determine the sound latent’s size, as indicated by the node’s tooltip for LTX. A VAE is a component that works between media and its compressed representation; here, the connection is specifically for the audio portion, not a general-purpose image VAE slot. The default is no connection, represented internally as None, and there are no numeric bounds or enumerated options. The node forwards this connection only to model-specific builders that explicitly accept it. It is not passed to the generic fallback, so attaching an audio VAE does not by itself enable sound generation for an arbitrary model.
frame_rate
An optional FLOAT parameter specifying frames per second for the audio-related timing calculation. The default is 25.0, the minimum is 1.0, and the maximum is 1000.0. According to the interface, this setting is used only with an audio VAE: the number of frames and their playback rate determine how much time the sound latent needs to cover. For example, 100 frames at 25 frames per second correspond to four seconds of playback. The node forwards this setting only to model-specific builders that accept it, and it is not passed to the generic fallback. Do not treat this as a universal control for video export frame rate; its documented role here is sizing the accompanying sound latent.
FunUI Empty Latent Output Parameters:
latent
A LATENT value containing the empty starting representation prepared for the connected model. It is returned either by a model-specific builder or by the process that derives a shape from the model’s latent format. You can pass it to a compatible generation or sampling stage that expects a latent starting point. It is not a finished image or video, and its internal layout can differ between model families. For specialized audiovisual workflows, the contents depend on the responsible builder; this node’s source does not define one universal internal structure for every supported model.
status
A STRING explaining which construction route produced the latent. When a model-specific builder succeeds, the text follows the pattern PROVIDER_ID built this latent, where PROVIDER_ID is replaced by that builder’s registered identifier. When no builder claims the model and the fallback succeeds, the exact text is shaped from the model's own latent format. This message helps you understand whether specialized handling or model-format derivation was used. It is not an image-quality assessment or a guarantee that every later workflow stage is compatible. If construction raises an error, the node stops rather than returning a normal latent and status pair.
FunUI Empty Latent Usage Tips:
- Connect the same model you plan to use for generation. The node determines the latent layout from this connection, so preparing it for an unrelated model can lead to incompatibility later in the workflow.
- For a first image test, use batch_size 1 and length 1, then choose width and height recommended for your model. The interface defaults of 768 by 512 are starting values, not universal recommendations for every model.
- Adjust width and height using the provided increments of 16, while also following any resolution restrictions documented for your model. The interface’s limits do not override model-specific requirements.
- For video, set length to the desired number of frames rather than the duration in seconds. For example, a four-second sequence played at 25 frames per second corresponds to 100 frames, provided that your model supports that frame count.
- Keep batch_size and length conceptually separate: batch_size requests multiple samples, while length requests frames within a video sample. Increase one at a time when testing resource limits.
- For a supported audiovisual model that needs an audio VAE, connect the appropriate audio_vae and set frame_rate to the intended playback rate so the specialized builder can size the sound latent consistently with the picture duration.
- Leave audio_vae unconnected for ordinary image or video workflows that do not require an audio latent. Changing frame_rate alone does not enable audio generation or control the generic fallback.
- Check status after a successful run to see which construction route was used. The fallback message is a normal successful result, not an error or warning.
- Start with modest dimensions, a short video length, and batch_size 1 before increasing workload. The maximum values in the interface can request far more memory than your hardware can provide.
FunUI Empty Latent Common Errors and Solutions:
PROVIDER_ID handles this model's latent and failed to build it: EXCEPTION_TYPE: DETAILS. Refusing to substitute a generic shape, which would be silently wrong for this model.
- Explanation: This is the explicit error format raised when a model-specific builder fails. The provider identifier, exception type, and details are filled in at runtime. The node deliberately refuses to continue with a generic latent because doing so could hide a model-specific failure and produce an unsuitable shape.
- Solution: Read the exception details immediately before the final sentence. Check the selected model, the builder’s requirements, the requested dimensions and frame count, and any required audio VAE. If the configuration appears correct, check that your FunUI and ComfyUI versions are compatible with the model and report the complete error and provider identifier if needed.
Missing required input: model, width, height, or length
- Explanation: These four inputs are required by the schema. If a required connection or value is missing, ComfyUI may reject the workflow before the node executes. The wording shown here describes the condition; the exact validation message depends on ComfyUI.
- Solution: Connect a valid MODEL to model and make sure width, height, and length have valid integer values. Restore the defaults for a simple test if necessary.
Input value outside the allowed range
- Explanation: Values supplied through edited workflows or external connections may fall outside the declared interface limits. Such values can trigger validation errors; this node’s execution method does not contain its own explicit range-checking messages.
- Solution: Keep width and height between 16 and 16384, length between 1 and 16384, batch_size between 1 and 4096, and frame_rate between 1.0 and 1000.0. Use the width and height controls in increments of 16, and observe any additional model-specific restrictions.
Out of memory or allocation failure
- Explanation: Large spatial dimensions, long video sequences, or large batches can exceed available memory during latent creation or later generation. Possible runtime messages include
out of memoryorCUDA out of memory; these are underlying runtime errors, not fixed messages defined by this node. - Solution: Reduce batch_size to 1, lower width and height, and shorten length for video. Test a small workload first, then increase settings gradually. If the error occurs later during sampling, reduce the workload there as well.
Tensor shape or size mismatch
- Explanation: A later node may report incompatible dimensions if it expects a different model’s latent layout or imposes additional resolution or frame-count requirements. The exact message depends on the builder or downstream operation; no fixed shape-mismatch message is defined in the provided class.
- Solution: Confirm that this node and the downstream generation stage use compatible models. Check your model’s documented size and frame-count requirements, inspect status to identify the construction route, and try a known-supported configuration. If a specialized builder failed, resolve that failure rather than attempting to bypass it with a generic latent.
Audio-related builder failure
- Explanation: A specialized audiovisual builder may fail if its required audio VAE is missing, incompatible, or otherwise unusable. The provided class does not define a separate audio-specific error string; any exception raised by such a builder is included in the provider-failure message above.
- Solution: For a workflow that requires audio, connect the audio VAE intended for that model and verify frame_rate against the intended playback rate. For a picture-only workflow, follow the model-specific builder’s requirements rather than assuming that an arbitrary VAE connection will help.
