> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/automodel/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/automodel/_mcp/server.

# FLUX.2-dev

> Fine-tune FLUX.2-dev for text-to-image generation with NeMo AutoModel using checked-in full-parameter and LoRA flow-matching recipes.

[FLUX.2-dev](https://huggingface.co/black-forest-labs/FLUX.2-dev) is Black Forest Labs' 32B rectified flow transformer for text-to-image generation and single- or multi-reference image editing.

NeMo AutoModel includes full-parameter and Low-Rank Adaptation (LoRA) text-to-image fine-tuning recipes for this checkpoint.

## Fine-Tune FLUX.2-dev

From the repository root, run:

```bash
uv run torchrun --nproc-per-node=8 examples/diffusion/finetune/finetune.py \
  -c examples/diffusion/finetune/flux2_t2i_flow.yaml
```

## Model Reference

### Model Architecture

| Property                        | Value                                                               |
| ------------------------------- | ------------------------------------------------------------------- |
| Upstream Tasks                  | Text-to-image generation; single- and multi-reference image editing |
| Model Type                      | Rectified flow transformer                                          |
| Parameters                      | 32B                                                                 |
| Reference Architecture          | `Flux2`                                                             |
| Transformer Blocks              | 8 double-stream / 48 single-stream                                  |
| Hidden Size                     | 6,144                                                               |
| Attention                       | 48 heads                                                            |
| Feed-Forward Ratio              | 3.0                                                                 |
| Text Encoder                    | `Mistral-Small-3.2-24B-Instruct-2506`                               |
| Text Feature Width              | 15,360                                                              |
| Latent Channels                 | 128 input / 128 output                                              |
| Position Axes                   | 4 axes with 32 dimensions each                                      |
| Rotary Position Embedding Theta | 2,000                                                               |
| Guidance                        | Guidance-distilled with guidance embedding enabled                  |
| Weight Dtype                    | `BF16`                                                              |

## Example Model and Recipes

| Model                                                                                 | Recipe                                                                                                                 |
| ------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| [`black-forest-labs/FLUX.2-dev`](https://huggingface.co/black-forest-labs/FLUX.2-dev) | [Full fine-tuning](https://github.com/NVIDIA-NeMo/Automodel/blob/main/examples/diffusion/finetune/flux2_t2i_flow.yaml) |
| [`black-forest-labs/FLUX.2-dev`](https://huggingface.co/black-forest-labs/FLUX.2-dev) | [LoRA](https://github.com/NVIDIA-NeMo/Automodel/blob/main/examples/diffusion/finetune/flux2_t2i_flow_lora.yaml)        |

See the [Diffusion Fine-Tuning Guide](/recipes-e2e-examples/diffusion-fine-tuning).