Logo van Flux Txt2img

Flux Txt2img

Community
artokun
flux-txt2img

Bouw Flux txt2img-workflows met Flux.1 Dev (SRPO), Flux 2 Klein 9B, Turbo LoRAs, FluxGuidance en DualCLIPLoader-patronen

Add to TypingMind

Overzicht

Uitgeverartokun
Repositorycomfyui-mcp
Skillnaamflux-txt2img
Sterren
811
Forks
137
Meegeleverde bestanden
Alleen instructies
LicentieMIT
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Compleet zonder extra bestanden

    Alles wat het model nodig heeft, staat in de instructies — geen extra bestanden om te synchroniseren.

  • Open source

    Gepubliceerd door artokun op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Flux Txt2img in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/artokun/comfyui-mcp/tree/main/plugin/skills/flux-txt2img
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/artokun/comfyui-mcp.git /tmp/comfyui-mcp
mkdir -p .claude/skills
cp -r /tmp/comfyui-mcp/plugin/skills/flux-txt2img .claude/skills/flux-txt2img
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Flux Txt2img in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Flux Txt2img automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Flux Txt2img niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

Flux Text-to-Image Workflows

Overview

Flux is a guidance-distilled diffusion model family from Black Forest Labs. It uses a separate FluxGuidance node instead of KSampler CFG (which must always be 1.0). Three variants are available locally:

  1. Flux.1 Dev SRPO. Fine-tuned Flux.1 Dev with SRPO alignment. Uses DualCLIPLoader (T5XXL + CLIP-L). BF16 only.
  2. Flux 2 Klein 9B. Distilled Flux 2 variant. Uses single CLIPLoader (Qwen3-8B) + flux2-vae.safetensors. Fast 4-step generation.
  3. Flux 2 Turbo LoRA. Applied to Flux.1 Dev for 4-step generation.

Models

Flux.1 Dev SRPO

ComponentNodeModelNotes
UNETUNETLoaderflux.1-dev-SRPO-BFL-bf16.safetensors22.7GB, BF16 only — FP8 produces broken results
CLIPDualCLIPLoader (type=flux)clip_name1: t5xxl_fp8_e4m3fn.safetensors, clip_name2: clip_l.safetensorsT5XXL (4.7GB) + CLIP-L (235MB)
VAEVAELoaderae.safetensorsStandard Flux VAE (320MB). Z-Image uses the same VAE architecture but different weights — its VAE is a separate file (z-image-ae.safetensors), not this one

Flux 2 Klein 9B

ComponentNodeModelNotes
UNETUNETLoaderbigLove_klein1.safetensors17.3GB, Klein 9B variant
CLIPCLIPLoader (type=flux2)qwen_3_8b_fp8mixed.safetensorsQwen3-8B in text_encoders/ (8.3GB). Use flux2, NOT flux — both exist in the enum and flux fails at the sampler
VAEVAELoaderflux2-vae.safetensorsFlux 2 specific VAE (321MB)

Klein 9B vs Flux.1 Dev: Klein uses the Qwen3-8B text encoder (not T5XXL + CLIP-L). It has a different VAE (flux2-vae.safetensors). 9B distilled runs in 4 steps; 9B base needs ~50 steps at CFG 5.0. Fits in ~20GB VRAM with FP8.

Flux 2 Turbo LoRA (applied to Flux.1 Dev)

ComponentNodeModelNotes
LoRALoraLoaderModelOnlyflux2-turbo-lora.safetensors2.6GB, strength 1.0
Alt LoRALoraLoaderModelOnlyFlux2TurboComfyv2.safetensorsCommunity variant, same size

Conditioning

CLIPTextEncodeFlux (Recommended for Flux.1 Dev)

Provides separate prompt fields for each text encoder:

