Manuscript Offprint

arXiv:2610.18870

Dog-Breed Text-to-image Flow Matching from Pretraining to Fine-Tuning on 4 Consumer GPUs

Reyhaneh Esmailizadeh, Xingjian Leng, Zhanhao Liang, Liang Zheng

Abstract

We generally perceive that training text-to-image diffusion models requires heavy compute: it is true if we aim at a comprehensive frontier model. This understanding prevents people from training their own models when getting started in the field. We develop MiniDog, a framework that enables pretraining diffusion transformers in 55 minutes and fine-tuning in another 15 minutes on four 3090 GPUs. For data, we use 26k dog images from ImageNet and caption them for pretraining and use 2k images generated by FLUX.1-schnell for fine-tuning. We precompute the image and text features and cache them for efficiency. For architecture, we use E2E-INVAE for its semantic latent space, a small transformer with 22M parameters, a small Qwen model for text encoding, and in-context conditioning. For training, we use iREPA and an EUPE perception encoder for acceleration. For evaluation, our repository supports FID, HPSv2 score, PickScore, and various VAE reconstruction metrics. The project is open-sourced at GitHub. We do not claim technical novelty.

Figure

Figure 1: Samples from the SFT model. Prompts of the highlighted samples: ■ “Golden Retriever with a dark golden, freshly brushed…” ■ “Corgi with a clean fawn-and-white coat stands alert…” ■ “Samoyed with a fluffy biscuit double coat sleeps curled…”

1 Introduction

Training diffusion models is computationally heavy, especially for frontier models. In the community, beginners often struggle to find the opportunity to do the whole pipeline. This paper presents MiniDog, a simple yet useful codebase, where pretraining and fine-tuning of text-to-image (T2I) models can be performed in about an hour and 15 minutes, respectively, on four 3090 GPUs.

Concept. This material presents data, architecture, training methods, and evaluation metrics for T2I model training. Flow-matching beginners can train their own T2I models efficiently.

Leveling and prerequisite knowledge. The material targets advanced undergraduate and graduate courses and assumes linear algebra, calculus, probability, and deep learning.

Learning objectives and outcomes. On completing the material, beginners can:

• build and pretrain a text-to-image flow-matching pipeline on consumer GPUs (Section 3);

• explain how the tokenizer, caption length, and representation alignment change FID; and

• fine-tune the model and evaluate it with human-preference models.

References (29)