#115115th of 135 in Image and videoFor image, video and design, image and design
flux2
Reference inference code for FLUX.2 image generation and editing models
Run it:Vast.ai ↗ (opens in a new tab)Clore.ai ↗ (opens in a new tab)Affiliate links, no effect on a rank.
- Stars
- 2.9k
- License
- Apache-2.0
- Last commit
- Mar 2026
- Language
- Python
2,158 on 26 Apr 20262,898 on 22 Nov 2026
From GitHub's daily star counts.
Checked on GitHub.
Overview
Minimal Python inference code and an interactive CLI for Black Forest Labs' FLUX.2 open-weight models: text-to-image, single-reference and multi-reference editing. It covers the 32B FLUX.2 [dev] and the smaller [klein] 4B and 9B family, including distilled 4-step and 50-step base variants. Weights are fetched automatically or loaded from local paths set by environment variables.
Who it is for: Engineers running or fine-tuning FLUX.2 image models on their own GPUs
Strengths
- Text-to-image, single-reference and multi-reference editing in one model family
- Klein 4B is Apache-2.0 and fits in about 8GB VRAM
- Base variants provided for LoRA training and fine-tuning
- Optional prompt upsampling via local Mistral-Small-3.2-24B or OpenRouter
Weaknesses
- FLUX.2 [dev] and klein 9B models use a non-commercial license
- FLUX.2 [dev] full script needs H100-class VRAM; quantized setup is in a separate guide
- Only a CLI is provided; no web UI or server API
- Tested only on GB200 with CUDA 12.9 and Python 3.12
What it needs
- GPU required
- Needs PyTorch (CUDA 12.9), Hugging Face model weights, OpenRouter (optional, prompt upsampling)
- Models: FLUX.2 [dev] 32B, FLUX.2 [klein] 4B, FLUX.2 [klein] 9B, FLUX.2 [klein] 9B KV, FLUX.2 [klein] 4B Base
Also in Image and video
See all 135| Rank | Project | Score |
|---|---|---|
| #113 | waifu2x-ncnn-vulkanCommand-line waifu2x image upscaler and denoiser using ncnn and Vulkan | 26 out of 100 |
| #114 | comfyui-to-python-extensionExports ComfyUI node workflows as standalone runnable Python scripts | 26 out of 100 |
| #116 | splatvizDesktop viewer and live editor for 3D Gaussian Splatting scenes | 25 out of 100 |
| #117 | cogvideoOpen-weight text-to-video and image-to-video diffusion models with inference and LoRA code | 24 out of 100 |
| #118 | gen3cCamera-controlled video generation from images or video using a 3D point-cloud cache | 24 out of 100 |