json
{
  "class_type": "CLIPTextEncodeFlux",
  "inputs": {
    "clip": ["<dual_clip>", 0],
    "clip_l": "short prompt for CLIP-L",
    "t5xxl": "detailed description for T5XXL",
    "guidance": 3.5
  }
}

clip_l captures key semantic features. t5xxl expands and refines descriptions. For simple use, put the same prompt in both fields. Guidance is built into this node, so no separate FluxGuidance is needed.

FluxGuidance (Alternative)

If using standard CLIPTextEncode instead of CLIPTextEncodeFlux, apply guidance separately:

json
{
  "class_type": "FluxGuidance",
  "inputs": {
    "conditioning": ["<clip_text_encode>", 0],
    "guidance": 3.5
  }
}

Guidance Values

ScenarioGuidanceNotes
Short prompts3.5–4.0Tighter prompt adherence
Long/complex prompts1.0–1.5More creative freedom
Realism2.5Less glossy skin, richer detail
Standard3.5Default for most use cases

Negative Conditioning

Flux does not support traditional negative prompts (guidance-distilled, CFG=1.0). Use ConditioningZeroOut:

json
{
  "class_type": "ConditioningZeroOut",
  "inputs": { "conditioning": ["<positive_cond>", 0] }
}

Or use an empty CLIPTextEncode for the negative input.

Sampler Settings

Flux.1 Dev SRPO

ParameterStandardNotes
steps20Range: 20–28
cfg1.0Always 1.0 — guidance is via FluxGuidance
sampler_nameipndmAuthor-recommended for SRPO
schedulerbetaAuthor-recommended for SRPO
guidance3.5Via CLIPTextEncodeFlux or FluxGuidance
denoise1.0

The SRPO author recommends the ipndm/beta combo. Standard Flux settings (euler/simple) also work, but ipndm/beta gives better results with this fine-tune.

Flux 2 Klein 9B (Distilled)

ParameterValueNotes
steps4Distilled model, 4 steps is optimal
cfg1.0Always 1.0
sampler_nameeuler
schedulersimple
denoise1.0

Flux 2 Klein 9B (Base/Undistilled)

ParameterValueNotes
steps50Full quality
cfg5.0Higher CFG for base model
sampler_nameeuler
schedulersimple

Flux.1 Dev + Turbo LoRA

ParameterValueNotes
steps4Turbo-distilled
cfg1.0
sampler_nameeuler
schedulersimple
lora_strength1.0

Resolutions

AspectResolutionMegapixels
Square1024x10241.0MP
Portrait 3:4896x11521.0MP
Landscape 4:31152x8961.0MP
Landscape 16:91344x7681.0MP
Portrait 9:16768x13441.0MP

Flux operates at ~1 megapixel natively. Dimensions should be multiples of 8.

Prompt Style

Natural language descriptions. No quality tags needed (unlike SDXL/Illustrious). Detailed, descriptive prompts work best.

Good: "A young woman with auburn hair sits at a sunlit cafe in Paris, wearing a cream linen blazer, soft bokeh background, shot on Sony A7III 85mm f/1.4"
Bad: "masterpiece, best quality, 1girl, cafe, paris"

Complete Workflow: Flux.1 Dev SRPO

json
{
  "1": { "class_type": "UNETLoader", "inputs": { "unet_name": "flux.1-dev-SRPO-BFL-bf16.safetensors", "weight_dtype": "default" }},
  "2": { "class_type": "DualCLIPLoader", "inputs": { "clip_name1": "t5xxl_fp8_e4m3fn.safetensors", "clip_name2": "clip_l.safetensors", "type": "flux" }},
  "3": { "class_type": "VAELoader", "inputs": { "vae_name": "ae.safetensors" }},
  "4": { "class_type": "CLIPTextEncodeFlux", "inputs": {
    "clip": ["2", 0],
    "clip_l": "<short prompt>",
    "t5xxl": "<detailed prompt>",
    "guidance": 3.5
  }},
  "5": { "class_type": "ConditioningZeroOut", "inputs": { "conditioning": ["4", 0] }},
  "6": { "class_type": "EmptyLatentImage", "inputs": { "width": 896, "height": 1152, "batch_size": 1 }},
  "7": { "class_type": "KSampler", "inputs": {
    "model": ["1", 0],
    "positive": ["4", 0],
    "negative": ["5", 0],
    "latent_image": ["6", 0],
    "seed": 42, "steps": 20, "cfg": 1, "sampler_name": "ipndm", "scheduler": "beta", "denoise": 1
  }},
  "8": { "class_type": "VAEDecode", "inputs": { "samples": ["7", 0], "vae": ["3", 0] }},
  "9": { "class_type": "SaveImage", "inputs": { "images": ["8", 0], "filename_prefix": "flux_srpo" }}
}

