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
I’m working on a morphing image generation loop in ComfyUI, and I’m trying to figure out a clean way to handle changing prompts across frames, while keeping the previous prompt active when there’s no new one defined.
Here’s my setup:
standard SDXL stuff, KSampler, LoRA, CLIP Prompt, SDTurboScheduler, set the denoiser to around 0.51 - 0.75, and steps between 1 - 5
I’m doing loopback generation, where the output image is fed back in as reference input for the next frame. i am using custom node from ImpactPack of FrameSender and FrameReceiver
I use Canny ControlNet to preserve object structure while letting the image evolve gradually.
I Rescale, Cropped the image effectively zooming the image, and use that as the next frame input
The goal is to create smooth morphing effects, and then stitch all the frames into a video.
My current approach
I use an INT node to track the frame number, with “Control After Generate” set to Increment, so the frame value automatically increases after each generation.
For each frame, I want to apply a different positive prompt depending on the frame number. For example:
{
0: "a cat on a chair",
5: "a cat jumping",
10: "a cat flying"
}
That means I want this behavior:
frames 0–4 → "a cat on a chair"
frames 5–9 → "a cat jumping"
frame 10 → "a cat flying"
Right now, I’m testing this using a custom Dict node from the Basic Data Handling plugin, where each key = frame number and value = prompt.
But since not all frame numbers exist in the dict, I need a way to use the previous value for missing frames.
(Workflow Embedded)
What I need
I want something that, for a given frame, returns the prompt for:
max(key) where key <= frame
Basically: “use the most recent defined prompt up to this frame.”\
Example result
Here’s an example of what I’ve achieved so far with this setup (loopback + ControlNet + Canny) but i literally directed (change it on the go, using 'Run after change') the prompt manually across. Youtube
You can see how it morphs smoothly when the prompts align.
Any advice, node examples, or alternative workflows are very welcome
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I’m working on a morphing image generation loop in ComfyUI, and I’m trying to figure out a clean way to handle changing prompts across frames, while keeping the previous prompt active when there’s no new one defined.
Here’s my setup:
My current approach
I use an INT node to track the frame number, with “Control After Generate” set to Increment, so the frame value automatically increases after each generation.
For each frame, I want to apply a different positive prompt depending on the frame number. For example:
{ 0: "a cat on a chair", 5: "a cat jumping", 10: "a cat flying" }That means I want this behavior:
Right now, I’m testing this using a custom Dict node from the Basic Data Handling plugin, where each key = frame number and value = prompt.
But since not all frame numbers exist in the dict, I need a way to use the previous value for missing frames.
What I need
I want something that, for a given frame, returns the prompt for:
Basically: “use the most recent defined prompt up to this frame.”\
Example result
Here’s an example of what I’ve achieved so far with this setup (loopback + ControlNet + Canny) but i literally directed (change it on the go, using 'Run after change') the prompt manually across.
Youtube
You can see how it morphs smoothly when the prompts align.
Any advice, node examples, or alternative workflows are very welcome
Beta Was this translation helpful? Give feedback.
All reactions