by codercor · v0.1.0
Generate images in Dify with Ollama using x/flux2-klein.
This community listing does not yet include every recommended support, privacy, pricing, and permission disclosure. Review the available package permissions before installing.
Available inside your emploidai workspace after installation.
Available inside your emploidai workspace after installation.
A local Dify tool plugin that calls Ollama's OpenAI-compatible image generation endpoint and returns generated PNG files back to Dify.
POST /v1/images/generations on your Ollama serverx/flux2-klein by defaultmodelimage_countprompt_usedAt the time this starter was prepared, Ollama's image-generation support for FLUX.2 Klein was documented as working on macOS, with Windows and Linux support still rolling out. If generation fails even though the plugin is wired correctly, verify your Ollama/image-model support first.
Use Python 3.12 for local development and remote debug.
This plugin depends on dify_plugin, which currently requires tiktoken~=0.8.0. That tiktoken release provides wheels for Python 3.12 and 3.13, but not Python 3.14. On Python 3.14, pip falls back to building tiktoken from source, which requires a Rust toolchain.
If you see an error such as Building wheel for tiktoken ... error or can't find Rust compiler, switch to Python 3.12 instead of trying to install with your system python3.
Recommended values:
base_url
http://localhost:11434http://host.docker.internal:11434api_key
ollamadefault_model
x/flux2-kleintimeout
180prompt - requiredsize - optional, default 1024x1024n - optional, default 1model - optional override.env.example to .env.REMOTE_INSTALL_KEY must be the real debug key from Dify. If you leave a placeholder such as your-debug-key, startup will fail with handshake failed, invalid key.python3.12 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
pip install -r requirements.txt
python -m main
If python3.12 is not installed on macOS, install it first:
brew install python@3.12
From the parent directory:
dify plugin package ./ollama-flux2-klein-image-tool
This should create a .difypkg file that you can install from Dify using local file installation.
Create a premium Instagram launch visual for SKRILLEX with a dark luxury aesthetic, black and charcoal base, acid green accents, sharp editorial typography, cinematic lighting, centered focal point, strong negative space, high-end branding, include exact text: "SKRILLEX IS LIVE", "The next creative system starts now", "Discover More".