lora-train

Automate SDXL or Flux LoRA training, captioning, and ComfyUI deployment via HTTP proxy.

1|Updated Mar 18, 2024
One-click install
npx skills add https://github.com/erfianugrah/dotfiles --skill lora-train-erfianugrah
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: lora-train
Source: https://github.com/erfianugrah/dotfiles/tree/main/.pi/agent/skills/lora-train
Command: npx skills add https://github.com/erfianugrah/dotfiles --skill lora-train-erfianugrah

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill removes the manual, multi-step process of launching LoRA training, monitoring progress, captioning datasets, and deploying finished LoRAs into ComfyUI.

Core Features & Use Cases

  • HTTP LoRA Training Orchestration: Starts, cancels, and monitors LoRA training jobs via a local proxy endpoint, including automatic GPU mode swapping for the trainer.
  • Model-Type Smart Defaults (SDXL/Flux): Applies sensible defaults for dim/alpha and training parameters, with Flux-specific epoch guidance for common face LoRAs.
  • Captioning + Deployment Workflow: Runs async captioning (BLIP-2 or WD14) and then deploys the resulting .safetensors to ComfyUI’s loras directory.

Quick Start

Send a POST request to http://localhost:11434/train/train with a dataset_config and your desired base_model and output_name to start an SDXL or Flux LoRA training run.

Frequently Asked Questions about lora-train

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate Stable Diffusion LoRA training and deploy to ComfyUI?▼

Automate Stable Diffusion LoRA training and ComfyUI deployment by sending POST requests to a local HTTP proxy endpoint to start, monitor, and cancel training jobs, which automatically moves finished .safetensors files into the loras directory.

Can I train a Flux LoRA using kohya sd-scripts through an HTTP API?▼

Yes, you can train a Flux LoRA using kohya sd-scripts through an HTTP API that applies Flux-specific epoch guidance for face LoRAs and automatically swaps GPU modes when the training job starts.

What is the best way to generate captions for a Stable Diffusion training dataset?▼

Generate captions for a Stable Diffusion training dataset by running asynchronous BLIP-2 or WD14 captioning through the local HTTP proxy endpoint before starting the LoRA training job.

Does this LoRA training workflow support SDXL models with smart defaults?▼

Yes, this LoRA training workflow supports SDXL models by applying sensible smart defaults for dim, alpha, and training parameters via the underlying kohya sd-scripts integration.

How do I cancel an active LoRA training job running in ComfyUI?▼

Cancel an active LoRA training job by sending a request to the cancel HTTP endpoint of the local proxy, which halts the kohya sd-scripts process and stops the ongoing training run.

Are there limitations when using a proxy-driven GPU mode swap for LoRA training?▼

The proxy-driven GPU mode swap strictly enforces behavior on job start, meaning the local HTTP proxy must maintain continuous control to ensure the GPU environment swaps correctly for kohya sd-scripts execution.