Native LTX* custom nodes for long-audio ComfyUI workflows.
Chunk planning, frame-folder selection, loop control, still-video assembly, and final MP4 preview in one repository.
This repository packages the native LTX* nodes used by the bundled long-audio smoke workflow, so you can keep the whole graph on GitHub without depending on external node packs for loop control, chunk assembly, audio concatenation, or final preview output.
It is designed for the common Colab and desktop flow where custom nodes are cloned into ComfyUI/custom_nodes, then exercised through a small App mode surface:
Frames FolderSource Audio UploadSegment SecondsRandom Seed
The current App mode surface stays focused on folder selection, source-audio upload, chunk length, and deterministic seed control.
- Native long-audio helpers:
LTXAudioDuration,LTXLongAudioSegmentInfo,LTXAudioSlice, andLTXAudioConcatenatehandle duration-aware chunk planning and audio stitching. - Native image and folder inputs:
LTXLoadAudioUpload,LTXLoadImageUpload,LTXLoadImageBatchUpload,LTXBatchUploadedFrames, andLTXLoadImageskeep folder-plus-audio workflows inside core ComfyUI inputs. - Native loop control:
LTXWhileLoopStart,LTXWhileLoopEnd,LTXForLoopStart, andLTXForLoopEndremove the need for legacy loop-control packs. - Native preview path:
LTXBuildChunkedStillVideo,LTXEnsureImageBatch,LTXEnsureAudio, andLTXVideoCombinegenerate one previewable MP4 from per-chunk frames plus the original full-length audio. - Native workflow utilities:
LTXSimpleMath,LTXSimpleCalculator,LTXCompare,LTXIfElse,LTXIndexAnything,LTXBatchAnything,LTXSeedList, andLTXShowAnythingcover the helper surfaces used by the shipped graph. - Native LTX utility replacements:
LTXVAELoader,LTXImageResize,LTXChunkFeedForward,LTXSamplingPreviewOverride, andLTXNormalizedAttentionGuidancereplace the extra utility nodes required by the bundled graph.
cd /content/ComfyUI/custom_nodes
git clone https://github.com/Sunwood-ai-labs/ComfyUI-LTXLongAudio.git
uv pip install -r ComfyUI-LTXLongAudio/requirements.txtThen restart ComfyUI.
The checked-in workflow is ready for the common folder-plus-audio smoke pass:
- Upload one song with ComfyUI's built-in
LoadAudiocontrol. - Select
samples/input/frames_poolor another input-folder source. - Keep the default 20-second chunk length, or change
Segment Seconds. - Let
LTXBuildChunkedStillVideopick one deterministic frame per chunk. - Preview the final MP4 from
LTXVideoCombine.
For the full LTX 2.3 app stack, this repository also ships the verified long-audio Origin workflow used in the GPU validation handover:
- Open
samples/workflows/LTX_2.3_Image_or_Text_&_Audio_2_Video_App_Origin.json. - Keep
Use Text to Video = OFFif you want image-plus-prompt conditioning. - Treat
Prompt Enhanceras bypassed in the saved workflow state unless you intentionally re-enable it. - Start with shorter
Segment Secondsvalues if you want stronger identity/style anchoring inside each generated chunk.
- Workflow:
samples/workflows/LTXLongAudio_CustomNodes_SmokeTest.json - Workflow:
samples/workflows/LTX_2.3_Image_or_Text_&_Audio_2_Video_App_Origin.json - Workflow:
samples/workflows/LTX_MultiImageUpload_Preview.json(one image-upload input and tiled preview of uploaded still images) - Sample asset root:
samples/input/ - Layout checker:
scripts/check_workflow_layout.py - API smoke runner:
scripts/run_comfyui_api_smoke.py
The bundled workflow ships with concrete defaults:
- Frame folder:
samples/input/frames_pool - Audio widget default:
ltx-demo-tone.wav
The sample asset set stays intentionally lightweight so CPU-side smoke runs remain practical:
samples/input/frames_poolcontains quarter-resolution688x384frames.samples/input/demo_framescontains tiny192x108debug frames.samples/input/ltx-demo-tone.wavremains available as the tracked fallback audio.
If you keep a longer local sample named HOWL AT THE HAIRPIN2.wav, the API smoke script prefers it and stages it under the tracked widget filename for prompt validation.
More detail lives in samples/README.md and the published guides:
LTXLoadAudioUploadLTXLoadImageUploadLTXLoadImageBatchUploadLTXLoadImagesLTXTileImageBatchLTXBatchUploadedFramesLTXRepeatImageBatch
LTXAudioDurationLTXLongAudioSegmentInfoLTXRandomImageIndexLTXAudioSliceLTXBuildChunkedStillVideoLTXDummyRenderSegmentLTXAppendImageBatchLTXAppendAudioLTXEnsureImageBatchLTXEnsureAudioLTXAudioConcatenateLTXVideoCombine
LTXWhileLoopStart,LTXWhileLoopEndLTXForLoopStart,LTXForLoopEndLTXIfElseLTXCompareLTXSimpleMathLTXSimpleCalculatorLTXIntConstantLTXIndexAnythingLTXBatchAnythingLTXSeedListLTXShowAnything
LTXVAELoaderLTXImageResizeLTXChunkFeedForwardLTXSamplingPreviewOverrideLTXNormalizedAttentionGuidance
Use uv for local verification and publishing checks:
uv run pytest
uv run python scripts/check_workflow_layout.py \
samples/workflows/LTXLongAudio_CustomNodes_SmokeTest.json \
--require-all-nodes-in-groups \
--require-app-mode
uv run python scripts/run_comfyui_api_smoke.py \
--workflow samples/workflows/LTXLongAudio_CustomNodes_SmokeTest.json \
--comfy-root /path/to/ComfyUIThe bundled smoke workflow includes extra.linearData and extra.linearMode, matching the current ComfyUI App mode builder behavior.
- Fully restart the ComfyUI backend or desktop app after updating custom nodes. Hot reload can preserve stale input schemas.
- If a preview looks unexpectedly short, stale backend state is the first thing to check. The bundled graph is intended to render the full source audio length, not only the first chunk.
- Final muxing uses
ffmpeg, so the runtime should exposeffmpegbefore you launch ComfyUI. - Segment frame counts are quantized in blocks of 8 frames to stay friendly with LTX-style workflows.
.
|-- docs/ # VitePress docs and shared SVG identity assets
|-- samples/
| |-- input/ # Lightweight sample frames and audio placeholders
| `-- workflows/ # App mode-ready smoke workflow JSON
|-- scripts/
| |-- check_workflow_layout.py # Group, overlap, App mode, and runtime-contract checks
| `-- run_comfyui_api_smoke.py # Real /prompt API smoke runner for ComfyUI
|-- tests/ # Import, layout, and smoke-script regression coverage
|-- nodes.py # Custom node implementations and registry
`-- README.ja.md # Japanese top-level guide
GPL-3.0-or-later