Complete Workflow: Flux 2 Klein 9B (Distilled, 4-Step)

json
{
  "1": { "class_type": "UNETLoader", "inputs": { "unet_name": "bigLove_klein1.safetensors", "weight_dtype": "default" }},
  "2": { "class_type": "CLIPLoader", "inputs": { "clip_name": "qwen_3_8b_fp8mixed.safetensors", "type": "flux2" }},
  "3": { "class_type": "VAELoader", "inputs": { "vae_name": "flux2-vae.safetensors" }},
  "4": { "class_type": "CLIPTextEncode", "inputs": { "clip": ["2", 0], "text": "<prompt>" }},
  "5": { "class_type": "ConditioningZeroOut", "inputs": { "conditioning": ["4", 0] }},
  "6": { "class_type": "EmptyFlux2LatentImage", "inputs": { "width": 1024, "height": 1024, "batch_size": 1 }},
  "7": { "class_type": "KSampler", "inputs": {
    "model": ["1", 0],
    "positive": ["4", 0],
    "negative": ["5", 0],
    "latent_image": ["6", 0],
    "seed": 42, "steps": 4, "cfg": 1, "sampler_name": "euler", "scheduler": "simple", "denoise": 1
  }},
  "8": { "class_type": "VAEDecode", "inputs": { "samples": ["7", 0], "vae": ["3", 0] }},
  "9": { "class_type": "SaveImage", "inputs": { "images": ["8", 0], "filename_prefix": "flux_klein" }}
}

Klein uses a single CLIPLoader (not DualCLIPLoader) with type: "flux2" and the Qwen3-8B text encoder from text_encoders/. The CLIP loader path resolves from models/text_encoders/.

Flux-2-specific gotchas, all of which fail at the KSampler rather than the loader, so the error points at the wrong node:

  • type must be flux2, not flux. Both values exist in the CLIPLoader enum, so flux loads without complaint and then dies during sampling.
  • Use EmptyFlux2LatentImage, not EmptyLatentImage. Flux 2 uses a different latent channel count.
  • Klein 9B pairs with the Qwen3-8B encoder (qwen_3_8b* from Comfy-Org/vae-text-encorder-for-flux-klein-9b). The similarly-named qwen_3_4b ships in the klein-4b repo and is for the 4B model. Mismatching them raises mat1 and mat2 shapes cannot be multiplied (512x7680 and 12288x4096), where 7680 = 2560x3 (4B hidden size) and 12288 = 4096x3 (8B). It reads as a confusing CLIP error rather than a wrong-file error.

Complete Workflow: Flux.1 Dev + Turbo LoRA (4-Step)

