Instructions to use AcademiaSD/FLUX.3-Image-Klein-NF4-for-LoRA-Training with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use AcademiaSD/FLUX.3-Image-Klein-NF4-for-LoRA-Training with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("AcademiaSD/FLUX.3-Image-Klein-NF4-for-LoRA-Training", dtype=torch.bfloat16, device_map="cuda") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Notebooks
- Google Colab
- Kaggle
FLUX.3 Image Klein NF4 for LoRA Training
Not an official Black Forest Labs release, and not endorsed or validated by Black Forest Labs. This is an NF4 conversion of FLUX.3 Image Klein Base made only so that the FLUX.3 Klein trainer of AcademiaSD LoRAlab Trainer Studio can download it and train LoRAs on consumer GPUs. It is not a general-purpose checkpoint: the transformer is stored in the trainer's own pre-quantized cache format, which diffusers and ComfyUI do not load directly.
All rights to the FLUX Model belong to Black Forest Labs Inc. AcademiaSD claims no ownership of the model or its weights; this repository only changes how the transformer weights are stored. Any use is governed solely by the FLUX Kommunity License (non-commercial use unless you are a Qualifying User under that license): your rights come directly from Black Forest Labs under that license, and nothing in this card adds to them or limits them.
You do not need to download this repository by hand: the trainer downloads it on first use.
Contents
| Folder | Content | Size |
|---|---|---|
transformer/ |
5.5B transformer: the 258 attention and MLP layers of the mode and single blocks in NF4 (bitsandbytes, pre-quantized), embedders, modulations, norms and output layer in BF16 | 3.1 GB |
text_encoder/ |
Qwen3-VL-4B-Instruct text encoder, unchanged (BF16) | 8.3 GB |
vae/ |
FLUX.2 autoencoder, unchanged | 0.3 GB |
LICENSE.md, NOTICE.md |
FLUX Kommunity License and the Attribution Notice | |
| Total | 11.7 GB (original: 20 GB without the FP8 / NVFP4 variants) |
Format
transformer/is not a standard diffusers checkpoint. It is a pre-quantized cache: one.safetensorsfile per layer inweights/(NF4 weight plus its packed bitsandbytesQuantState),others.safetensorswith the tensors kept in BF16, andindex.json. The trainer builds an emptyFlux3Transformer2DModelfromconfig.jsonand fills it from this cache.text_encoder/andvae/are the original files, in diffusers / transformers format.- The converter that produced it is
tools/flux3klein/5_conversor_Flux3Klein_NF4.pyin the Trainer Studio repository.
NF4 is meant for training (it lets the trainer run from about 8 GB of VRAM). For inference, use Black Forest Labs' original weights, for example flux-3-image-klein-comfy in ComfyUI.
LoRAs trained with it
The trainer exports LoRAs with Black Forest Labs' original layer names (diffusion_model.<layer>.lora_A / lora_B plus alpha), which ComfyUI loads on the official FLUX.3 Image Klein models. LoRAs are Derivatives of the FLUX Model and are subject to the same FLUX Kommunity License.
Measured on an RTX 5080, rank 16: 512²: ~0.7 s per step, ~4.2 GB of VRAM · 1024²: ~3.9 s per step, ~5.7 GB.
License and attribution
The FLUX Model, including this modified version, is licensed by Black Forest Labs Inc. under the FLUX Kommunity License (LICENSE.md). The text encoder in text_encoder/ is Qwen3-VL-4B-Instruct by the Qwen team, under the Apache License 2.0 (text_encoder/LICENSE).
Attribution Notice (also in NOTICE.md):
This FLUX Model is licensed by Black Forest Labs Inc. under the FLUX Kommunity License. Copyright Black Forest Labs Inc. IN NO EVENT SHALL BLACK FOREST LABS INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH USE OF THIS MODEL.
This repository contains a modified version of FLUX.3 Image Klein Base: AcademiaSD converted the transformer weights to 4-bit NF4 (bitsandbytes) and stored them in a per-layer cache format for LoRA training. The text encoder and the autoencoder are unchanged.
This repository is provided "as is", without warranties of any kind. AcademiaSD is not liable for any claim, damages or other liability arising from its use. FLUX and Black Forest Labs are trademarks of Black Forest Labs Inc. and are used here only to describe the model and its creators.
Links
- Trainer: AcademiaSD LoRAlab Trainer Studio
- Original model: black-forest-labs/flux-3-image-klein-base
- ▶ YouTube: youtube.com/@Academia_SD
- 💬 Discord: discord.gg/Syuaduy678
- ☕ Ko-Fi: ko-fi.com/academiasd
- Downloads last month
- 20
Model tree for AcademiaSD/FLUX.3-Image-Klein-NF4-for-LoRA-Training
Base model
black-forest-labs/flux-3-image-klein-base