Flux2 Klein Prompting logo

Flux2 Klein Prompting

Community
AnastasiyaW
flux2-klein-prompting

Expert prompt engineering for FLUX.2 [klein] image generation and editing model. Use this skill whenever the user wants to create prompts for FLUX.2 [klein], generate images, edit photos with the klein model, work with multi-reference image editing, or needs templates for T2I/I2I tasks. Trigger for any mention of: FLUX.2, flux klein, BFL API, image editing prompts, text-to-image prompts for FLUX, product mockups, poster generation, UI mockups, sticker packs, character design, seamless textures, or any request to write/improve/translate prompts for FLUX-family models. Also trigger when user asks about guidance_scale, inference steps, distilled vs base modes, or multi-reference workflows. Do NOT use for training a FLUX.2 Klein / Qwen-Edit LoRA (use flux2-lora-training), nor for reconstructing a prompt FROM an existing source image (use forensic-prompt-compiler); this skill is for authoring generation/edit prompts only.

Overview

PublisherAnastasiyaW
Repositorycodex-claude-code-config
Skill nameflux2-klein-prompting
Stars
212
Forks
32
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by AnastasiyaW on GitHub. Read the source before you install it.

Installation

Install the Flux2 Klein Prompting AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/AnastasiyaW/codex-claude-code-config/tree/main/skills/ai-ml/flux2-klein-prompting
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/AnastasiyaW/codex-claude-code-config.git /tmp/codex-claude-code-config
mkdir -p .claude/skills
cp -r /tmp/codex-claude-code-config/skills/ai-ml/flux2-klein-prompting .claude/skills/flux2-klein-prompting
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Flux2 Klein Prompting in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Flux2 Klein Prompting on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Flux2 Klein Prompting is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

FLUX.2 [klein] — Prompt Engineering Guide

Core principle: prose, not tags

BFL guidance favors a concrete natural-language description over an ambiguous bag of tags. State who/what is in the image, where, style, materials/light/camera and — for editing — the properties to preserve. Prompt shape is a starting point, not a quality guarantee; assess the result against the requested edit.


Model variants quick reference

AxisOptionsNotes
Size4B / 9B9B better for complex instructions; 4B fastest
ModeDistilled / BaseUse the exact model-card or serving API settings; step/CFG values are implementation-specific
License4B Apache-2.0 / 9B Non-CommercialCheck before commercial use
TaskT2I / Edit (I2I) / Multi-referenceThe current BFL image-editing guide documents up to 8 references via API (10 in playground); re-check the selected endpoint schema before use

9B uses Qwen3 8B text embedder → solid multilingual support (Russian works natively).


Prompt structure

T2I (text-to-image)

  1. Subject — who/what, key attributes
  2. Scene/context — where, time of day, surroundings
  3. Composition — framing, angle, background
  4. Light/materials — source, softness, reflections, texture
  5. Style/genre — photorealism, illustration, catalog, poster, UI
  6. Text in image (if needed) — exact string in quotes + position/font

Edit (I2I, no mask)

  1. Base anchor — "This exact image but…"
  2. What to change — object / background / text / color / material
  3. What to preserve — face, lighting, style, perspective, brand elements
  4. Multi-reference — reference by "image 2 / image 3", keep prompt concise

Key rules

Text in image → always in straight quotes, specify position. Without this: garbled glyphs.

Заголовок: "ТОЧНЫЙ ТЕКСТ". Шрифт жирный гротеск, ровный кернинг. Других надписей не добавлять.

Negatives → positives → don't say "don't change X", say "preserve X"

❌ "не меняй освещение"
✅ "Сохрани освещение, перспективу и лицо"

Multi-reference → simplify text, use explicit indexing

"Возьми персонажа из image 2 и помести рядом с объектом из image 1."

Choose distilled or base only after the task’s quality/latency requirement and the exact model card are known; neither is an automatic “preview” or “final” mode.


Ready-to-use templates (Russian)

Photorealistic object

