unsloth/studio/backend/core/training
Daniel Han b28793418d Speed up + shrink SDXL LoRA training (precompute text embeds, 8-bit AdamW)
SDXL re-encoded every caption with both CLIP text encoders on every step (pure
waste, since captions are constant) and kept the encoders resident. Precompute
each unique caption's embeddings once, then free the text encoders before the
loop: numerically identical (embeddings are deterministic and this consumes no
torch RNG, so the noise/timestep stream is unchanged) but faster and ~1.5 GB
lighter. Default the optimizer to 8-bit AdamW (bitsandbytes) with an fp32
fallback, halving optimizer state with no meaningful LoRA quality cost. Env
toggles (UNSLOTH_DIFFUSION_NO_PRECOMPUTE / _FP32_OPTIM) let the accuracy guard
A/B the paths.
2026-07-02 15:25:55 +00:00
..
__init__.py Reduce and tighten code comments and docstrings repo-wide (#6095) 2026-06-08 23:09:51 -07:00
diffusion_dit_trainer.py Add flow-matching DiT LoRA trainers (FLUX.1-dev, Qwen-Image, Z-Image) 2026-07-02 15:25:43 +00:00
diffusion_lora_trainer.py Speed up + shrink SDXL LoRA training (precompute text embeds, 8-bit AdamW) 2026-07-02 15:25:55 +00:00
diffusion_train_common.py Add flow-matching DiT LoRA trainers (FLUX.1-dev, Qwen-Image, Z-Image) 2026-07-02 15:25:43 +00:00
diffusion_training_service.py Retain diffusion training loss history and expose it in status 2026-07-02 14:55:17 +00:00
resume.py feat(studio): implement S3 dataset loading (completes #5951) (#6222) 2026-06-12 14:52:04 +02:00
s3_dataset.py feat(studio): implement S3 dataset loading (completes #5951) (#6222) 2026-06-12 14:52:04 +02:00
trainer.py Fix Windows Studio UTF-8 startup handling (#6614) 2026-07-01 13:47:33 +01:00
training.py (feat) Add project names to studio training runs (#6512) 2026-06-29 16:06:36 +02:00
worker.py (feat) Add project names to studio training runs (#6512) 2026-06-29 16:06:36 +02:00