# ===================================================================== # requirements.txt — FLUX.1-dev 3-stage LoRA pipeline # (1_build_dataset.py · 2_train_lora.py · 3_generate.py) # ===================================================================== # # INSTALL ORDER MATTERS for PyTorch + CUDA. Do this first, separately, # matching your CUDA version (example shows CUDA 12.4): # # pip install torch torchvision --index-url https://download.pytorch.org/whl/cu124 # # Then install the rest: # # pip install -r requirements.txt # # FLUX.1-dev is gated — accept the license on its Hugging Face page, then: # # huggingface-cli login # # --------------------------------------------------------------------- # --- core diffusion / model stack --- diffusers>=0.32.0 # FluxPipeline, LoRA save/load, flow-matching helpers transformers>=4.44.0 # BLIP captioner + FLUX's CLIP/T5 text encoders peft>=0.13.0 # LoRA adapters (add_adapter, get_peft_model_state_dict) accelerate>=0.34.0 # device placement / training utilities safetensors>=0.4.3 # .safetensors LoRA serialization sentencepiece>=0.2.0 # required by the T5 tokenizer FLUX uses protobuf>=4.25.0 # required by some HF tokenizers/configs # --- memory savings (quantization / 8-bit optimizers) for 16–24GB GPUs --- bitsandbytes>=0.43.0 # float8 / 8-bit; CUDA only (skip on macOS/CPU) # --- data handling & images --- pandas>=2.0.0 # read/write dataset.csv (Stage 1 & 2) numpy>=1.24.0 # image <-> latent array conversion (Stage 2) Pillow>=10.0.0 # open/resize images tqdm>=4.66.0 # progress bars # --- hub access for gated FLUX.1-dev + BLIP download --- huggingface_hub>=0.24.0 # NOTE: torch / torchvision are intentionally NOT pinned here — install them # from the PyTorch CUDA index first (see header). Pinning them in this file # would pull the CPU-only build and break GPU training.