Фотореалистичная предметная фотография [объект] на [фон], ракурс [сверху/на уровне глаз/крупный план], мягкий студийный свет, реалистичные материалы и фактуры, аккуратные тени, высокая детализация. Без логотипов и водяных знаков.

Product mockup / e-commerce

Каталожный product shot: [товар] в центре кадра, фон [описание], чистая композиция, цвет товара строго [HEX или словом], реалистичные отражения, нейтральный стиль, как для e-commerce.

Logo / icon

Минималистичная иконка: [смысл/символ], плоский дизайн, 2–3 цвета, чёткий силуэт, без мелких деталей. Без текста.

Character design

Персонаж: [кто], внешний вид: [рост/пропорции/одежда], выражение лица [эмоция], стиль [аниме/3D/иллюстрация], палитра [цвета], фон простой. Сохранить узнаваемость: [признак 1], [признак 2].

Sticker pack (6 emotions)

Набор стикеров одного персонажа (6 штук): радость, злость, удивление, смущение, сон, восторг. Единый стиль, толстый контур, яркая палитра, прозрачный фон, без текста.

Poster with readable text

Постер [стиль]. Вверху крупный заголовок: "ТОЧНЫЙ ТЕКСТ". Шрифт: жирный гротеск, ровный кернинг, читаемо. Ниже подзаголовок: "Ещё одна строка". Остальные надписи не добавлять.

UI mockup (mobile)

UI‑мокап мобильного приложения [тематика]. 3 экрана в одной сетке. Читаемые заголовки на русском в кавычках: "[Экран 1]", "[Экран 2]", "[Экран 3]". Минималистичная дизайн‑система, много воздуха, аккуратная типографика, без лишнего декоративного шума.

Seamless texture

Бесшовная текстура (seamless): [материал], равномерное освещение, без объектов, без текста, высокая детализация, натуральные вариации, без резких пятен.

Edit: replace / recolor / swap background

Это то же изображение, но: [что изменить]. Сохрани: [освещение / перспектива / лицо / композиция / стиль]. Сделай результат фотореалистичным и согласованным по теням и отражениям.

Edit: add text to sign/label

Это то же изображение, но добавь на [табличку/вывеску] точный текст: "[ТЕКСТ]". Сохрани стиль таблички, фон и освещение. Текст должен быть читаемым. Больше текста не добавляй.

Edit: multi-reference character swap

Это то же изображение, но возьми персонажа из image 2 и помести рядом с персонажем из image 1. Сохрани реалистичные тени, масштаб и общую атмосферу сцены.

API parameters

Recommended defaults (from official BFL HF Spaces)

ModeSettingsUse for
Distilled / BaseRead the exact checkpoint or API referenceChoose from the requested fidelity, latency and cost constraints

BFL API constraints (klein endpoints)

  • Endpoint fields, size limits, reference-image count and result-URL lifetime are API-version facts. Read the current endpoint reference before constructing a request; do not infer them from a local pipeline or another FLUX endpoint.

Available API fields (klein)

Do not maintain a local fixed field list. Copy the request schema from the current BFL API reference for the selected endpoint; multi-reference capacity, endpoint names and optional fields change independently of this skill.


Python: BFL API (async polling)

Illustrative request shape only: copy the current selected-endpoint example from BFL before use. This snippet does not establish that its endpoint or fields are currently supported.

python
import os, time, requests

BFL_API_KEY = os.environ["BFL_API_KEY"]

# 1. Create task
create = requests.post(
    "https://api.bfl.ai/v1/flux-2-klein-4b",
    headers={"x-key": BFL_API_KEY, "Content-Type": "application/json"},
    json={
        "prompt": 'Это то же изображение, но добавь на вывеску текст "ОТКРЫТО". '
                  "Сохрани фон, освещение и перспективу. Больше текста не добавляй.",
        "input_image": "https://example.com/your-image.png",
        "seed": 42,
        "output_format": "png",
    },
    timeout=60,
)
task = create.json()

