New: Earn 20% as an AgentAlley affiliate. Share your link and earn on every sale you refer. Join now New: Earn 20% as an affiliate. Join now

Build Flux txt2img workflows with Flux.1 Dev

Flux Text-to-Image Workflows

by artokun · MIT license · ★ 759 on GitHub · updated Sep 21

Flux Text-to-Image Workflows cover

Build Flux txt2img workflows with Flux.1 Dev (SRPO), Flux 2 Klein 9B, Turbo LoRAs, FluxGuidance, and DualCLIPLoader patterns

---
name: flux-txt2img
description: Build Flux txt2img workflows with Flux.1 Dev (SRPO), Flux 2 Klein 9B, Turbo LoRAs, FluxGuidance, and DualCLIPLoader patterns
globs:
  - "**/*.json"
---

# 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

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:

Manual install (npx, ZIP)
Claude Codenpx skills add artokun/comfyui-mcp --skill flux-txt2img -g -a claude-code
Claude Code (manual)mkdir -p ~/.claude/skills && curl -sL https://codeload.github.com/artokun/comfyui-mcp/tar.gz/1d5b12b1b499 \ | tar -xz -C ~/.claude/skills --strip-components=3 comfyui-mcp-1d5b12b1b499/plugin/skills/flux-txt2img
Windows (PowerShell)New-Item -ItemType Directory -Force "$HOME\.claude\skills" | Out-Null; Invoke-WebRequest "https://m.agentalley.io/zip/0af3a79f8fdbe927ac78/flux-txt2img.zip" -OutFile "$env:TEMP\flux-txt2img.zip"; Expand-Archive "$env:TEMP\flux-txt2img.zip" -DestinationPath "$HOME\.claude\skills" -Force
Claude.ai / desktopDownload the ZIP and upload it under Settings → Capabilities → Skills.
Codex, Cursor, other agentsPoint them at SKILL.md. The other files are plain text.

Connects with Agent Alley MCP · agentalley.io/mcp

Files included

  • SKILL.md11.9 KB
Read the files here
artokun/1d5b12b1 file
SKILL.md
Show the full text296 lines

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
Component Node Model Notes
UNET UNETLoader flux.1-dev-SRPO-BFL-bf16.safetensors 22.7GB, BF16 only — FP8 produces broken results
CLIP DualCLIPLoader (type=flux) clip_name1: t5xxl_fp8_e4m3fn.safetensors, clip_name2: clip_l.safetensors T5XXL (4.7GB) + CLIP-L (235MB)
VAE VAELoader ae.safetensors Standard 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
Component Node Model Notes
UNET UNETLoader bigLove_klein1.safetensors 17.3GB, Klein 9B variant
CLIP CLIPLoader (type=flux2) qwen_3_8b_fp8mixed.safetensors Qwen3-8B in text_encoders/ (8.3GB). Use flux2, NOT flux — both exist in the enum and flux fails at the sampler
VAE VAELoader flux2-vae.safetensors Flux 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)
Component Node Model Notes
LoRA LoraLoaderModelOnly flux2-turbo-lora.safetensors 2.6GB, strength 1.0
Alt LoRA LoraLoaderModelOnly Flux2TurboComfyv2.safetensors Community variant, same size

Conditioning

Provides separate prompt fields for each text encoder:

