Skip to content

Fix: LoRA checkpoint path consistency when --output is an absolute path#89

Open
voltomoore wants to merge 1 commit into
drawthingsai:mainfrom
voltomoore:fix/lora-checkpoint-path-consistency
Open

Fix: LoRA checkpoint path consistency when --output is an absolute path#89
voltomoore wants to merge 1 commit into
drawthingsai:mainfrom
voltomoore:fix/lora-checkpoint-path-consistency

Conversation

@voltomoore

Copy link
Copy Markdown

Problem

When draw-things-cli train lora is called with --output set to an absolute path (e.g. --output /tmp/my-lora), several things go wrong:

  1. The checkpoint file name includes the full path prefix (e.g. /tmp/my-lora_500_lora_f32.ckpt), which gets routed through LoRAZoo.filePathForModelDownloaded() — producing a mangled save path or silent failure.
  2. The custom_lora.json registry stores the full absolute path as the file reference, rather than just the filename. This means the Draw Things app cannot resolve the LoRA when looking it up through the model zoo.
  3. The success message prints the raw filename, not the actual path the checkpoint was saved to, misleading users about where to find their LoRA.

Changes

  1. resolvedOutputPrefix — Extracted via URL(fileURLWithPath: output).lastPathComponent, so /tmp/my-lora becomes my-lora. Used consistently for all checkpoint naming.

  2. Checkpoint save — Uses resolvedOutputPrefix so the save always goes to a clean basename like my-lora_500_lora_f32.ckpt inside the model zoo directory.

  3. Print messages — Now show the actual resolved outputPath from LoRAZoo.filePathForModelDownloaded(), so users see the real filesystem path.

  4. Final summary — Updated to use the resolved path consistently.

Related

Closes #88.

@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@voltomoore

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

github-actions Bot added a commit that referenced this pull request Jun 15, 2026
@voltomoore

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: draw-things-cli SDXL LoRA training reports 'Saved checkpoint' but creates zero-byte/no file

1 participant