You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After ComfyUI PR #15063 changed the native LTX latent upscaler to use ModelPatcherDynamic, LTX2SamplingPreviewOverride crashes before sampling
begins.
The native LatentUpscaleModelLoader now returns a model patcher for the LTX
spatial upscaler, but the KJNodes preview wrapper still treats the input as a
plain torch.nn.Module and calls .to(device) directly.
Error
AttributeError: 'ModelPatcherDynamic' object has no attribute 'to'
File "<COMFYUI>/custom_nodes/ComfyUI-KJNodes/nodes/ltxv_nodes.py",
line 899, in __call__
self.latent_upscale_model.to(device)
The sampler shown as the failing workflow node is SamplerCustomAdvanced, but
the exception originates from OuterSampleCallbackWrapper registered by LTX2SamplingPreviewOverride.
Load the LTX 2.3 spatial upscaler through the native LatentUpscaleModelLoader.
Connect it to the optional latent_upscale_model input of LTX2SamplingPreviewOverride, together with an LTX VAE and model.
Start sampling with SamplerCustomAdvanced.
The exception occurs before the first sampling step.
Disconnecting only the latent_upscale_model input from LTX2SamplingPreviewOverride avoids the crash. The native LTXVLatentUpsampler continues to work with the same upscaler.
Cause
ComfyUI PR #15063 converted the LTX latent upscaler to the managed dynamic-VRAM
path:
With current ComfyUI, this object is a ModelPatcherDynamic, not the underlying
module.
The updated native implementation uses model_management.load_models_gpu(),
reads the underlying model from upscale_model.model, and obtains its device
and dtype from the patcher.
Expected behavior
LTX2SamplingPreviewOverride should support the current ModelPatcherDynamic latent-upscaler representation, while ideally remaining
compatible with older plain-module inputs.
Environment
OS: Windows
GPU: NVIDIA GeForce RTX 5080
DynamicVRAM: enabled
ComfyUI: 0.28.0, commit 45ffd543
ComfyUI-KJNodes: commit e27a505b
Python: 3.12.10
PyTorch: 2.10.0+cu130
Report prepared with assistance from OpenAI Codex and reviewed by the reporter.
Description
After ComfyUI PR #15063 changed the native LTX latent upscaler to use
ModelPatcherDynamic,LTX2SamplingPreviewOverridecrashes before samplingbegins.
The native
LatentUpscaleModelLoadernow returns a model patcher for the LTXspatial upscaler, but the KJNodes preview wrapper still treats the input as a
plain
torch.nn.Moduleand calls.to(device)directly.Error
The sampler shown as the failing workflow node is
SamplerCustomAdvanced, butthe exception originates from
OuterSampleCallbackWrapperregistered byLTX2SamplingPreviewOverride.Steps to reproduce
LatentUpscaleModelLoader.latent_upscale_modelinput ofLTX2SamplingPreviewOverride, together with an LTX VAE and model.SamplerCustomAdvanced.The exception occurs before the first sampling step.
Disconnecting only the
latent_upscale_modelinput fromLTX2SamplingPreviewOverrideavoids the crash. The nativeLTXVLatentUpsamplercontinues to work with the same upscaler.Cause
ComfyUI PR #15063 converted the LTX latent upscaler to the managed dynamic-VRAM
path:
Comfy-Org/ComfyUI#15063
KJNodes currently performs direct module operations in the preview wrapper:
With current ComfyUI, this object is a
ModelPatcherDynamic, not the underlyingmodule.
The updated native implementation uses
model_management.load_models_gpu(),reads the underlying model from
upscale_model.model, and obtains its deviceand dtype from the patcher.
Expected behavior
LTX2SamplingPreviewOverrideshould support the currentModelPatcherDynamiclatent-upscaler representation, while ideally remainingcompatible with older plain-module inputs.
Environment
45ffd543e27a505bReport prepared with assistance from OpenAI Codex and reviewed by the reporter.