---
title: "Fine-Tune FLUX.1 for Custom Image Generation — Overview"
canonical: "https://build.nvidia.com/playbooks/flux-finetuning/overview.md"
---

# Basic idea

This playbook shows how to fine-tune the FLUX.1-dev 12B model with multi-concept Dreambooth LoRA (Low-Rank Adaptation) for custom image generation on your hardware platform. Unified memory and GPU acceleration let you keep the Diffusion Transformer, CLIP text encoder, T5 text encoder, and autoencoder resident while you train and generate.

Multi-concept Dreambooth LoRA teaches FLUX.1 new concepts, characters, and styles. Trained LoRA weights drop into existing ComfyUI workflows for prototyping and experimentation. The same path supports high-resolution training and inference at 1024px and above.

# What you'll accomplish

You'll have a fine-tuned FLUX.1 LoRA that generates images with your custom concepts and is ready for ComfyUI workflows on your **hardware platform**.

- Fine-tune FLUX.1-dev with Dreambooth LoRA
- Train on sample concepts (`tjtoy` toy and `sparkgpu` GPU) or your own dataset
- Run high-resolution (~1K) diffusion training and inference
- Integrate LoRAs into ComfyUI visual workflows
- Use Docker images for reproducible train and inference environments

# What to know before starting

**Required:**

- Basic Linux command line and Docker container usage
- Familiarity with generative image concepts (prompts, diffusion models, LoRA)
- Hugging Face account and token for gated FLUX.1-dev access

**Optional:**

- Prior ComfyUI experience (node graphs and workflow JSON)
- Experience preparing image datasets for Dreambooth-style training

# Supported hardware platforms

Use the matrix below to confirm your hardware platform, recommended default local settings, and whether multi-node applies.

| Hardware platform | OS | Memory | Recommended default local settings | Multi-node capable hardware |
| :---- | :---- | :---- | :---- | :---- |
| **DGX Spark** | DGX OS (Linux) | 128 GB Unified Memory | Docker images `flux-train` / `flux-comfyui` from playbook assets | — |

# Prerequisites

**Hardware requirements**

- Supported hardware platform — see Supported hardware platforms matrix above
- Sufficient memory for FLUX.1-dev training and 1024px inference with multiple models loaded
- Enough free disk for model downloads (plan for ~35 GB+ for checkpoints, text encoders, VAE, and workspace)
- No other heavy GPU workloads running during train or inference

**Software requirements**

- NVIDIA Docker / NVIDIA Container Toolkit: `docker --version` and `nvidia-smi` inside a GPU container
- Network access to Hugging Face for gated FLUX.1-dev and text-encoder downloads
- Hugging Face access token (`HF_TOKEN`) with access granted on the [FLUX.1-dev model card](https://huggingface.co/black-forest-labs/FLUX.1-dev)
- Web browser access to port `8188` for ComfyUI

# Ancillary files

All required assets can be found [in this playbook repository](https://github.com/NVIDIA/dgx-spark-playbooks/blob/main/nvidia/playbook-flux-finetuning/).

- `assets/download.sh` — Downloads FLUX.1-dev, VAE, CLIP, and T5 checkpoints into `models/`
- `assets/Dockerfile.train` / `assets/launch_train.sh` — Build and run Dreambooth LoRA training
- `assets/Dockerfile.inference` / `assets/launch_comfyui.sh` — Build and run ComfyUI inference
- `assets/flux_data/` — Sample multi-concept dataset and `data.toml` training config
- `assets/workflows/base_flux.json` — ComfyUI workflow for base FLUX.1 inference
- `assets/workflows/finetuned_flux.json` — ComfyUI workflow for LoRA-conditioned inference

# Time & risk

- **Estimated time:** 2 HOURS (about 30–45 MIN for setup and model download, plus about 90 MIN of training to reach usable LoRA checkpoints; the full default 100-epoch run takes about four hours)
- **Risk level:** Medium
- Docker permission issues may require a group change and new login session
- Gated model access and large downloads can fail without a valid Hugging Face token or enough disk
- Best results need hyperparameter tuning and a high-quality dataset
- **Rollback:** Stop and remove Docker containers; delete downloaded models and LoRA checkpoints under `assets/models/` if needed
- **Last Updated:** 07/31/2026
- Fine-tune FLUX.1-dev with Dreambooth LoRA and ComfyUI inference on supported hardware platforms