Enhance Your Prompts for Flux1 Kontext-Dev Using Ollama

Nunchaku fast v1.0
jorgmikel76648
3 months ago

In this workflow, Iโ€™ve built an intelligent ComfyUI setup that automatically improves user prompts to better suit the Flux1 Kontext-Dev editing system โ€” a cutting-edge tool for image-to-image editing .

๐Ÿ“˜ Reference: Flux1 Kontext-Dev Official Guide


๐ŸŽฏ Goal

Flux1 Kontext-Dev relies heavily on clear, rich, and well-structured prompts to guide the editing process. However, many users provide short or vague prompts, leading to poor results.

This workflow solves that by integrating a local large language model (LLM) using Ollama, which rewrites simple prompts into descriptive, detailed prompts tailored for effective image editing.


โš™๏ธ How the Workflow Works

  1. User Inputs:

    • An image for editing.

    • A simple or vague text prompt describing the desired change.

  2. Ollama Integration (LLM for Prompt Enhancement):

    • The prompt is passed to Gemma-3, a vision-enabled LLM running locally via Ollama.

    • The model rewrites the prompt into a more expressive and visually descriptive version.

  3. Enhanced Prompt โ†’ Flux1:

    • The improved prompt is fed into the Flux1 Kontext-Dev nodes along with the input image.

    • Flux1 then performs context-aware image editing based on this high-quality prompt.


๐Ÿ“ฆ Requirements

To run this workflow, you need the following components:

โœ… 1. Ollama

A powerful local runtime for LLMs and vision models.

๐Ÿ”— Download and install Ollama:
https://ollama.com/download

โœ… 2. Vision Model: gemma3

Use a multimodal (vision + language) version of Gemma 3 depending on your systemโ€™s VRAM:

๐Ÿ‘‰ Model Page:
https://ollama.com/library/gemma3

ollama run gemma3

๐Ÿ”ฅUncensored Model:
https://ollama.com/huihui_ai/gemma3-abliterated

ollama run huihui_ai/gemma3-abliterated

โš ๏ธ Make sure you're using the multimodal (vision) variant of Gemma 3 to ensure it can process image-based prompts in ComfyUI.


โœ… Key Benefits

  • Improved editing accuracy from even simple input prompts.

  • Local-first, privacy-safe setup using Ollama and ComfyUI.

  • Flexible model choices depending on your hardware.


๐Ÿ’ก Example

Input prompt:

"change the style to realistic"

Enhanced prompt via Gemma-3:

"Change the image to a photorealistic rendering, with accurate lighting, textures, and details, while preserving the subjectโ€™s facial features, pose, and the existing composition."


๐ŸŒ Multilingual Prompt Support

This workflow supports prompts in any language, including Arabic, and automatically translates them into expressive English prompts that Flux1 can interpret.

๐Ÿ’ฌ Example:

Input (Arabic):

"ุญูˆู„ ุงู„ุณุชุงูŠู„ ุฅู„ู‰ ุญู‚ูŠู‚ูŠ"

Enhanced Output (English):

"Change the image to a photorealistic rendering, with accurate lighting, textures, and details, while preserving the subjectโ€™s facial features, pose, and the existing composition."

This makes the workflow highly accessible to non-English speakers while still benefiting from professional-grade prompt enhancement.

๐Ÿงฉ Workflow Versions

There are two versions of this workflow available:

๐Ÿ”น Basic Version

  • Designed for ease of use.

  • Supports 1โ€“2 input images.

๐Ÿ”ธ Advanced Version

Read more...
Download (8.77 KB) Download available on desktop only

Popularity

630 ~10

Info

Base model: Flux.1 Kontext

Version Nunchaku fast v1.0: 1 File

To download these files, please visit this page from a desktop computer.

3 Versions

๐Ÿ˜ฅ There are no Enhance Your Prompts for Flux1 Kontext-Dev Using Ollama Nunchaku fast v1.0 prompts yet!

Go ahead and upload yours!

No results

Your query returned no results โ€“ please try removing some filters or trying a different term.