# 2. Poll until ready
while True:
    time.sleep(0.5)
    data = requests.get(task["polling_url"], headers={"x-key": BFL_API_KEY}).json()
    if data["status"] == "Ready":
        print("Done:", data["result"]["sample"])  # signed URL
        break
    if data["status"] in ("Error", "Failed"):
        raise RuntimeError(data)

Python: local Diffusers

Illustrative pipeline shape only. The shown step/guidance values are not a recommended default; verify the installed pipeline and selected model card.

python
import torch
from PIL import Image
from diffusers import Flux2KleinPipeline

pipe = Flux2KleinPipeline.from_pretrained(
    "black-forest-labs/FLUX.2-klein-4B", torch_dtype=torch.bfloat16
).to("cuda")

# T2I
image = pipe(
    prompt='Постер "КОФЕ". Жирный гротеск, ровный кернинг, без других надписей.',
    height=1024, width=1024,
    guidance_scale=1.0, num_inference_steps=4,
    # A CPU generator makes comparisons more stable across GPU runs.  It is
    # not a cross-version or cross-hardware reproducibility guarantee.
    generator=torch.Generator("cpu").manual_seed(42),
).images[0]

# Edit (I2I)
base = Image.open("input.png").convert("RGB").resize((1024, 1024))
edited = pipe(
    prompt="Это то же изображение, но замени фон на светлую кухню. "
           "Сохрани объект, освещение и перспективу.",
    image=[base],
    height=1024, width=1024,
    guidance_scale=1.0, num_inference_steps=4,
).images[0]

Troubleshooting

ProblemCauseFix
Garbled text / glyphsText not quoted explicitlyExact string in quotes; say "no other text"
Blurry / artifactsSelected configuration may be too aggressive for the taskCompare a small, pinned parameter change on the accepted visual criteria; do not assume a universal step count or mode
Style drift in editMissing preservation clauseAlways add "Сохрани: свет/лицо/композицию"
Multi-reference "soup"Overloaded prompt + conflicting refsSimplify text; use "image 1 / image 2" indexing
Wrong resolutionInput not multiple of 16Pre-resize input to ×16, ≤4MP

Iteration workflow

  1. Write scene in prose (one paragraph)
  2. Create a controlled candidate using parameters supported by the selected checkpoint or API, and record them with the output.
  3. Fix the seed when the runner supports it and record the model revision, Diffusers/PyTorch version, hardware, dtype and scheduler. A seed makes a controlled comparison within that recorded stack; it is not a cross-version or cross-hardware reproducibility guarantee. Pick 1–2 directions against the task's actual criteria.
  4. Refine prompt: add specifics, quote text, remove filler adjectives.
  5. Edit iterations: one change per step, state what must be preserved, and keep only variants that pass the requested fidelity checks.

Quality metrics (for A/B testing)

  • CLIPScore — prompt↔image alignment (reference-free)
  • FID — realism vs real image distribution
  • Human rating — separate scales for: (a) prompt adherence, (b) quality/realism, (c) text readability, (d) preservation of unchanged parts in edit

Official sources

Frequently asked questions

What does the Flux2 Klein Prompting AI skill do?

Expert prompt engineering for FLUX.2 [klein] image generation and editing model. Use this skill whenever the user wants to create prompts for FLUX.2 [klein], generate images, edit photos with the klein model, work with multi-reference image editing, or needs templates for T2I/I2I tasks. Trigger for any mention of: FLUX.2, flux klein, BFL API, image editing prompts, text-to-image prompts for FLUX, product mockups, poster generation, UI mockups, sticker packs, character design, seamless textures, or any request to write/improve/translate prompts for FLUX-family models. Also trigger when user...

Why use Flux2 Klein Prompting on TypingMind?

Because you install it once and use it with any model. Flux2 Klein Prompting is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Flux2 Klein Prompting in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/AnastasiyaW/codex-claude-code-config/tree/main/skills/ai-ml/flux2-klein-prompting. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Flux2 Klein Prompting?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Flux2 Klein Prompting?

As many as you like. As long as a model supports skills, you can use Flux2 Klein Prompting with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Flux2 Klein Prompting AI skill free?

Yes. It is published on GitHub by AnastasiyaW under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