dskjal
広告
広告

ComfyUI で FLUX.2 klein 9B を使う

カテゴリ:deeplearning

Klein はテキストエンコーダーに Qwen 3 8B を使う。dev は Mistral-Small-3.2-24B-Instruct-2506。

目次

必要スペック

最新の ComfyUI は VRAM の量は重要ではなくなっている。なぜなら RAM にモデルをロードして、必要な分を VRAM に転送して処理するようなアルゴリズムになったからだ。画像生成 AI は演算ボトルネックなので、RAM からモデルを転送しつつ推論しても生成速度はほとんど低下しない。

8bit 量子化なら、テキストエンコーダー 8.7 GB、モデル 10 GB なので RAM 32 GB で実行可能。

FLUX.2 dev はテキストエンコーダー 24B、モデル 32B と巨大で、RAM の要求量も大きかった。

モデル

FLUX.2 は精度が高い順に max, pro, flex, dev, klein。

flux-2-klein-9b は4ステップ蒸留モデル。ベースモデルは base がつく(FLUX.2-klein-base-9B)

配置場所URL
models/unetunsloth/flux-2-klein-9b-Q8_0.gguf
models/text_encodersComfy-Org/qwen_3_8b_fp8mixed.safetensors
models/vaediffusion_pytorch_model.safetensors(公式 VAE)
紛らわしいので flux2_vae とかにリネームした方がいい

ワークフロー

FLUX.2 [klein] 4B & 9B - Fast local image editing and generation からダウンロードできる。

画像を複数枚入力するときは、ReferenceLatent を追加する。klein は最大で4枚の画像入力に対応している

実行速度

環境

入力画像なし

出力解像度推論速度
(s/it)
1,024 x 1,0245.9
1,024 x 1,5368.3

入力画像あり

入力解像度出力解像度推論速度
(s/it)
846 x 1,240846 x 1,24010.8
846 x 1,240768 x 1,53611.6
846 x 1,2401,536 x 1,02413.3

プロンプト

プロンプトから入力画像を参照するには @image1 や @image2 のように指示する。

作例

日本語レンダリング能力は低いが、それ以外はほぼ完璧

日本語レンダリング能力は低いが、それ以外はほぼ完璧

# person
There are three girls in a room.
- left: short red hair and blue eyes. She is sitting on a stool holding a card with the word "左" written on it.
- middle: long silver hair and red eyes. She is standing and holding a card with the word "中" written on it in both hands.
- right: medium brown hair and green eyes. She is sitting on a stool and holding a card with the word "右" written on it.

# background
potted plants and a kitchen.

# style
Anime style.

入力画像

入力画像

結果

結果

Remove the hair red and black ornament on her upper head.
Remove the waist red and black ornament on her left and right waist.
Do not change any irrelevant parts.

入力画像

入力画像

顔や色が変わるのが欠点

顔や色が変わるのが欠点

Create her reference sheet on a pure white background. Draw following four different angles:
- front view on the far left
- left view that facing to the left with her entire body on the middle left
- right view that facing to the right with her entire body on the middle right 
- back view on the far right

dskjal/comfyui-text-renderer でテキストを画像としてレンダリングし、入力している。

The illustration of a chibi girl sitting in a chair eating a piece of pizza. 

There is a table and a window in the indoor room.

# speech bubbles

There is two speech bubbles in vertical writing.

- "日本語の
フキダシを
ちゃんと縦に
書けるかな?"
- "うまく描けない
部分はフキダシで
隠しちゃおう!!"

Qwen Image Edit 2509 Lightning LoRA 4step

Qwen Image Edit 2509 Lightning LoRA 4step

FLUX.2 klein

FLUX.2 klein

入力画像は虎ノ門三丁目方面改札を示す矢印(虎ノ門ヒルズ駅)の無料の写真素材 (c) unific

A young woman is standing on a subway platform in the @image1.

She is short black hair, wearing a light gray cap, a light colored cropped top and short black pants.

She is holding an iPhone in her left hand.

# background

There are signs, Braille blocks and blurred figures, with a sense of urban transit in the subway station. There is a sign written "出口" on it.

# style

japanese manga, line art, pen art, black and white, halftone

広告
広告

カテゴリ