Nan/+-Inf Error?

#1
by mofjo - opened

Whenever I try to generate t2v using one of the quantized ggufs (with no custom audio and no upsampling, normal VAE decoding), I get the following error log:

Model LTXAVTEModel_ prepared for dynamic VRAM loading. 25440MB Staged. 0 patches attached. Force pre-loaded 290 weights: 1497 KB.
gguf qtypes: F32 (2672), BF16 (28), Q4_K (1214), Q6_K (326), Q5_K (204)
model weight dtype torch.bfloat16, manual cast: None
model_type FLUX
Requested to load LTXAV
loaded partially; 9766.55 MB usable, 9721.50 MB loaded, 4178.95 MB offloaded, 45.05 MB buffer reserved, lowvram patches: 0
100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 8/8 [01:34<00:00, 11.84s/it]
Requested to load AudioVAE
Unloaded partially: 697.07 MB freed, 9024.43 MB remains loaded, 45.05 MB buffer reserved, lowvram patches: 79
loaded completely; 693.46 MB loaded, full load: True
VAE load device: cuda:0, offload device: cpu, dtype: torch.bfloat16
Requested to load VideoVAE
Unloaded partially: 4909.06 MB freed, 4115.37 MB remains loaded, 201.05 MB buffer reserved, lowvram patches: 396
Model VideoVAE prepared for dynamic VRAM loading. 1384MB Staged. 0 patches attached.
Input contains (near) NaN/+-Inf
!!! Exception during processing !!! [Errno 22] Invalid argument: 'avcodec_send_frame()'; last error log: [aac] Input contains (near) NaN/+-Inf
Traceback (most recent call last):
File "D:\ComfyUI\ComfyUI\execution.py", line 535, in execute
output_data, output_ui, has_subgraph, has_pending_tasks = await get_output_data(prompt_id, unique_id, obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI\ComfyUI\execution.py", line 335, in get_output_data
return_values = await _async_map_node_over_list(prompt_id, unique_id, obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI\ComfyUI\execution.py", line 309, in _async_map_node_over_list
await process_inputs(input_dict, i)
File "D:\ComfyUI\ComfyUI\execution.py", line 297, in process_inputs
result = f(**inputs)
File "D:\ComfyUI\ComfyUI\comfy_api\internal__init__.py", line 149, in wrapped_func
return method(locked_class, **inputs)
File "D:\ComfyUI\ComfyUI\comfy_api\latest_io.py", line 1833, in EXECUTE_NORMALIZED
to_return = cls.execute(*args, **kwargs)
File "D:\ComfyUI\ComfyUI\comfy_extras\nodes_video.py", line 108, in execute
video.save_to(
~~~~~~~~~~~~~^
os.path.join(full_output_folder, file),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<2 lines>...
metadata=saved_metadata
^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "D:\ComfyUI\ComfyUI\comfy_api\latest_input_impl\video_types.py", line 517, in save_to
output.mux(audio_stream.encode(frame))
~~~~~~~~~~~~~~~~~~~^^^^^^^
File "av/audio/stream.py", line 18, in av.audio.stream.AudioStream.encode
File "av/audio/stream.py", line 28, in av.audio.stream.AudioStream.encode
File "av/codec/context.pyx", line 411, in av.codec.context.CodecContext.encode
File "av/codec/context.pyx", line 326, in _send_frame_and_recv
File "av/error.pyx", line 424, in av.error.err_check
av.error.ValueError: [Errno 22] Invalid argument: 'avcodec_send_frame()'; last error log: [aac] Input contains (near) NaN/+-Inf

I can't figure out what is wrong, but no output is passed on to the Save Video node.

This was an issue in older ComfyUI version, they fixed it. Please make sure that you are running latest ComfyUI version.

Sign up or log in to comment