Reusing H3 AV latents across jobs #14
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
needs-info
needs-triage
question
ready-for-agent
ready-for-human
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
crowmaki/ai-studio#14
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part of #1
Question
Can a draft Take's H3 audio-video latent be saved by one ComfyUI job and loaded by a later job, so Promotion runs the upscale pass without regenerating? Which nodes handle this (SaveLatent/LoadLatent and similar, or the LTXV AV concat/separate nodes used in
scratch/minimaxH3SEEDHUNTERLatent_v25.json)? Where are the files written, how big are they, and do they survive ComfyUI restarts?Resolution
Yes, the latents can be reused across jobs and across restarts, but you cannot feed the joint AV latent straight into core
SaveLatent. H3 latents are aNestedTensor((video, audio)).SaveLatentcallssamples["samples"].contiguous()and writes it with safetensors, which fails on a NestedTensor.Working recipe (core nodes only):
denoised_output(the value at ImpactSwitch 122), send it throughLTXVSeparateAVLatent, and save the result with 2×SaveLatent. This gives onevideo.latentand oneaudio.latent.LoadLatent, using the name plus the[output]suffix.VALIDATE_INPUTSskips the input-dir combo check, so no copy is needed.MinimaxH3LatentUpscaler3D.LTXVConcatAVLatent.Files:
output/<prefix>_<NNNNN>_.latent. The default prefix islatents/ComfyUI. Each file is safetensors with keyslatent_tensorandlatent_format_version_0, and its header holds thepromptand workflow JSON (unless--disable-metadatais set). Read the real filename from the job history, because the counter increments. The files are plain files, so they survive restarts. AI Studio should copy them into the Rendition folder and not rely on ComfyUI's output dir.Size: float32. At the workflow's default 0.2 MP / 8 s draft, it is about 4.6 MB of video and 80 KB of audio. At 768×1344 it is about 14 MB for 5 s and 41 MB for 15 s.
Caveats:
SaveLatentsaves onlysamples. The noise mask is lost. If the draft forced custom audio (SetLatentNoiseMask with SolidMask 0), re-apply that mask to the loaded audio. If you do not, the 0.4-denoise 2nd pass re-noises the audio.MiniMaxH3ReferenceToVideo→MiniMaxH3RefModApplywith the same prompt, refs and size.ComfyUI-MiniMaxH3_LatentUpscalerSave/Load Package. It is not installed. It stores the video, audio, both masks and the conditioning (conditioning.pt, a pickle) inoutput/h3_lq_stash/.Not run in ComfyUI. One experiment would settle it:
Context pointer
Full findings with source citations (file and line in ComfyUI 0.38.2 and the custom nodes, plus a trace of the workflow graph) are on branch
research/h3-latent-reuse, fileresearch/h3-latent-reuse.md.