{
  "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:

{
  "class_type": "FluxGuidance",
  "inputs": {
    "conditioning": ["<clip_text_encode>", 0],
    "guidance": 3.5
  }
}
Guidance Values
Scenario Guidance Notes
Short prompts 3.5–4.0 Tighter prompt adherence
Long/complex prompts 1.0–1.5 More creative freedom
Realism 2.5 Less glossy skin, richer detail
Standard 3.5 Default for most use cases
Negative Conditioning

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

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

Or use an empty CLIPTextEncode for the negative input.

Sampler Settings

Flux.1 Dev SRPO
Parameter Standard Notes
steps 20 Range: 20–28
cfg 1.0 Always 1.0 — guidance is via FluxGuidance
sampler_name ipndm Author-recommended for SRPO
scheduler beta Author-recommended for SRPO
guidance 3.5 Via CLIPTextEncodeFlux or FluxGuidance
denoise 1.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)
Parameter Value Notes
steps 4 Distilled model, 4 steps is optimal
cfg 1.0 Always 1.0
sampler_name euler
scheduler simple
denoise 1.0
Flux 2 Klein 9B (Base/Undistilled)
Parameter Value Notes
steps 50 Full quality
cfg 5.0 Higher CFG for base model
sampler_name euler
scheduler simple
Flux.1 Dev + Turbo LoRA
Parameter Value Notes
steps 4 Turbo-distilled
cfg 1.0
sampler_name euler
scheduler simple
lora_strength 1.0

Resolutions

Aspect Resolution Megapixels
Square 1024x1024 1.0MP
Portrait 3:4 896x1152 1.0MP
Landscape 4:3 1152x896 1.0MP
Landscape 16:9 1344x768 1.0MP
Portrait 9:16 768x1344 1.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

