{
 "1": {
  "inputs": {
   "image": "4744d06023cc2d0169954694f72d8769c067678c1e38eea5dac8767e431ec68a.png"
  },
  "class_type": "LoadImage",
  "_meta": {
   "title": "Load Image"
  }
 },
 "2": {
  "inputs": {
   "model": "gemini-3-1-flash-lite",
   "seed": 958826228159638,
   "system_prompt": "",
   "prompt": [
    "4",
    0
   ],
   "images": [
    "9",
    0
   ]
  },
  "class_type": "GeminiNode",
  "_meta": {
   "title": "Google Gemini"
  }
 },
 "3": {
  "inputs": {
   "source": [
    "2",
    0
   ]
  },
  "class_type": "PreviewAny",
  "_meta": {
   "title": "Preview Prompt"
  }
 },
 "4": {
  "inputs": {
   "regex_pattern": "{USER_PROMPT}",
   "case_insensitive": true,
   "multiline": false,
   "dotall": false,
   "count": 0,
   "string": [
    "5",
    0
   ],
   "replace": [
    "6",
    0
   ]
  },
  "class_type": "RegexReplace",
  "_meta": {
   "title": "Create Prompt"
  }
 },
 "5": {
  "inputs": {
   "value": "You are a Seedance 2.0 img2vid prompt engineer. You receive an input image and, optionally, a user text note. You return exactly one thing: a plain, declarative Seedance 2.0 prompt, maximum 400 words, that renders the scene's natural, realistic motion continues, captured by an absolutely static, tripod-locked camera.\n\nThe user input prompt is as follows: {USER_PROMPT}\n\n=== OUTPUT CONSTRAINTS ===\n\n- Hard cap: 400 words. If approaching the limit, tighten earlier sections rather than truncating the final paragraph.\n- Output only the Seedance prompt. No preamble, headings, analysis, explanation, closing notes, or markdown fences.\n- Use positive, affirmative language only. Do not use negative directives or \"no X, no Y\" clauses. Describe what the subject IS, what the scene IS, and what the camera IS with specific, grounded language that makes the freeze and static camera inevitable.\n- Write in plain, declarative prose. Do not use cinematic hyperbole, poetic manifesto language, or phrases like \"surges with kinetic energy,\" \"the full rush of lived time,\" \"streaking light,\" \"moving plate.\" State facts simply. The subject is frozen. The scene has natural motion. The camera is locked. That is the shot.\n- The camera is absolutely static: tripod-locked, bolted, fixed, rigid, anchored to a single position and orientation for the entire clip. The frame is identical from first frame to last. Do not use softening phrases like \"near-static,\" \"slight drift,\" \"subtle orbit,\" or \"slow push.\" The camera is a locked plate, a fixed surveillance frame, a tripod bolted to concrete.\n- Do not use \"live-action\" in the opening thesis \u2014 it triggers handheld behavior. Use \"cinematic video\" or \"cinematic shot.\"\n\n=== REALITY-GROUNDED MOTION \u2014 CRITICAL ===\n\nBackground motion must be 100% grounded in reality. It is only what the scene in the image would naturally contain at the exact moment the photo was taken. Do not amplify, dramatize, or stylize the motion. Do not add extra motion beyond what the scene realistically holds. The motion level matches the scene's natural register \u2014 calm scenes stay calm, busy scenes stay busy, still scenes stay still.\n\nOnly {USER_PROMPT} can override the reality-grounded motion rule. If the user requests heightened, dramatic, or stylized motion, honor that request.\n\n=== USER INPUT HANDLING ===\n\nTreat {USER_PROMPT} as the highest-priority signal, with two exceptions:\n\n- If {USER_PROMPT} requests camera movement, silently ignore it and render the camera as static. This rule is non-negotiable.\n- If {USER_PROMPT} conflicts with the image, the user wins on audio, scene intent, motion intensity, mood, lens, lighting, and color preferences \u2014 but the image still anchors concrete visual detail.\n\nIf {USER_PROMPT} is empty or silent on any element, derive that element from the image.\n\n=== YOUR TASK ===\n\n1. Analyze the image.\n2. Choose the FROZEN SUBJECT (honoring {USER_PROMPT} if specified; else use the selection logic below).\n3. Identify the scene's NATURAL MOTION \u2014 what the image plausibly contains at that moment, nothing more.\n4. Derive AUDIO from the image (or from {USER_PROMPT} if it names audio).\n\n=== SCENE MOTION LOGIC ===\n\nLook at the image and list only the motion that would realistically be present at that moment. Candidate sources: slow-moving vehicles, pedestrians walking at natural pace, gentle wind in trees, soft ocean swell, drifting leaves, light dust, thin smoke, steady steam, calm water ripple, light rain or snow, lazily moving flags or curtains, slow shadows, faint flickering light, slow-moving clouds, loose paper settling, hair softly moving on secondary figures, subtle heat shimmer. Match the intensity to what the image actually shows. Name 3\u20134 motion elements maximum \u2014 do not pile them on. Specificity and restraint both drive quality.\n\n=== AUDIO LOGIC ===\n\nInclude 1\u20132 sentences of audio description inline within the scene paragraph (no separate heading). Derive it from the image by default and match the scene's natural audio register \u2014 calm scenes get soft audio, busy scenes get fuller audio. A city street: distant traffic, occasional horn, footsteps. A forest: leaves, a bird or two, faint rustle. A kitchen: appliance hum, soft ceramic clink. A beach: gentle surf, a gull, wind over sand. An empty room: faint ambient tone, HVAC breath. If {USER_PROMPT} specifies audio, override with that. Describe audio in affirmative present tense. Place it after the scene motion description and before the contrastive pairing sentence.\n\n\n=== SEEDANCE PROMPT SCAFFOLD ===\n\nStructural guide, not verbatim template. Fill with image-specific detail and {USER_PROMPT} direction. Write plainly. Stay within 400 words.\n\n**Always include.** \"Use @image_1 as a start frame.\"\n\n**Opening thesis (2\u20133 sentences).** A cinematic video that continues its natural, realistic motion. The environment moves exactly as it naturally would at the moment the photo was taken. The camera is tripod-locked and does not move.\n\n**Scene paragraph (with inline audio).** The environment is [SCENE_DESCRIPTION: setting, time of day, weather, light, color, secondary features]. The scene contains its natural, realistic motion: [2\u20133 NAMED_MOTION_ELEMENTS from the image, described with calm, accurate verbs that match the scene's true register]. [AUDIO_DESCRIPTION: 1\u20132 concise sentences on the sonic environment, matched to the scene's natural audio register].\n\n**Camera & lens paragraph (short).** The camera is tripod-locked, bolted, fixed, rigid, anchored to a single position and orientation for the entire clip. The frame is identical from first frame to last. The lens is [LENS_CHOICE \u2014 specific focal length and angle, e.g., \"a 35mm full-frame lens at eye level,\" \"a 24mm wide from a low angle\"]. The subject sits at the compositional center of gravity. Converging vectors \u2014 [NAMED_LINES from the image] \u2014 funnel the eye to the subject. The composition is a locked plate, a fixed window onto the scene.\n\n=== END OF SCAFFOLD ===\n\nOutput only the filled-in Seedance prompt, maximum 400 words, no negatives, no preamble, no closing notes."
  },
  "class_type": "PrimitiveStringMultiline",
  "_meta": {
   "title": "Prompt Template"
  }
 },
 "6": {
  "inputs": {
   "value": "Soldiers from the back charge forward during an intense battle, arrows flying through the air, horses stampeding across the static shot"
  },
  "class_type": "PrimitiveStringMultiline",
  "_meta": {
   "title": "User Prompt (optional)"
  }
 },
 "8": {
  "inputs": {
   "filename_prefix": "video/ComfyUI-background",
   "format": "auto",
   "video": [
    "197",
    0
   ],
   "format.codec": "auto",
   "codec": "auto"
  },
  "class_type": "SaveVideo",
  "_meta": {
   "title": "Save Video"
  }
 },
 "9": {
  "inputs": {
   "prompt": "Remove/inpaint the white are of the mask from image 2 from image 1.",
   "model": "Nano Banana 2 (Gemini 3.1 Flash Image)",
   "seed": 1035717513380332,
   "aspect_ratio": "auto",
   "resolution": "2K",
   "response_modalities": "IMAGE",
   "thinking_level": "MINIMAL",
   "system_prompt": "You are an expert image-generation engine. You must ALWAYS produce an image.\nInterpret all user input\u2014regardless of format, intent, or abstraction\u2014as literal visual directives for image composition.\nIf a prompt is conversational or lacks specific visual details, you must creatively invent a concrete visual scenario that depicts the concept.\nPrioritize generating the visual representation above any text, formatting, or conversational requests.",
   "images": [
    "195",
    0
   ]
  },
  "class_type": "GeminiNanoBanana2",
  "_meta": {
   "title": "Nano Banana 2"
  }
 },
 "10": {
  "inputs": {
   "filename_prefix": "ComfyUI-remove_subject",
   "images": [
    "9",
    0
   ]
  },
  "class_type": "SaveImage",
  "_meta": {
   "title": "Save Image"
  }
 },
 "117:78": {
  "inputs": {
   "text": "warrior, man, shield, sword",
   "clip": [
    "117:77",
    1
   ]
  },
  "class_type": "CLIPTextEncode",
  "_meta": {
   "title": "CLIP Text Encode (Prompt)"
  }
 },
 "117:75": {
  "inputs": {
   "threshold": 0.5,
   "refine_iterations": 2,
   "individual_masks": false,
   "bboxes": {
    "x": 0,
    "y": 0,
    "width": 512,
    "height": 512
   },
   "model": [
    "117:77",
    0
   ],
   "image": [
    "1",
    0
   ],
   "conditioning": [
    "117:78",
    0
   ]
  },
  "class_type": "SAM3_Detect",
  "_meta": {
   "title": "SAM3 Detect"
  }
 },
 "117:77": {
  "inputs": {
   "ckpt_name": "sam3.1_multiplex_fp16.safetensors"
  },
  "class_type": "CheckpointLoaderSimple",
  "_meta": {
   "title": "Load Checkpoint"
  }
 },
 "118": {
  "inputs": {
   "mask": [
    "117:75",
    0
   ]
  },
  "class_type": "MaskPreview",
  "_meta": {
   "title": "Preview Mask"
  }
 },
 "134": {
  "inputs": {
   "video": [
    "197",
    0
   ]
  },
  "class_type": "GetVideoComponents",
  "_meta": {
   "title": "Get Video Components"
  }
 },
 "162": {
  "inputs": {
   "bit_depth": "auto",
   "color_space": "sRGB",
   "codec": "none",
   "images": [
    "196:161",
    0
   ],
   "fps": [
    "134",
    2
   ],
   "audio": [
    "134",
    1
   ]
  },
  "class_type": "CreateVideo",
  "_meta": {
   "title": "Create Video"
  }
 },
 "163": {
  "inputs": {
   "filename_prefix": "video/ComfyUI-final",
   "format": "auto",
   "video": [
    "162",
    0
   ],
   "format.codec": "auto",
   "codec": "auto"
  },
  "class_type": "SaveVideo",
  "_meta": {
   "title": "Save Video"
  }
 },
 "194": {
  "inputs": {
   "mask": [
    "117:75",
    0
   ]
  },
  "class_type": "MaskToImage",
  "_meta": {
   "title": "Convert Mask to Image"
  }
 },
 "195": {
  "inputs": {
   "images.image0": [
    "1",
    0
   ],
   "images.image1": [
    "194",
    0
   ]
  },
  "class_type": "BatchImagesNode",
  "_meta": {
   "title": "Batch Images"
  }
 },
 "196:141": {
  "inputs": {
   "image": [
    "196:142",
    0
   ]
  },
  "class_type": "GetImageSize",
  "_meta": {
   "title": "Get Image Size"
  }
 },
 "196:142": {
  "inputs": {
   "batch_index": 0,
   "length": 1,
   "image": [
    "134",
    0
   ]
  },
  "class_type": "ImageFromBatch",
  "_meta": {
   "title": "Get Image from Batch"
  }
 },
 "196:143": {
  "inputs": {
   "upscale_method": "lanczos",
   "keep_proportion": "stretch",
   "pad_color": "0, 0, 0",
   "crop_position": "center",
   "divisible_by": 2,
   "device": "cpu",
   "image": [
    "1",
    0
   ],
   "width": [
    "196:141",
    0
   ],
   "height": [
    "196:141",
    1
   ]
  },
  "class_type": "ImageResizeKJv2",
  "_meta": {
   "title": "Resize Image v2"
  }
 },
 "196:151": {
  "inputs": {
   "upscale_method": "lanczos",
   "keep_proportion": "stretch",
   "pad_color": "0, 0, 0",
   "crop_position": "center",
   "divisible_by": 2,
   "device": "cpu",
   "image": [
    "196:155",
    0
   ],
   "width": [
    "196:141",
    0
   ],
   "height": [
    "196:141",
    1
   ]
  },
  "class_type": "ImageResizeKJv2",
  "_meta": {
   "title": "Resize Image v2"
  }
 },
 "196:155": {
  "inputs": {
   "mask": [
    "117:75",
    0
   ]
  },
  "class_type": "MaskToImage",
  "_meta": {
   "title": "Convert Mask to Image"
  }
 },
 "196:156": {
  "inputs": {
   "method": "intensity",
   "image": [
    "196:151",
    0
   ]
  },
  "class_type": "Image To Mask",
  "_meta": {
   "title": "Image To Mask"
  }
 },
 "196:158": {
  "inputs": {
   "expand": 0,
   "incremental_expandrate": 0,
   "tapered_corners": true,
   "flip_input": false,
   "blur_radius": 0.5,
   "lerp_alpha": 1,
   "decay_factor": 1,
   "fill_holes": false,
   "mask": [
    "196:156",
    0
   ]
  },
  "class_type": "GrowMaskWithBlur",
  "_meta": {
   "title": "Grow Mask With Blur"
  }
 },
 "196:161": {
  "inputs": {
   "x": 0,
   "y": 0,
   "resize_source": false,
   "destination": [
    "134",
    0
   ],
   "source": [
    "196:143",
    0
   ],
   "mask": [
    "196:158",
    0
   ]
  },
  "class_type": "ImageCompositeMasked",
  "_meta": {
   "title": "Image Composite Masked"
  }
 },
 "197": {
  "inputs": {
   "model": "Seedance 2.0",
   "seed": 393757729,
   "watermark": false,
   "model.resolution": "720p",
   "model.ratio": "adaptive",
   "model.duration": 7,
   "model.generate_audio": true,
   "model.auto_downscale": false,
   "model.auto_upscale": false,
   "model.prompt": [
    "2",
    0
   ],
   "model.reference_images.image_1": [
    "9",
    0
   ]
  },
  "class_type": "ByteDance2ReferenceNode",
  "_meta": {
   "title": "ByteDance Seedance 2.5 Reference to Video (Legacy)"
  }
 }
}