timmyy123/llm-hub/train-lora
Claude Code and agent skill by timmyy123/llm-hub
- community
Checking that the SKILL.md file is still in the repository.
Validate Draw Things LoRA training end to end with draw-things-cli, including tiny-dataset training, loss and scaler checks, checkpoint sanity, and base-versus-LoRA generation comparison.
Install
npx vskill@latest install timmyy123/llm-hub/train-loraSKILL.md
Train LoRA Skill
Use this workflow to validate Draw Things LoRA training end to end with draw-things-cli.
Goal
Train on a tiny local dataset, watch loss and scaler health, then verify visually with a reference/base/LoRA comparison.
Build Once
Build the optimized CLI first:
Use the built binary for every run:
Do not switch between bazel run and bazel-bin/... during one validation cycle unless you need to. Reuse the same binary so compile/runtime behavior stays comparable and permission prompts stay predictable.
Runtime Notes
- Graph compile can be quiet for a long time. With
--compilation_mode=opt, 5 to 30 minutes is possible on heavy trainers. Do not assume a hang too early. - Training checkpoints are written into the models directory.
- If the environment requires command approvals, ask once for a stable command shape and stable output/log names, then rename artifacts afterward.
- For local unregistered LoRAs, prefer passing explicit
loras[].versionduring generation instead of depending oncustom_lora.json.
Dataset Setup
For a single-image reconstruction check:
- Create a local dataset directory.
- Put the image in that directory.
- Add a matching
.txtcaption file beside it. - Keep the caption minimal for trigger-only tests, for example:
Validation Ladder
Use this order:
- Run a 1-step smoke test to confirm the graph compiles, the loss is finite, and a checkpoint is written.
- Run a 20-step probe to confirm
scalestays healthy and loss is not obviously blowing up. - Run a 100-step check to see whether like-for-like timestep bands decline.
- Run a 500-step run before declaring the trainer healthy.
- If you are validating a new attention backend, run the 500-step check on that intended backend, not only on a fallback path.
- Generate a base image and a LoRA image with the same prompt, seed, and settings.
- Compose reference/base/LoRA into one image for visual review.
Baseline Train Command
Use this as the generic 512x512 single-image baseline:
Model Baselines
Scaler Rules
- Healthy scale is architecture-dependent; choose it from the model's numeric contract.
- Do not set
scalelower than1to make a run stable. That hides overflow and can prevent useful learning. - If the model does not apply internal scaling that shrinks gradients, start from
32768.0. - If the model has explicit internal downscaling or projection compensation, use the validated lower scale for that model family and record why.
FLUX.1
- Base model:
flux_1_dev_q8p.ckpt - Validated guidance settings:
guidanceScale = 3.5guidanceEmbed = 3.5shift = 2resolutionDependentShift = false- Healthy
scaleis typically32768.0
Z Image Turbo
- Base model:
z_image_turbo_1.0_i8x.ckpt - The validated training baseline is the generic command above.
- The validated trainer scale is
1024.0 - For generation validation, use
cfg = 1
Z Image Base
- Base model:
z_image_1.0_q8p.ckpt - The validated training baseline is the generic command above.
- The validated trainer scale is
1024.0 - For generation validation, keep the model’s recommended Base path:
- A validated comparison used
cfg = 4
Qwen Image BF16
- Base model:
qwen_image_2512_bf16_i8x.ckpt - The validated training baseline is the generic command above.
- Healthy
scaleis32768.0 - Use the exact training caption first before trying richer prompts
What To Watch During Training
- Raw loss is noisy because each step samples a different timestep. Do not expect monotonic decline step by step.
- Compare like-for-like timestep bands instead.
- Mid/high timestep bands should usually improve first.
- Low timestep spikes can happen, but they should stay bounded.
- For flow-style objectives, low timestep loss is not always the easiest band. If the target includes a full noise or velocity term that is weakly visible in the low-timestep input, low timestep bins can be intrinsically harder.
- If
scalesteadily collapses, something is seriously wrong. - If
scalecollapses only on a new backend, compare against the known-stable backend before changing learning rate or dataset settings. - If
scalecollapses on a model with rotary applied throughcmul, check whether trainer rotary constants are expanded to the real query/key head count. - Before blaming the optimizer, confirm the checkpoint is real:
- nontrivial file size
lora_uptensors are not all zero
Generation Validation
Always compare base and LoRA with the exact same:
- prompt
- seed
- width
- height
- steps
- CFG
- model-specific sampler/shift settings
Use the exact training caption first. If that fails, richer prompts are not useful for debugging.
For non-distilled base models, do not under-sample the generation validation. Use the model's real baseline settings, including enough steps, the correct CFG behavior, and the correct sampler family.
For local LoRAs, pass explicit version metadata:
If the model also needs LoRA mode metadata, pass mode too.
Example Generate Commands
Z Image Turbo
Z Image Base
Compose A Review Image
Use ffmpeg to compose reference, base, and LoRA side by side:
Expected Outcomes
- Base should usually look generic or unrelated to the exact training identity.
- A healthy LoRA should pull noticeably toward the training subject by 100 to 500 steps.
- For single-image dog tests, the correct check is not “perfect reconstruction”; it is whether the LoRA image is materially closer to the reference than the base image.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingios/LLMHub/LocalPackages/draw-things-community/.agents/skills/train-lora/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/timmyy123/llm-hub/train-lora)