{
  "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)

{
  "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)

{
  "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:

{
  "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

Model VRAM Notes
SRPO BF16 + DualCLIP ~24GB Fills RTX 4090 exactly. Must use BF16 — FP8 is broken for SRPO
Klein 9B FP8 + Qwen3-8B ~20GB Fits comfortably on 4090
SRPO + Turbo LoRA ~24GB Same 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.
1---
2name: flux-txt2img
3description: Build Flux txt2img workflows with Flux.1 Dev (SRPO), Flux 2 Klein 9B, Turbo LoRAs, FluxGuidance, and DualCLIPLoader patterns
4globs:
5 - "**/*.json"
6---
7 
8# Flux Text-to-Image Workflows
9 
10## Overview
11 
12Flux 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:
13 
141. **Flux.1 Dev SRPO.** Fine-tuned Flux.1 Dev with SRPO alignment. Uses DualCLIPLoader (T5XXL + CLIP-L). BF16 only.
152. **Flux 2 Klein 9B.** Distilled Flux 2 variant. Uses single CLIPLoader (Qwen3-8B) + `flux2-vae.safetensors`. Fast 4-step generation.
163. **Flux 2 Turbo LoRA.** Applied to Flux.1 Dev for 4-step generation.
17 
18## Models
19 
20### Flux.1 Dev SRPO
21 
22| Component | Node | Model | Notes |
23|-----------|------|-------|-------|
24| **UNET** | `UNETLoader` | `flux.1-dev-SRPO-BFL-bf16.safetensors` | 22.7GB, **BF16 only** — FP8 produces broken results |
25| **CLIP** | `DualCLIPLoader` (type=`flux`) | `clip_name1`: `t5xxl_fp8_e4m3fn.safetensors`, `clip_name2`: `clip_l.safetensors` | T5XXL (4.7GB) + CLIP-L (235MB) |
26| **VAE** | `VAELoader` | `ae.safetensors` | Standard 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 |
27 
28### Flux 2 Klein 9B
29 
30| Component | Node | Model | Notes |
31|-----------|------|-------|-------|
32| **UNET** | `UNETLoader` | `bigLove_klein1.safetensors` | 17.3GB, Klein 9B variant |
33| **CLIP** | `CLIPLoader` (type=`flux2`) | `qwen_3_8b_fp8mixed.safetensors` | Qwen3-8B in text_encoders/ (8.3GB). Use `flux2`, NOT `flux` — both exist in the enum and `flux` fails at the sampler |
34| **VAE** | `VAELoader` | `flux2-vae.safetensors` | Flux 2 specific VAE (321MB) |
35 
36Klein 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.
37 
38### Flux 2 Turbo LoRA (applied to Flux.1 Dev)
39 
40| Component | Node | Model | Notes |
41|-----------|------|-------|-------|
42| **LoRA** | `LoraLoaderModelOnly` | `flux2-turbo-lora.safetensors` | 2.6GB, strength 1.0 |
43| **Alt LoRA** | `LoraLoaderModelOnly` | `Flux2TurboComfyv2.safetensors` | Community variant, same size |
44 
45## Conditioning
46 
47### CLIPTextEncodeFlux (Recommended for Flux.1 Dev)
48 
49Provides separate prompt fields for each text encoder:
50 
51```json
52{
53 "class_type": "CLIPTextEncodeFlux",
54 "inputs": {
55 "clip": ["<dual_clip>", 0],
56 "clip_l": "short prompt for CLIP-L",
57 "t5xxl": "detailed description for T5XXL",
58 "guidance": 3.5
59 }
60}
61```
62 
63`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.
64 
65### FluxGuidance (Alternative)
66 
67If using standard `CLIPTextEncode` instead of `CLIPTextEncodeFlux`, apply guidance separately:
68 
69```json
70{
71 "class_type": "FluxGuidance",
72 "inputs": {
73 "conditioning": ["<clip_text_encode>", 0],
74 "guidance": 3.5
75 }
76}
77```
78 
79### Guidance Values
80 
81| Scenario | Guidance | Notes |
82|----------|----------|-------|
83| Short prompts | 3.5–4.0 | Tighter prompt adherence |
84| Long/complex prompts | 1.0–1.5 | More creative freedom |
85| Realism | 2.5 | Less glossy skin, richer detail |
86| Standard | 3.5 | Default for most use cases |
87 
88### Negative Conditioning
89 
90Flux does not support traditional negative prompts (guidance-distilled, CFG=1.0). Use `ConditioningZeroOut`:
91 
92```json
93{
94 "class_type": "ConditioningZeroOut",
95 "inputs": { "conditioning": ["<positive_cond>", 0] }
96}
97```
98 
99Or use an empty `CLIPTextEncode` for the negative input.
100 
101## Sampler Settings
102 
103### Flux.1 Dev SRPO
104 
105| Parameter | Standard | Notes |
106|-----------|----------|-------|
107| steps | 20 | Range: 20–28 |
108| cfg | 1.0 | **Always 1.0** — guidance is via FluxGuidance |
109| sampler_name | ipndm | Author-recommended for SRPO |
110| scheduler | beta | Author-recommended for SRPO |
111| guidance | 3.5 | Via CLIPTextEncodeFlux or FluxGuidance |
112| denoise | 1.0 | |
113 
114The SRPO author recommends the ipndm/beta combo. Standard Flux settings (euler/simple) also work, but ipndm/beta gives better results with this fine-tune.
115 
116### Flux 2 Klein 9B (Distilled)
117 
118| Parameter | Value | Notes |
119|-----------|-------|-------|
120| steps | 4 | Distilled model, 4 steps is optimal |
121| cfg | 1.0 | Always 1.0 |
122| sampler_name | euler | |
123| scheduler | simple | |
124| denoise | 1.0 | |
125 
126### Flux 2 Klein 9B (Base/Undistilled)
127 
128| Parameter | Value | Notes |
129|-----------|-------|-------|
130| steps | 50 | Full quality |
131| cfg | 5.0 | Higher CFG for base model |
132| sampler_name | euler | |
133| scheduler | simple | |
134 
135### Flux.1 Dev + Turbo LoRA
136 
137| Parameter | Value | Notes |
138|-----------|-------|-------|
139| steps | 4 | Turbo-distilled |
140| cfg | 1.0 | |
141| sampler_name | euler | |
142| scheduler | simple | |
143| lora_strength | 1.0 | |
144 
145## Resolutions
146 
147| Aspect | Resolution | Megapixels |
148|--------|-----------|------------|
149| Square | 1024x1024 | 1.0MP |
150| Portrait 3:4 | 896x1152 | 1.0MP |
151| Landscape 4:3 | 1152x896 | 1.0MP |
152| Landscape 16:9 | 1344x768 | 1.0MP |
153| Portrait 9:16 | 768x1344 | 1.0MP |
154 
155Flux operates at ~1 megapixel natively. Dimensions should be multiples of 8.
156 
157## Prompt Style
158 
159Natural language descriptions. No quality tags needed (unlike SDXL/Illustrious). Detailed, descriptive prompts work best.
160 
161```
162Good: "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"
163Bad: "masterpiece, best quality, 1girl, cafe, paris"
164```
165 
166## Complete Workflow: Flux.1 Dev SRPO
167 
168```json
169{
170 "1": { "class_type": "UNETLoader", "inputs": { "unet_name": "flux.1-dev-SRPO-BFL-bf16.safetensors", "weight_dtype": "default" }},
171 "2": { "class_type": "DualCLIPLoader", "inputs": { "clip_name1": "t5xxl_fp8_e4m3fn.safetensors", "clip_name2": "clip_l.safetensors", "type": "flux" }},
172 "3": { "class_type": "VAELoader", "inputs": { "vae_name": "ae.safetensors" }},
173 "4": { "class_type": "CLIPTextEncodeFlux", "inputs": {
174 "clip": ["2", 0],
175 "clip_l": "<short prompt>",
176 "t5xxl": "<detailed prompt>",
177 "guidance": 3.5
178 }},
179 "5": { "class_type": "ConditioningZeroOut", "inputs": { "conditioning": ["4", 0] }},
180 "6": { "class_type": "EmptyLatentImage", "inputs": { "width": 896, "height": 1152, "batch_size": 1 }},
181 "7": { "class_type": "KSampler", "inputs": {
182 "model": ["1", 0],
183 "positive": ["4", 0],
184 "negative": ["5", 0],
185 "latent_image": ["6", 0],
186 "seed": 42, "steps": 20, "cfg": 1, "sampler_name": "ipndm", "scheduler": "beta", "denoise": 1
187 }},
188 "8": { "class_type": "VAEDecode", "inputs": { "samples": ["7", 0], "vae": ["3", 0] }},
189 "9": { "class_type": "SaveImage", "inputs": { "images": ["8", 0], "filename_prefix": "flux_srpo" }}
190}
191```
192 
193## Complete Workflow: Flux 2 Klein 9B (Distilled, 4-Step)
194 
195```json
196{
197 "1": { "class_type": "UNETLoader", "inputs": { "unet_name": "bigLove_klein1.safetensors", "weight_dtype": "default" }},
198 "2": { "class_type": "CLIPLoader", "inputs": { "clip_name": "qwen_3_8b_fp8mixed.safetensors", "type": "flux2" }},
199 "3": { "class_type": "VAELoader", "inputs": { "vae_name": "flux2-vae.safetensors" }},
200 "4": { "class_type": "CLIPTextEncode", "inputs": { "clip": ["2", 0], "text": "<prompt>" }},
201 "5": { "class_type": "ConditioningZeroOut", "inputs": { "conditioning": ["4", 0] }},
202 "6": { "class_type": "EmptyFlux2LatentImage", "inputs": { "width": 1024, "height": 1024, "batch_size": 1 }},
203 "7": { "class_type": "KSampler", "inputs": {
204 "model": ["1", 0],
205 "positive": ["4", 0],
206 "negative": ["5", 0],
207 "latent_image": ["6", 0],
208 "seed": 42, "steps": 4, "cfg": 1, "sampler_name": "euler", "scheduler": "simple", "denoise": 1
209 }},
210 "8": { "class_type": "VAEDecode", "inputs": { "samples": ["7", 0], "vae": ["3", 0] }},
211 "9": { "class_type": "SaveImage", "inputs": { "images": ["8", 0], "filename_prefix": "flux_klein" }}
212}
213```
214 
215Klein 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/`.
216 
217Flux-2-specific gotchas, all of which fail at the KSampler rather than the loader, so the error points at the wrong node:
218- `type` must be `flux2`, not `flux`. Both values exist in the CLIPLoader enum, so `flux` loads without complaint and then dies during sampling.
219- Use `EmptyFlux2LatentImage`, not `EmptyLatentImage`. Flux 2 uses a different latent channel count.
220- 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.
221 
222## Complete Workflow: Flux.1 Dev + Turbo LoRA (4-Step)
223 
224```json
225{
226 "1": { "class_type": "UNETLoader", "inputs": { "unet_name": "flux.1-dev-SRPO-BFL-bf16.safetensors", "weight_dtype": "default" }},
227 "2": { "class_type": "LoraLoaderModelOnly", "inputs": { "model": ["1", 0], "lora_name": "flux2-turbo-lora.safetensors", "strength_model": 1.0 }},
228 "3": { "class_type": "DualCLIPLoader", "inputs": { "clip_name1": "t5xxl_fp8_e4m3fn.safetensors", "clip_name2": "clip_l.safetensors", "type": "flux" }},
229 "4": { "class_type": "VAELoader", "inputs": { "vae_name": "ae.safetensors" }},
230 "5": { "class_type": "CLIPTextEncodeFlux", "inputs": {
231 "clip": ["3", 0],
232 "clip_l": "<short prompt>",
233 "t5xxl": "<detailed prompt>",
234 "guidance": 3.5
235 }},
236 "6": { "class_type": "ConditioningZeroOut", "inputs": { "conditioning": ["5", 0] }},
237 "7": { "class_type": "EmptyLatentImage", "inputs": { "width": 1024, "height": 1024, "batch_size": 1 }},
238 "8": { "class_type": "KSampler", "inputs": {
239 "model": ["2", 0],
240 "positive": ["5", 0],
241 "negative": ["6", 0],
242 "latent_image": ["7", 0],
243 "seed": 42, "steps": 4, "cfg": 1, "sampler_name": "euler", "scheduler": "simple", "denoise": 1
244 }},
245 "9": { "class_type": "VAEDecode", "inputs": { "samples": ["8", 0], "vae": ["4", 0] }},
246 "10": { "class_type": "SaveImage", "inputs": { "images": ["9", 0], "filename_prefix": "flux_turbo" }}
247}
248```
249 
250## LoRA Support
251 
252### Custom LoRAs (jellyfish, etc.)
253 
254Apply Flux LoRAs with `LoraLoaderModelOnly` between UNET and KSampler:
255 
256```json
257{
258 "class_type": "LoraLoaderModelOnly",
259 "inputs": {
260 "model": ["<unet_or_previous_lora>", 0],
261 "lora_name": "<lora_file>.safetensors",
262 "strength_model": 1.0
263 }
264}
265```
266 
267### Klein LoRAs
268 
269Klein 9B LoRAs go in the `loras/Flux.2 Klein 9B/` subfolder:
270- `klein_slider_detail.safetensors`, a detail slider LoRA
271 
272## VRAM Considerations
273 
274| Model | VRAM | Notes |
275|-------|------|-------|
276| SRPO BF16 + DualCLIP | ~24GB | Fills RTX 4090 exactly. **Must use BF16** — FP8 is broken for SRPO |
277| Klein 9B FP8 + Qwen3-8B | ~20GB | Fits comfortably on 4090 |
278| SRPO + Turbo LoRA | ~24GB | Same as SRPO base |
279 
280- Always `clear_vram` before switching to Flux from another model family
281- T5XXL is the main VRAM consumer alongside the UNET; both stay loaded during sampling
282- CLIP-L is small (235MB) and negligible
283 
284## Tips
285 
2861. KSampler CFG must always be 1.0. All guidance is through `CLIPTextEncodeFlux` or `FluxGuidance`
2872. SRPO requires BF16. The FP8 quantization is known to produce broken results with this fine-tune
2883. 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
2894. Flux generates excellent text in images. Put text to render in quotes within your prompt
2905. Klein 9B is the fastest option at 4 steps. Use it for rapid iteration, then switch to SRPO for final quality
291 
292## Sources
293 
294- **Official:** none found.
295- **Empirical:** sampler values, wiring, and prompt notes from working graphs in `packs/` and observed renders; not a vendor prompting guide.
296 
View all files on GitHub →

Details

Updated
Sep 21, 2026
License
MIT
Stars on the repo
★ 759
Checked
Source
artokun/comfyui-mcp ↗
Creator
artokun · 44 listings
View creator

Similar skills

See all →
SkillMake Japanese TV-anime style videos with codeAnime celedenfunf/reelmimic · by edenfunfMake Japanese TV-anime style videos (MP4) with code — cel-shaded characters with tapered line art, big detailed eyes, hair clumps with a specular band, comedic anime reactions (sweat drop, anger vein, sparkle eyes, ≥< eyes, dot eyes, tears), painted skies with cumulus clouds, school/street/classroom/rooftop sets with time-of-day palettes, speed/focus lines, impact frames, dramatic zooms, smears, sakura petals and anime subtitles (CJK). Canvas 2D rendered frame by frame in headless Chrome, encoded with ffmpeg. Use when a reference video or brief calls for anime / 動畫 / 日系動畫 / アニメ / cel-shaded / slice-of-life / school romance / shōnen-style reactions, or when the video-clone router picks the anime-cel style. 2D only; characters are original (Hina, Ren) or new ones built on the same rig.★ 3.6k GitHub starsSkillDirect and produce a short film made entirely in codeLemo opuscarlemomo-ai/lemo-opuscar · by lemomo-aiDirect and produce a short film made entirely in code, in one of the styles of the Lemo-Opuscar library (e.g. Impasto Oil Painting 油画厚涂, Watercolor Brush 水彩笔刷, Ukiyo-e 浮世绘, Satellite Briefing 卫星简报, Exploded Teardown 产品拆解, Microscope Story 显微叙事). Use when the user asks for a video, film, short, promo, explainer or animation (视频、短片、动画、宣传片) in a named style, including data, science and product explainers built from real material such as satellite imagery, laser scans, CAD files or archive scans (数据解说、科普、产品拆解); when they want a film made about their own topic and haven't chosen a style (help them choose); or when they ask which film styles there are. Not for editing or converting existing video files.★ 3k GitHub starsSkillGenerate Ian-style Xiaohei illustrations for articles, postsdzhng/skills · by dzhngGenerate Ian-style Xiaohei illustrations for articles, posts, blogs, Notion documents, workflows, methods, processes, structures, states, metaphors, and opinions. Use when the user asks for weird, hand-drawn, Xiaohei, article, editorial, body illustrations, illustration ideas, shot lists, title removal, image edits, or image regeneration. By default, all image text and annotations are English, even when the source article is Chinese; only use another language when the user explicitly asks.★ 1.3k GitHub starsSkillCreating game art through Scenario MCP: spritesScenario game assetsscenario-labs/skills · by scenario-labsUse when creating game art through Scenario MCP: sprites, sprite sheets, icons, props, loot, tilesets and autotile terrain transitions, seamless tiles, isometric buildings, top-down maps, pixel art, UI buttons and panels, parallax background layers or depth planes for side-scrollers, and character or concept art; or when assets need transparent backgrounds, background removal, style-consistent variation batches, upscaling, pixel-grid cleanup, or PNG export for Unity, Godot, or Unreal.★ 854 GitHub starsSkillTrain custom LoRAs with ostris AI-ToolkitAI-Toolkit LoRA Trainer (WAN 2.2 & Z-Image)artokun/comfyui-mcp · by artokunTrain custom LoRAs with ostris AI-Toolkit. Covers WAN 2.2/2.1 (people, styles, video motion) and Z-Image (Turbo & Base, low-VRAM image LoRAs). Use when the user wants to train a WAN or Z-Image LoRA; covers local + RunPod setup, dataset prep, key params, and using the result in a ComfyUI workflow.★ 759 GitHub starsSkillAnime/illustration text-to-imageANIMA 1.0 (Anima Base Ultra) Text-to-Image Workflowsartokun/comfyui-mcp · by artokunAnime/illustration text-to-image (ANIMA 1.0, ~2B Cosmos DiT). Use for anime, manga, illustrated characters; accepts Danbooru tags + natural language; runs/trains on <6GB VRAM; includes anime inpainting via Anima-LLLite ControlNet★ 759 GitHub stars

More from artokun

SkillTrain custom LoRAs with ostris AI-ToolkitAI-Toolkit LoRA Trainer (WAN 2.2 & Z-Image)artokun/comfyui-mcp · by artokunTrain custom LoRAs with ostris AI-Toolkit. Covers WAN 2.2/2.1 (people, styles, video motion) and Z-Image (Turbo & Base, low-VRAM image LoRAs). Use when the user wants to train a WAN or Z-Image LoRA; covers local + RunPod setup, dataset prep, key params, and using the result in a ComfyUI workflow.★ 759 GitHub starsSkillAnime/illustration text-to-imageANIMA 1.0 (Anima Base Ultra) Text-to-Image Workflowsartokun/comfyui-mcp · by artokunAnime/illustration text-to-image (ANIMA 1.0, ~2B Cosmos DiT). Use for anime, manga, illustrated characters; accepts Danbooru tags + natural language; runs/trains on <6GB VRAM; includes anime inpainting via Anima-LLLite ControlNet★ 759 GitHub starsSkillAuthoring & Publishing ComfyUI Custom Nodesartokun/comfyui-mcp · by artokunAuthoring & publishing ComfyUI custom nodes to the Comfy Registry, covering node structure, pyproject.toml spec, comfy-cli publishing, and CI★ 759 GitHub starsSkillTrain a custom anime LoRA on the ANIMA base modelCitron Anima LoRA Trainerartokun/comfyui-mcp · by artokunTrain a custom anime LoRA on the ANIMA base model with Citron's local Gradio trainer (kohya sd-scripts), <6GB VRAM, character/style LoRAs; covers setup, dataset prep, training params, and using the result in the anima-base workflow★ 759 GitHub starsSkillDiscover Civitai models with the BUILT-IN downloadmodelCivitai + comfyui-mcpartokun/comfyui-mcp · by artokunDiscover Civitai models with the BUILT-IN download_model action:"search_civitai" and install/generate them locally. Find a checkpoint/LoRA/embedding on Civitai, download it into ComfyUI, and use its trigger words. Optionally pair the official Civitai MCP for community features (images browsing, posting, collections).★ 759 GitHub starsSkillDiagnose and fix video/image color OBJECTIVELYColor Correction (measure, don't eyeball)artokun/comfyui-mcp · by artokunDiagnose and fix video/image color OBJECTIVELY with the get_image (action:"analyze_color") tool (scopes/stats such as black/white points, contrast, saturation, clipping, cast) instead of eyeballing a contact sheet. Covers the "washed out" signature, why reference color-match (mkl/ColorMatch/ColorMatchAdobe) CAN'T add contrast a flat source lacks, the levels/contrast-stretch fix (core AdjustContrast / CurveEditor), the measure→fix→re-measure loop, the side-by-side sandbox pattern, and where to place the fix in a render graph (after decode, before save). Use when a render looks washed out / flat / dull / over-saturated / color-cast, or when deciding between a color-match and a contrast/levels fix.★ 759 GitHub stars