ComfyUI Extension: ComfyUI Gemma4 Reference Prompt

Authored by MaikiOS

Created

Updated

2 stars

Run ComfyUI workflows without the setup

No installs, no CUDA version roulette, no GPU sitting idle on your bill. Bring a workflow and run it in the browser.

Gemma 4 reference-image prompt nodes for ComfyUI

Looking for a different extension?

Custom Nodes (2)

README

ComfyUI-Gemma4-ReferencePrompt

Gemma 4 reference-image prompt nodes for ComfyUI.

Nodes:

  • Gemma4ReferencePrompt
  • Gemma4ReferencePromptPairLock

The pair-lock node creates positive and negative prompts from one reference image and can reuse the locked result across repeated shots.

Install

With ComfyUI Manager / Registry:

  1. Open Manager.
  2. Search for comfyui-gemma4-referenceprompt or ComfyUI Gemma4 Reference Prompt.
  3. Install it.
  4. Install requirements if Manager asks.
  5. Fully restart ComfyUI.

Fallback Git URL install:

  1. Open Manager.
  2. Use "Install via Git URL".
  3. Paste:
https://github.com/MaikiOS/ComfyUI-Gemma4-ReferencePrompt

Publisher:

@maikios

Manual install:

cd ComfyUI/custom_nodes
git clone https://github.com/MaikiOS/ComfyUI-Gemma4-ReferencePrompt
python -m pip install -r ComfyUI-Gemma4-ReferencePrompt/requirements.txt

Then fully restart ComfyUI.

Model

The node uses HuggingFace Transformers model id:

google/gemma-4-E2B-it

It is not placed in ComfyUI/models. Transformers downloads it to the HuggingFace cache, usually:

C:\Users\<USER>\.cache\huggingface\hub\models--google--gemma-4-E2B-it

If HuggingFace asks for access/token:

huggingface-cli login

Requirements

Gemma 4 needs transformers with Gemma4 classes. If ComfyUI errors with Unrecognized processing class, update:

python -m pip install --upgrade "transformers>=5.5.0" accelerate

Outputs

  • Gemma4ReferencePrompt returns one text prompt.
  • Gemma4ReferencePromptPairLock returns positive_prompt and negative_prompt.
  • Lock mode stores generated prompts in prompt_locks/ inside this node folder.

Notes

This pack depends on a large HuggingFace multimodal model. The first run can take time while the model downloads and loads into VRAM/RAM.

Run ComfyUI workflows without the setup

No installs, no CUDA version roulette, no GPU sitting idle on your bill. Bring a workflow and run it in the browser.

Learn more