Skip to content
Node packVerifiedExternal
Open source

ComfyUI-LTX-GapFill

LTX Tool for Filling gaps between Videos. Mimics Video Bridges, and helps with transistions.

FamilyLTX-VideoMaintainer@PixWizardryUnratedgrade

Package profile

Status
Verified
Publisher
@PixWizardry
Source
GitHub

README

ComfyUI-LTX-GapFill

This node is designed for Safe For Work (SFW) workflows only. It uses Google Gemini 2.5 Flash, which enforces Google's content policies. Do not use this node with NSFW imagery or prompts — requests containing inappropriate content will be rejected by the Gemini API.

A ComfyUI custom node that brings the "Fill with Video" AI prompt suggestion feature from LTX Desktop into ComfyUI workflows.

All credit for the original feature, system prompt design, pipeline architecture, and AI integration goes to the Lightricks team. This node is a faithful port of their work — the system prompt, Gemini payload structure, and frame analysis approach are reproduced verbatim from the LTX Desktop source code. Please support their work:


What It Does

This node uses Google Gemini 2.5 Flash to analyze frames and prompts from two neighboring video clips, then returns a suggested text prompt describing what should go between them. That prompt is wired into any LTX sampler node to generate the bridging video.

Use Cases

Gap filling The primary use case — you have two clips on a timeline with empty space between them. Provide the last frame of clip A and the first frame of clip B, and Gemini suggests a prompt for a new clip that flows naturally between both shots.

Transitions Feed any two frames from different scenes, shots, or styles to get a prompt for a transition clip that matches the visual tone of both sides and bridges them smoothly.

First frame / last frame situations Only have one side? The node works one-sided too:

  • Supply only clip_before_last_frame to generate something that naturally leads out of a clip
  • Supply only clip_after_first_frame to generate something that naturally leads into a clip
  • Useful for generating an opening shot, a closing shot, or extending a clip at either end

Install

  1. Copy this folder into your ComfyUI/custom_nodes/ directory
  2. Install dependencies:
    pip install requests Pillow numpy
    
    (all three are almost certainly already present in a standard ComfyUI environment)
  3. Restart ComfyUI

Node: LTX-GapFill Prompt (LTX Video Bridge)

Found under LTX → Gap Fill in the node browser.

Inputs

InputTypeRequiredDescription
seedINTYesComfyUI cache-buster only — not sent to Gemini. Change to force re-run when all other inputs are unchanged.
gemini_api_keySTRINGYesFree key from https://aistudio.google.com/app/apikey
modelDROPDOWNYesGemini model to use (all free tier with limitations)
custom_modelSTRINGNoOverride model dropdown with any Gemini model ID — leave blank to use dropdown
prompt_styleDROPDOWNYesControls length and focus of the generated prompt (see Prompt Styles below)
gap_durationFLOATYesDuration of the gap or desired clip length in seconds
resize_before_sendBOOLEANYesResize images before sending (default: True, recommended)
max_size_pxINTYesLongest edge in pixels when resizing (default: 512)
clip_before_last_frameIMAGEOptionalConnect the clip before the gap — last frame auto-selected
clip_after_first_frameIMAGEOptionalConnect the clip after the gap — first frame auto-selected
prompt_beforeSTRINGOptionalPrompt or description of the clip before the gap
prompt_afterSTRINGOptionalPrompt or description of the clip after the gap
custom_system_promptSTRINGOptionalWARNING: Overrides prompt_style entirely. A poorly written prompt wastes tokens and counts against your daily quota. Leave

Nodes in this pack

2 nodes
  • GapFillInspector
  • GeminiFillPrompt

Sources

3 sources
GitHubSourceVersion 5e49d8e62988bb586bd3e23054cb13088bcc4d07
github.com/PixWizardry/ComfyUI-LTX-GapFill

Verified Oct 2

Source excerpts

1 excerpt

Source context: Repo PixWizardry/ComfyUI-LTX-GapFill