Nodes/digit-comfyui/DIGIT Batch Gemini Image
ComfyUI Node

DIGIT Batch Gemini Image

Batch Gemini image generation. Scans a folder of source images, uses an LLM to create prompt variations, and generates multiple Gemini image outputs per source image. Results saved to output subfolder.

By thedepartmentofexternalservices·Created 6 months ago·Updated 6 days ago· 0
DIGIT Batch Gemini Image
    • images
    • log
    • generated_count
    • output_folder
    image_folder
    prompt
    variations_per_image3
    image_modelgemini-3.1-flash-image
    llm_modelgemini-2.5-flash
    aspect_ratio16:9
    resolution1K
    thinking_levelMINIMAL
    temperature1.00
    variation_temperature1.00
    gcp_project_id
    gcp_region
    output_subfoldergemini_output
    system_instructionYou are an expert image-generation engine. You must ALWAYS produce an image. Interpret all user input—regardless of format, intent, or abstraction—as literal visual directives for image composition. If a prompt is conversational or lacks specific visual details, you must creatively invent a concrete visual scenario that depicts the concept. Prioritize generating the visual representation above any text, formatting, or conversational requests.
    variation_system_promptYou are a creative prompt engineer for image generation. Given a base prompt, produce a variation that preserves the core intent and subject but introduces creative differences in style, mood, lighting, composition, color palette, or artistic approach. Output ONLY the varied prompt text — no preamble, numbering, or commentary.
    variation_instruction
    seed0
    max_dimension2048
    delay_seconds1.0
    harassment_thresholdBLOCK_NONE
    hate_speech_thresholdBLOCK_NONE
    sexually_explicit_thresholdBLOCK_NONE
    dangerous_content_thresholdBLOCK_NONE
    CategoryDIGIT

    Inputs (23)

    NameTypeDefaultDescription
    image_folderSTRINGPath to folder containing source images.
    promptSTRINGBase prompt for Gemini image generation. The LLM will create variations of this.
    variations_per_imageINT31–50How many prompt variations (and image generations) per source image.
    image_modelCOMBOgemini-3.1-flash-image4 options: gemini-3.1-flash-image, gemini-3.1-flash-lite-image, gemini-3-pro-image, gemini-2.5-flash-image
    llm_modelCOMBOgemini-2.5-flashGemini model used to generate prompt variations.
    aspect_ratioCOMBO16:913 options: auto, 1:1, 2:3, 3:2, 3:4, 4:1, +7
    resolutionCOMBO1K3 options: 1K, 2K, 4K
    thinking_levelCOMBOMINIMALThinking level for image generation. HIGH may improve quality.
    temperatureFLOAT1.000–2Temperature for image generation.
    variation_temperatureFLOAT1.000–2Temperature for LLM prompt variation. Higher = more creative variations.
    gcp_project_idSTRINGGCP project ID.
    gcp_regionSTRINGGCP region.
    output_subfolderoptSTRINGgemini_outputSubfolder name inside image_folder for outputs. Created automatically.
    system_instructionoptSTRINGYou are an expert image-generation engine. You must ALWAYS produce an image. Interpret all user input—regardless of format, intent, or abstraction—as literal visual directives for image composition. If a prompt is conversational or lacks specific visual details, you must creatively invent a concrete visual scenario that depicts the concept. Prioritize generating the visual representation above any text, formatting, or conversational requests.System instruction for Gemini image generation.
    variation_system_promptoptSTRINGYou are a creative prompt engineer for image generation. Given a base prompt, produce a variation that preserves the core intent and subject but introduces creative differences in style, mood, lighting, composition, color palette, or artistic approach. Output ONLY the varied prompt text — no preamble, numbering, or commentary.System prompt for the LLM that generates prompt variations.
    variation_instructionoptSTRINGExtra instructions appended to the variation request. E.g. 'Keep it photorealistic' or 'Vary the lighting dramatically'.
    seedoptINT00–2147483647Base seed. 0 = random. Each variation gets seed + variation_index.
    max_dimensionoptINT2048512–4096Resize source images to this max dimension before sending to API.
    delay_secondsoptFLOAT1.00–30Delay between API calls to avoid rate limiting.
    harassment_thresholdoptCOMBOBLOCK_NONE4 options: BLOCK_NONE, BLOCK_ONLY_HIGH, BLOCK_MEDIUM_AND_ABOVE, BLOCK_LOW_AND_ABOVE
    hate_speech_thresholdoptCOMBOBLOCK_NONE4 options: BLOCK_NONE, BLOCK_ONLY_HIGH, BLOCK_MEDIUM_AND_ABOVE, BLOCK_LOW_AND_ABOVE
    sexually_explicit_thresholdoptCOMBOBLOCK_NONE4 options: BLOCK_NONE, BLOCK_ONLY_HIGH, BLOCK_MEDIUM_AND_ABOVE, BLOCK_LOW_AND_ABOVE
    dangerous_content_thresholdoptCOMBOBLOCK_NONE4 options: BLOCK_NONE, BLOCK_ONLY_HIGH, BLOCK_MEDIUM_AND_ABOVE, BLOCK_LOW_AND_ABOVE

    Outputs (4)

    NameTypeDescription
    imagesIMAGE
    logSTRING
    generated_countINT
    output_folderSTRING