Sign In

Ollama captioner (nsfw-able) using gemma 3

4

Nov 21, 2025

(Updated: 11 days ago)

workflows
Ollama captioner (nsfw-able) using gemma 3

This tutorial provides the workflow and helpers for captioning images with gemma3:4b as an alternative to Gemini.

It's very fast and accurate and can do NSFW with a little bit of help.

  1. This tutorial depends on you installing and running ollama: https://ollama.com/download/linux After that you need to run: ollama pull gemma3:4b

  2. The dataset folder needs to be named 1.png, 2.png, 3.png etc. I provide here a sh script that does this but if that doesnt work for you you need to adjust to have it
    Download rename.txt, rename it to rename.sh and run that in your local dataset dir. It will rename all files 1.png, 2.png etc. I

  3. Import the ollama-caption.json and install any missing nodes

  4. Input the path to your dataset dir

  5. Go to comfy/user/default/was-node-suite and add the path to whitelist-dirs.list

  6. Add your trigger word to TextBox1 to have it inserted at the start of the caption

  7. Restart comfyui and run the workflow -> you will get the 1.txt, 2.txt etc files in your dataset dir

Pro tips:

  • you can set image_load_cap in Load image list from dir (inspire) to 1 and check the output in case you need to tweak the captioner system prompt (lower field).

  • i recommend removing watermarks so you dont get them when you generate with lora. i provide a kontext-remove-watermark worfklow that does this if you need it

  • if you can run gemma3:12b instead of gemma3:4b it's more accurate but requires more ram

Enjoy.

4