json
{
  "1": { "class_type": "UNETLoader", "inputs": { "unet_name": "flux.1-dev-SRPO-BFL-bf16.safetensors", "weight_dtype": "default" }},
  "2": { "class_type": "LoraLoaderModelOnly", "inputs": { "model": ["1", 0], "lora_name": "flux2-turbo-lora.safetensors", "strength_model": 1.0 }},
  "3": { "class_type": "DualCLIPLoader", "inputs": { "clip_name1": "t5xxl_fp8_e4m3fn.safetensors", "clip_name2": "clip_l.safetensors", "type": "flux" }},
  "4": { "class_type": "VAELoader", "inputs": { "vae_name": "ae.safetensors" }},
  "5": { "class_type": "CLIPTextEncodeFlux", "inputs": {
    "clip": ["3", 0],
    "clip_l": "<short prompt>",
    "t5xxl": "<detailed prompt>",
    "guidance": 3.5
  }},
  "6": { "class_type": "ConditioningZeroOut", "inputs": { "conditioning": ["5", 0] }},
  "7": { "class_type": "EmptyLatentImage", "inputs": { "width": 1024, "height": 1024, "batch_size": 1 }},
  "8": { "class_type": "KSampler", "inputs": {
    "model": ["2", 0],
    "positive": ["5", 0],
    "negative": ["6", 0],
    "latent_image": ["7", 0],
    "seed": 42, "steps": 4, "cfg": 1, "sampler_name": "euler", "scheduler": "simple", "denoise": 1
  }},
  "9": { "class_type": "VAEDecode", "inputs": { "samples": ["8", 0], "vae": ["4", 0] }},
  "10": { "class_type": "SaveImage", "inputs": { "images": ["9", 0], "filename_prefix": "flux_turbo" }}
}

LoRA Support

Custom LoRAs (jellyfish, etc.)

Apply Flux LoRAs with LoraLoaderModelOnly between UNET and KSampler:

json
{
  "class_type": "LoraLoaderModelOnly",
  "inputs": {
    "model": ["<unet_or_previous_lora>", 0],
    "lora_name": "<lora_file>.safetensors",
    "strength_model": 1.0
  }
}

Klein LoRAs

Klein 9B LoRAs go in the loras/Flux.2 Klein 9B/ subfolder:

  • klein_slider_detail.safetensors, a detail slider LoRA

VRAM Considerations

ModelVRAMNotes
SRPO BF16 + DualCLIP~24GBFills RTX 4090 exactly. Must use BF16 — FP8 is broken for SRPO
Klein 9B FP8 + Qwen3-8B~20GBFits comfortably on 4090
SRPO + Turbo LoRA~24GBSame as SRPO base
  • Always clear_vram before switching to Flux from another model family
  • T5XXL is the main VRAM consumer alongside the UNET; both stay loaded during sampling
  • CLIP-L is small (235MB) and negligible

Tips

  1. KSampler CFG must always be 1.0. All guidance is through CLIPTextEncodeFlux or FluxGuidance
  2. SRPO requires BF16. The FP8 quantization is known to produce broken results with this fine-tune
  3. For short prompts (1 to 2 sentences), increase guidance to 3.5 to 4.0. For long prompts (paragraph), decrease to 1.0 to 1.5
  4. Flux generates excellent text in images. Put text to render in quotes within your prompt
  5. Klein 9B is the fastest option at 4 steps. Use it for rapid iteration, then switch to SRPO for final quality

Sources

  • Official: none found.
  • Empirical: sampler values, wiring, and prompt notes from working graphs in packs/ and observed renders; not a vendor prompting guide.

Veelgestelde vragen

Wat doet de AI-skill Flux Txt2img?

Bouw Flux txt2img-workflows met Flux.1 Dev (SRPO), Flux 2 Klein 9B, Turbo LoRAs, FluxGuidance en DualCLIPLoader-patronen

Waarom Flux Txt2img gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Flux Txt2img bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Flux Txt2img in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/artokun/comfyui-mcp/tree/main/plugin/skills/flux-txt2img. TypingMind leest het bestand SKILL.md en installeert het als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Flux Txt2img gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Flux Txt2img gebruiken?

Zoveel als je wilt. Je kunt Flux Txt2img gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Flux Txt2img gratis?

Ja. Deze skill is door artokun op GitHub gepubliceerd onder de licentie MIT. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