Nodes/DenRakEiw_Nodes/πŸ€– LLM Deforum (WIP)
ComfyUI Node

πŸ€– LLM Deforum (WIP)

Ask an LLM to write your entire Deforum schedule in one call

By DenRakEiwΒ·Created about a year agoΒ·Updated a day agoΒ· 34
πŸ€– LLM Deforum (WIP)
    • Prompt Schedule | Deforum
    • Denoise Schedule
    • Seed Schedule
    • Zoom Schedule
    • X Translation Schedule
    • Y Translation Schedule
    • Rotation Schedule
    • Stats
    β—„modelβ–Ύβ–Ί
    β—„num_frames200β–Ί
    β—„user_promptA psychedelic journey through a cat's dream, morphing through cosmic landscapesβ–Ί
    β—„stylepsychedelicβ–Ί
    β—„temperature1.0β–Ί
    β—„api_keyβ–Ί
    β—„custom_system_promptβ–Ί

    Writing a Deforum animation by hand means filling in seven parallel schedules - prompt keyframes, denoise, seed, zoom, x/y translation, rotation - all timed to the same frame count and kept subtle enough not to wobble the animation apart. LLMDeforumGenerator offloads that whole job to an OpenRouter LLM: you give it an idea, a frame count, and a style, and it returns all seven schedules in one call, already validated and cleaned up. The "(WIP)" in the display name is the author's own flag, and it's honest - this is the rough edge of the pack.

    What it generates

    The node calls OpenRouter with a system prompt that's a Deforum schedule spec (frame-keyed prompt entries like "0": "teacup filled with swirling galaxies", value schedules like 0:(0.4),50:(0.5),), and asks for a single JSON object with seven keys. Then it validates and fixes the output - trailing commas, missing frame-0 keyframes - so what comes out plugs directly into deforum-comfy-nodes ValueSchedule/PromptSchedule nodes.

    Outputs (all STRING): Prompt Schedule | Deforum, Denoise Schedule, Seed Schedule, Zoom Schedule, X Translation Schedule, Y Translation Schedule, Rotation Schedule, plus a Stats string. Wire each into the matching schedule node in a deforum-comfy-nodes pipeline.

    Inputs that matter

    • user_prompt (STRING) - your idea in plain words; there's a default psychedelic cat-dream demo.
    • num_frames (INT, default 200) - the LLM spaces keyframes across this count.
    • style - a dropdown of ten baked-in styles: psychedelic, horror, dreamy, abstract, cinematic, surreal, organic, geometric, noir, vaporwave. This is the biggest steer on the output beyond the prompt itself.
    • model - OpenRouter model slug (live list of a few hundred).
    • temperature (default 1.0) and api_key - standard. custom_system_prompt lets you replace the built-in spec entirely.

    Setup

    Needs an OpenRouter key - .env file with OPENROUTER_API_KEY=sk-or-..., the environment variable, or the api_key input. Pack install: ComfyUI Manager β†’ "DenRakEiw Nodes", or git clone https://github.com/DenRakEiw/DenRakEiw_Nodes + pip install -r requirements.txt + restart.

    The honest warnings

    Three things, and the first two are real enough that this node earns its WIP badge. Schedules can be numerically off. The LLM is asked to space keyframes at least 20 frames apart, but LLMs are bad at arithmetic; the validator catches syntax errors, not a zoom schedule that drifts from 1.0 to 1.4 across a segment it was told to keep subtle. Sanity-check the motion schedules before you burn a render on them. It's a paid API call per generation, and unlike a local LLM it's filtered - no uncensored path here, which for creative animation is a real limit. Deforum's prompt format needs "frame": "prompt", with trailing commas, and the LLM sometimes argues with the spec; the validator is your only safety net.

    For what it is - a fast way to get a 200-frame animation started rather than a blank keyframe sheet - it works. Just treat every schedule as a draft, not a deliverable. And remember the standing advice for any node that holds an API key and calls home by design: you're trusting the author with a credential, and this is a tiny one-person pack.

    Categorydenrakeiw/LLM

    Inputs (7)

    NameTypeDefaultDescription
    modelCOMBO384 options: aion-labs/aion-2.0, aion-labs/aion-3.0, aion-labs/aion-3.0-mini, aion-labs/aion-rp-llama-3.1-8b, amazon/nova-2-lite-v1, amazon/nova-lite-v1, +378
    num_framesINT2001–9999β€”
    user_promptSTRINGA psychedelic journey through a cat's dream, morphing through cosmic landscapesβ€”
    styleCOMBOpsychedelic10 options: psychedelic, horror, dreamy, abstract, cinematic, surreal, +4
    temperatureFLOAT1.00–2β€”
    api_keySTRINGβ€”
    custom_system_promptoptSTRINGβ€”

    Outputs (8)

    NameTypeDescription
    Prompt Schedule | DeforumSTRINGβ€”
    Denoise ScheduleSTRINGβ€”
    Seed ScheduleSTRINGβ€”
    Zoom ScheduleSTRINGβ€”
    X Translation ScheduleSTRINGβ€”
    Y Translation ScheduleSTRINGβ€”
    Rotation ScheduleSTRINGβ€”
    StatsSTRINGβ€”