Nodes/ComfyUI_Burve_Tools/Burve Gemini Input Files
ComfyUI Node

Burve Gemini Input Files

Hand Gemini a folder of PDFs and text files as generation context

By Burve·Created 9 months ago·Updated 5 days ago· 5
Burve Gemini Input Files
    • input_files
    file1
    file2
    file3
    file4
    file5
    file6
    file7
    file8

    Some Gemini image prompts don't want to live in a text box. If you're generating from a spec sheet, a script, or a document you'd rather not paste and re-paste, Burve Gemini Input Files is the node that turns up to eight files from your ComfyUI input folder into context the generator can actually read. It bundles validated PDF, TXT, Markdown, and CSV files into a single GEMINI_INPUT_FILES_PIPE you plug into the input_files socket on the Burve Gemini image-generation nodes.

    Here's the part that matters before you get excited: Gemini 2.5 Image doesn't support documents at all. This feature is only usable with the Gemini 3.x image models (3.1 Flash, 3 Pro, 3.1 Flash Lite). If you're still on 2.5, the pipe connects but the request will fail on the model side. That's a Google constraint, not a Burve one - the node is doing exactly what the API allows.

    How it works

    It's a thin, deliberately strict packer. Each file1file8 input is a file-upload string (so you get a nice file picker in the frontend, and the chosen paths are validated at runtime). The node resolves each path against your ComfyUI input directory, confirms the file actually exists and lives inside that directory - a path that escapes it is rejected outright - then maps the extension to a MIME type: .pdfapplication/pdf, .txttext/plain, .mdtext/markdown, .csvtext/csv. Anything outside that set is a hard error listing what's supported. Empty slots are skipped, so you can leave most of the eight empty and use one.

    The output is the single input_files pipe. The node doesn't read or send the file contents itself; it packages paths and MIME types, and the generation node handles uploading them to Google as part of the request. That means nothing leaves your machine until you actually run the generator - worth keeping in mind, because the moment you do, those documents go to Google's servers. That's the standing tradeoff of every API-wrapper node: your inputs leave the machine, subject to Google's retention and filtering. If that's a dealbreaker for a particular document, this node isn't the place to put it.

    Install

    Standard Burve pack install. ComfyUI Manager → search ComfyUI_Burve_Tools → install → restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Burve/ComfyUI_Burve_Tools.git
    cd ComfyUI_Burve_Tools
    pip install -r requirements.txt
    

    Dependencies are google-genai (≥2.13, <3), pillow, and pillow-heif. No model files, and no key needed for this node - but the generation node you feed it into needs a working GEMINI_API_KEY (or Vertex setup) and ComfyUI 0.4.0+.

    Gotchas

    • Files must live in the ComfyUI input directory. The node rejects absolute paths elsewhere, on purpose - it's a path-traversal guard, not a convenience feature. Drop the documents into ComfyUI/input (subfolders are fine) and reference them from there.
    • Use it only with Gemini 3.x image models, as above. If your system_messages output complains about unsupported documents, that's why.
    • The eight slots are for files, not pasted text. A string that isn't a valid in-input-folder file path errors at run time.

    This is the sort of node you install once, wire up for one document-driven workflow, and forget about. It's a small piece of a small pack, but it does the one job - validated, API-ready document context - cleanly.

    CategoryBurveTools/Google

    Inputs (8)

    NameTypeDefaultDescription
    file1optSTRING
    file2optSTRING
    file3optSTRING
    file4optSTRING
    file5optSTRING
    file6optSTRING
    file7optSTRING
    file8optSTRING

    Outputs (1)

    NameTypeDescription
    input_filesGEMINI_INPUT_FILES_PIPE