[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-1485":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":8,"htmlUrl":8,"language":9,"languages":8,"totalLinesOfCode":8,"stars":10,"forks":11,"watchers":12,"openIssues":13,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":15,"stars7d":16,"stars30d":17,"stars90d":14,"forks30d":14,"starsTrendScore":18,"compositeScore":19,"rankGlobal":8,"rankLanguage":8,"license":8,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":20,"topics":23,"createdAt":8,"pushedAt":8,"updatedAt":24,"readmeContent":25,"aiSummary":26,"trendingCount":14,"starSnapshotCount":14,"syncStatus":27,"lastSyncTime":28,"discoverSource":29},1485,"ComfyUI-PromptRelay","kijai\u002FComfyUI-PromptRelay","kijai",null,"Python",393,50,8,14,0,10,17,113,30,5.12,false,"main",true,[],"2026-06-12 02:00:28","# ComfyUI Prompt-Relay\n\nWORK IN PROGRESS\n\n\u003Cimg width=\"1486\" height=\"1022\" alt=\"image\" src=\".\u002Fassets\u002Ftimeline_node.png\" \u002F>\n\n\nOriginal project:\n\nhttps:\u002F\u002Fgordonchen19.github.io\u002FPrompt-Relay\u002F\n\n---\n\n## Prompt Relay Encode (Smart)\n\n\u003Cimg width=\"1486\" alt=\"image\" src=\".\u002Fassets\u002Fsmart_nodes.png\" \u002F>\n\nThe Smart node accepts a single `smart_prompt` field and automatically calculates how to distribute your video's latent frames across segments. No manual frame counting required.\n\nThere are two syntax styles. Pick one per prompt — do not mix them.\n\n---\n\n### Syntax 1 — Inline (pipe-separated)\n\nSegments are separated by `|`. Weights are optional. If omitted, all segments get equal time.\n\n**Equal distribution:**\n```\nA man walks through a forest | He stops and looks around | He runs back\n```\n\n**Proportional distribution using `[start-end]` tags:**\n```\nA man walks through a forest [0-50] | He stops and looks around [50-150] | He runs back [150-200]\n```\n\nThe numbers inside `[ ]` are not frame counts — they are relative positions on an arbitrary scale. Only the span of each range matters. In the example above the total span is 200, so the first segment gets 25%, the second 50%, and the third 25% of the video regardless of how many actual frames the video has.\n\nYou can also use a single number `[50]` as a plain weight instead of a range.\n\n---\n\n### Syntax 2 — Block (newline headers)\n\nEach segment is preceded by a header line on its own line. The header is any words followed by a number and a colon. The header line is stripped entirely before encoding — it never reaches the tokenizer.\n\n**Equal distribution (ordinal headers):**\n```\nScene 1:\nA man walks through a forest\nScene 2:\nHe stops and looks around\nScene 3:\nHe runs back\n```\n\nA single number in the header (`Scene 1:`, `Part 4:`, `segment 9:`) is treated as a sequence marker and gives every segment equal weight.\n\n**Proportional distribution (range headers):**\n```\nScene 1-2:\nA man walks through a forest\nScene 2-5:\nHe stops and looks around\nScene 5-6:\nHe runs back\n```\n\nWhen the header contains a range (`1-2`, `2-5`, `5-6`), the span of the range (`1`, `3`, `1`) becomes the segment's proportional weight. Here the second segment gets three times as much screen time as the first and third.\n\nThe prefix words before the number are completely flexible — `Scene`, `Part`, `Shot`, `Segment`, `Second`, `Beat`, `Chapter`, `Step`, or any word you choose. Only the number and colon matter structurally.\n\nIf the `word2number` Python package is installed (`pip install word2number`), the number can also be written as a word: `Scene eleven:`, `Part twenty one:`.\n\n---\n\n### The `global_prompt` field\n\n`global_prompt` anchors persistent details across the entire video — style, character description, lighting, quality tags. Leave it empty and the node will automatically use the first segment's text as the global anchor.\n\n**Recommended pattern:** put your establishing description in segment 1, leave `global_prompt` blank, and use subsequent segments for action and motion changes only.\n\n---\n\n### The `normalize_by_tokens` toggle\n\nWhen enabled, each segment's weight is multiplied by its CLIP token count before frame distribution. This means segments with more tokens are allocated proportionally more latent frames. Off by default.\n\n---\n\n### Writing prompts with a VLM or LLM\n\nPaste the raw output directly into `smart_prompt`. The templates below are instruction blocks you send to the model. The model needs no knowledge of this node or how it works. Replace `[PLACEHOLDERS]` with your values before sending.\n\nThe first segment is automatically used as the global anchor for the entire video. It must therefore contain only a static description of what is directly visible in the provided content. The model must not add, infer, or invent anything not explicitly present in the input. All subsequent segments must describe only what changes during that period and must not re-establish what was already described in segment 1.\n\n---\n\n**Block syntax:**\n\n```\nWrite a video prompt with exactly [NUMBER] segments describing [YOUR SUBJECT\u002FSCENARIO].\n\nRules:\n1. Begin each segment with a header on its own line. Format: one word, a space, a number, a colon. Example: Scene 1:\n2. Write the segment text on the line after the header.\n3. Segment 1 describes only the static visible state of the provided input. No motion. No action. Nothing not present in the input.\n4. Each segment after segment 1 describes only what is changing or moving during that period. Do not repeat anything from segment 1.\n5. Output only the formatted segments. Nothing else.\n```\n\n**Inline syntax:**\n\n```\nWrite a video prompt with exactly [NUMBER] segments describing [YOUR SUBJECT\u002FSCENARIO].\n\nRules:\n1. Write all segments on one line separated by |\n2. Segment 1 describes only the static visible state of the provided input. No motion. No action. Nothing not present in the input.\n3. Each segment after segment 1 describes only what is changing or moving during that period. Do not repeat anything from segment 1.\n4. Output only the single line. Nothing else.\n```\n","ComfyUI-PromptRelay 是一个用于视频生成的智能提示分发工具。其核心功能是通过智能节点自动计算并分配视频的潜在帧到各个段落，支持两种语法风格：内联（管道分隔）和块（换行头）。用户可以定义每个段落的时间权重，无需手动计数帧数。该工具还提供了一个全局提示字段，用于在整个视频中保持一致的细节如风格、角色描述等。适用于需要根据文本提示自动生成或编辑视频内容的场景，特别适合于创意视频制作和个人项目开发。",2,"2026-06-11 02:44:05","CREATED_QUERY"]