Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Hugging Face 17 min read How-to hardMaster

The Definitive Fine-Tuning Guide for 3D Generation Models

TRELLIS.2, an image-to-3D model built on sparse O-Voxel structured latents, can be specialized with LoRA adapters on just the stages that control shape: the dense sparse-structure flow DiT (rank 8, attention and MLP) and the sparse shape flow DiT (rank 16, attention), about 9.3M trainable parameters in total. The texture flow DiT stays frozen because the dataset's diffuse maps bake in lighting and would teach wrong material targets and risk catastrophic forgetting. Using 188 footwear objects from Google Scanned Objects to fix inaccurate shoe soles, the guide supplies preprocessing (Blender renders 16 views per object, about 1 hour on an A100) and training Docker containers that run on Hugging Face Jobs or locally, with resumable checkpoints and Trackio monitoring.

Assumes: diffusion transformersLoRA fine-tuningvariational autoencoders3D mesh representations

Related posts

  • Using LoRA for Efficient Stable Diffusion Fine-Tuning

    Hugging Face mediumAdept

    LoRA freezes pretrained weights and trains small rank-decomposition matrices, and diffusers now supports applying it to Stable Diffusion's cross-attention layers for both full fine-tuning and Dreambooth. Training fits in 11 GB of VRAM (a 2080 Ti) without 8-bit optimizers, uses a much higher learning rate (1e-4 vs ~1e-6), and produces ~3 MB weight files, roughly 1000x smaller than the UNet. A walkthrough covers the training script on a Pokémon dataset, looking up the base model from Hub metadata, and loading LoRA weights at inference with load_attn_procs. LoRA is also compared with Textual Inversion and Pivotal Tuning.

  • Preference Optimization for Vision Language Models

    Hugging Face hardMaster

    TRL now supports direct preference optimization (DPO) for vision language models, trained on chosen/rejected answer pairs rather than fixed labels. A walkthrough fine-tunes Idefics2-8b on the RLAIF-V dataset, formatting image-plus-question prompts with the processor's chat template. Full float32 DPO training would need about 160 GB (policy, reference model, gradients, AdamW states), but bfloat16 plus LoRA cuts trainable parameters to 55M and memory to roughly 32 GB. Batch size 2 with 32 gradient accumulation steps and gradient checkpointing fits activations, and training is judged by rising accuracy and reward margin.

  • SDXL in 4 steps with Latent Consistency LoRAs

    Hugging Face mediumAdept

    LCM LoRAs apply latent consistency distillation as small LoRA adapters instead of distilling each full model, so any fine-tuned SDXL or Stable Diffusion 1.5 model can generate images in 4–8 steps instead of 25–50. Using diffusers, you load the LCM LoRA, swap in the LCMScheduler and run with guidance_scale around 1. Values between 1 and 2 enable negative prompts, and larger values don't work. Benchmarks at batch size 1 show SDXL dropping from 7s to 1.4s on a 3090, 64s to 6.5s on an M1 Max and 3.4s to 0.7s on a 4090. The LoRAs can also be stacked with regular style LoRAs, and training scripts are released alongside them.

  • LoRA Explained: Faster, More Efficient Fine-Tuning with Docker

    Docker mediumAdept

    Gemma 3 270M can be specialized into a compact PII-masking assistant using LoRA, which freezes the base weights and trains only small low-rank adapters, cutting compute and memory needs while avoiding catastrophic forgetting. The walkthrough covers formatting supervised examples with the model's chat template so training data matches inference input, configuring PEFT adapters (r=16, alpha=32 on q_proj/v_proj), training with TRL's SFTConfig via Unsloth, and merging adapters into a standalone 16-bit checkpoint. The merged model can then be packaged and shared through Docker Model Runner and Docker Hub.

  • Open-sourcing Knowledge Distillation Code and Weights of SD-Small and SD-Tiny

    Hugging Face mediumAdept

    Segmind releases training code and weights for SD-Small and SD-Tiny, Stable Diffusion variants compressed by block-removal knowledge distillation that cut UNet parameters by 35% and 55% while keeping image fidelity close to the base model. The student is trained with three losses: the standard latent diffusion loss, an output-matching loss against the teacher (Realistic-Vision 4.0), and a per-block feature-level loss. Training used 1M LAION Art Aesthetic images scoring above 7.5. The distilled models run up to 2x faster at inference but are early-stage and weak at composition, so they work best fine-tuned or LoRA-trained on specific styles. A portrait fine-tune of SD-Tiny is included with its hyperparameters.

The quest for software engineering knowledge.

Look:
Layout: