Instructions to use AiArtLab/qwen3-0.6b-4b-adapter with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use AiArtLab/qwen3-0.6b-4b-adapter with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("AiArtLab/qwen3-0.6b-4b-adapter", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
comfyui/README: add a from-scratch quickstart
Browse filesComfyUI install, node clone, the three model files with direct URLs and sizes,
how to start it and where to open the workflow. Measured: ~2 s per image and
~12.6 GiB peak VRAM at 768x1280 on an RTX 5090.
- comfyui/README.md +45 -11
comfyui/README.md
CHANGED
|
@@ -7,33 +7,67 @@ This folder contains a ComfyUI workflow that drives **FLUX.2-klein-4B** with the
|
|
| 7 |
- Custom node (the two `KleinAdapter` nodes):
|
| 8 |
[github.com/recoilme/klein-qwen3-adapter-comfyui](https://github.com/recoilme/klein-qwen3-adapter-comfyui)
|
| 9 |
|
| 10 |
-
##
|
|
|
|
|
|
|
|
|
|
| 11 |
|
| 12 |
```bash
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
git clone https://github.com/recoilme/klein-qwen3-adapter-comfyui
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
```
|
| 17 |
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
```
|
| 21 |
ComfyUI/models/
|
| 22 |
βββ diffusion_models/
|
| 23 |
-
β βββ flux-2-klein-4b.safetensors # distilled klein DiT (stock)
|
| 24 |
βββ vae/
|
| 25 |
-
β βββ flux2-vae.safetensors # stock Flux2 VAE (untouched)
|
| 26 |
βββ klein_adapter/ # created automatically by the node
|
| 27 |
-
βββ adapter_v14_bal.safetensors # this adapter
|
| 28 |
```
|
| 29 |
|
| 30 |
-
- `flux-2-klein-4b.safetensors`: the klein DiT in ComfyUI format
|
| 31 |
-
[Comfy-Org/flux2-klein](https://huggingface.co/Comfy-Org/flux2-klein)
|
| 32 |
-
|
|
|
|
|
|
|
|
|
|
| 33 |
- `adapter_v14_bal.safetensors`: from this repo (see above).
|
| 34 |
- Qwen3-0.6B is downloaded automatically from HF on first use.
|
| 35 |
|
| 36 |
-
##
|
| 37 |
|
| 38 |
1. Load `flux2_klein_qwen3_06b_adapter.json` in ComfyUI.
|
| 39 |
2. Set your prompt in the **Positive prompt** node.
|
|
|
|
| 7 |
- Custom node (the two `KleinAdapter` nodes):
|
| 8 |
[github.com/recoilme/klein-qwen3-adapter-comfyui](https://github.com/recoilme/klein-qwen3-adapter-comfyui)
|
| 9 |
|
| 10 |
+
## Quickstart (from scratch)
|
| 11 |
+
|
| 12 |
+
From an empty machine to a first image β verified end to end on ComfyUI 0.36
|
| 13 |
+
(~8.4 GiB of downloads, ~1.4 GiB more on the first run):
|
| 14 |
|
| 15 |
```bash
|
| 16 |
+
# 1. ComfyUI itself β skip if you already have one
|
| 17 |
+
git clone https://github.com/comfyanonymous/ComfyUI
|
| 18 |
+
cd ComfyUI
|
| 19 |
+
python -m venv .venv && . .venv/bin/activate # Python 3.10+
|
| 20 |
+
pip install -r requirements.txt
|
| 21 |
+
|
| 22 |
+
# 2. the custom node that provides the two KleinAdapter nodes
|
| 23 |
+
cd custom_nodes
|
| 24 |
git clone https://github.com/recoilme/klein-qwen3-adapter-comfyui
|
| 25 |
+
cd ..
|
| 26 |
+
|
| 27 |
+
# 3. models (paths are relative to ComfyUI/)
|
| 28 |
+
mkdir -p models/klein_adapter
|
| 29 |
+
curl -L -o models/diffusion_models/flux-2-klein-4b.safetensors \
|
| 30 |
+
https://huggingface.co/Comfy-Org/flux2-klein/resolve/main/split_files/diffusion_models/flux-2-klein-4b.safetensors
|
| 31 |
+
curl -L -o models/vae/flux2-vae.safetensors \
|
| 32 |
+
https://huggingface.co/Comfy-Org/flux2-dev/resolve/main/split_files/vae/flux2-vae.safetensors
|
| 33 |
+
curl -L -o models/klein_adapter/adapter_v14_bal.safetensors \
|
| 34 |
+
https://huggingface.co/AiArtLab/qwen3-0.6b-4b-adapter/resolve/main/adapter_v14_bal.safetensors
|
| 35 |
+
# Qwen3-0.6B (1.4 GiB) needs no manual step: it is pulled from the Hub on the first
|
| 36 |
+
# run. Offline machine: fetch it beforehand with `hf download Qwen/Qwen3-0.6B`.
|
| 37 |
+
|
| 38 |
+
# 4. start ComfyUI
|
| 39 |
+
python main.py # then open the URL it prints (:8188)
|
| 40 |
+
|
| 41 |
+
# 5. in the UI: Workflow -> Open ->
|
| 42 |
+
# custom_nodes/klein-qwen3-adapter-comfyui/workflows/flux2_klein_qwen3_06b_adapter.json
|
| 43 |
+
# (or drag this folder's JSON onto the canvas), type a prompt, press Run.
|
| 44 |
```
|
| 45 |
|
| 46 |
+
768Γ1280 with the distilled model takes ~2 s per image on an RTX 5090 and peaks
|
| 47 |
+
at ~12.6 GiB of VRAM (mostly the klein DiT itself).
|
| 48 |
+
|
| 49 |
+
## Models
|
| 50 |
|
| 51 |
```
|
| 52 |
ComfyUI/models/
|
| 53 |
βββ diffusion_models/
|
| 54 |
+
β βββ flux-2-klein-4b.safetensors # distilled klein DiT (stock), 7.2 GiB
|
| 55 |
βββ vae/
|
| 56 |
+
β βββ flux2-vae.safetensors # stock Flux2 VAE (untouched), 321 MiB
|
| 57 |
βββ klein_adapter/ # created automatically by the node
|
| 58 |
+
βββ adapter_v14_bal.safetensors # this adapter, 840 MiB
|
| 59 |
```
|
| 60 |
|
| 61 |
+
- `flux-2-klein-4b.safetensors`: the klein DiT in ComfyUI format, from
|
| 62 |
+
[Comfy-Org/flux2-klein](https://huggingface.co/Comfy-Org/flux2-klein)
|
| 63 |
+
(`split_files/diffusion_models/`). The base model `flux-2-klein-base-4b.safetensors`
|
| 64 |
+
works too (see the settings below).
|
| 65 |
+
- `flux2-vae.safetensors`: from [Comfy-Org/flux2-dev](https://huggingface.co/Comfy-Org/flux2-dev)
|
| 66 |
+
(`split_files/vae/`).
|
| 67 |
- `adapter_v14_bal.safetensors`: from this repo (see above).
|
| 68 |
- Qwen3-0.6B is downloaded automatically from HF on first use.
|
| 69 |
|
| 70 |
+
## Run
|
| 71 |
|
| 72 |
1. Load `flux2_klein_qwen3_06b_adapter.json` in ComfyUI.
|
| 73 |
2. Set your prompt in the **Positive prompt** node.
|