APNext H3 Scene Retake (render one scene again)
APNext H3 Scene Retake
- model
- clip
- vae
- audio_vae
- sampler
- sigmas
- master_audio
- ref_image_1
- ref_image_2
- ref_image_3
- ref_image_4
- file_path
- prompt
- report
A finished H3 run has one scene that didn't land - a face drifted, the model ignored the camera move, the cut reads wrong. Your options before this node were miserable: re-queue the whole graph (which re-runs the writer, possibly with a randomising seed, and re-renders every scene - twenty minutes to get back to the one you wanted) or hand-assemble the fix in an editor.
H3SceneRetake reads the run's saved scene bundle, takes one scene number, and renders just that scene with a new seed and - if you like - a rewritten prompt. Its button queues only this node (ComfyUI partial execution), so the writer, the sound nodes and the other scenes never run again. It's a dagthomas/comfyui_dagthomas node, built to sit at the end of the chain-render workflows.
How it works
Every writer in this pack writes its saved scenes to output/apnext_scenes/ (a JSON bundle: prompts, durations, seeds, the works). The node loads that bundle, takes your scene_number, and renders it with seed and prompt_override. The continuity is the clever part: the chain renders also write every scene's sampled latent to output/apnext_latents/<project>_sNN.pt, so a retake of scene 07 pins scene 06's real tail - picture and sound - to its head, exactly as the chain render did. The retaken 07 is then saved as the new tail, so a later retake of 08 continues from your improved 07. You fix the film forward.
The inputs that matter
model/clip/vae/audio_vae+sampler/sigmas- the same block the chain render used.bundle-latestalways means the newest bundle, so a fresh run needs no browser refresh.scene_number- 1-based, as the writer numbers them.seed- fixed by default so one click is one retake; change it for a fresh take.prompt_override- empty means the scene's prompt from the bundle, unchanged. Anything here replaces it for this take: paste the scene from the H3 Prompt Preview, edit, retake. This is the whole point - surgical re-direction of one scene.continuity- continue from the previous scene's saved take when one exists (default), or hard cut (independent clip).context_frames- what the chain render used; snapped to whatcontext_modecan pin (39 / 90 / 141 for the masked AV latent, any H3 run for the guides).context_mode- masked AV latent (picture + sound; use what the chain render used for films), motion context guide, or core guide clip (picture only).
For music videos, connect master_audio (the whole song) - the scene's piece is cut from it at the bundle's segment and masked into the audio latent, exactly as the render did. Leave it unconnected for a film; H3 then generates the sound, continuing the previous scene's when the take continues. ref_image_1..4 are the same reference pictures the run used.
Outputs: file_path (the new take), prompt (what was actually rendered, so you can verify your override took), and report.
Install
Standard for this pack:
cd ComfyUI/custom_nodes
git clone https://github.com/dagthomas/comfyui_dagthomas
cd comfyui_dagthomas
pip install -r requirements.txt
Then restart ComfyUI (Manager search "comfyui_dagthomas" works too). No extra pack is required for a retake, but for the full picture+sound continuation you want ComfyUI-H3-Motion-Context-MultiRef installed, the same one the chain renders use.
Troubleshooting
The most common error is honest: "No saved scenes yet" - the node can't retake a run that was never saved, so make sure the writer ran with its save_scenes on, and (for continuation) that the chain render had save_latents on. Don't change the writer's seed between the original run and the retake and expect the bundle to still match; latest always points at the newest bundle precisely so you don't have to think about it. If the retaken scene doesn't continue the way you hoped, check context_frames - it has to match what context_mode can actually pin.
Inputs (23)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| clip | CLIP | — | |
| vae | VAE | H3 video VAE. | |
| audio_vae | VAE | H3 audio VAE. | |
| sampler | SAMPLER | — | |
| sigmas | SIGMAS | — | |
| bundle | COMBO | latest (newest bundle) | The run's saved scenes (output/apnext_scenes/, newest first). `latest` always means the newest bundle, so a fresh run needs no browser refresh. |
| scene_number | INT | 11–99 | Which scene to render again (1-based, as the writer numbers them). |
| seed | INT | 00–18446744073709550000 | A new seed = a new take. Fixed by default so a click is one retake. |
| width | INT | 134432–8192 | — |
| height | INT | 76832–8192 | — |
| prompt_override | STRING | Empty: the scene's prompt from the bundle, unchanged. Anything here replaces it for this take - paste the scene from the Prompt Preview, edit, retake. | |
| continuity | COMBO | continue from the previous scene's saved take when one exists | 2 options: continue from the previous scene's saved take when one exists, hard cut (independent clip) |
| context_frames | INT | 395–141 | Pinned run from the previous scene's saved take. Use what the chain render used; snapped to what context_mode can pin (39 / 90 / 141 for the masked AV latent, any H3 run for the guides). |
| audio_feather_ticks | INT | 80–64 | Release over the pinned sound's last ticks (40 = 1 s); films only. |
| filename_prefix | STRING | video/H3_retake | Where the take lands; the scene number and `_retake` are appended. |
| fps | FLOAT | 24.001–60 | — |
| context_mode | COMBO | masked AV latent (picture + sound; 39 / 90 / 141 frames) | How the previous take reaches this one - use what the chain render used (films). Music videos always use the masked song path. |
| master_audioopt | AUDIO | Music videos: the whole song (Load Audio). The scene's piece is cut from it at the bundle's segment and masked into the audio latent, as the render did. Leave it unconnected for a film - H3 then generates the sound (continuing the previous scene's when the take continues). | |
| ref_image_1opt | IMAGE | Reference picture <Picture 1> (Ref2VA) - the same ones the run used. | |
| ref_image_2opt | IMAGE | Reference picture <Picture 2> (Ref2VA) - the same ones the run used. | |
| ref_image_3opt | IMAGE | Reference picture <Picture 3> (Ref2VA) - the same ones the run used. | |
| ref_image_4opt | IMAGE | Reference picture <Picture 4> (Ref2VA) - the same ones the run used. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| file_path | STRING | — |
| prompt | STRING | — |
| report | STRING | — |