Skip to content

Add preset smoke-test scripts, including LoRA load checks (diffusers + ComfyUI)#1545

Draft
dxqb wants to merge 2 commits into
Nerogar:masterfrom
dxqb:lora-load-smoke-tests
Draft

Add preset smoke-test scripts, including LoRA load checks (diffusers + ComfyUI)#1545
dxqb wants to merge 2 commits into
Nerogar:masterfrom
dxqb:lora-load-smoke-tests

Conversation

@dxqb

@dxqb dxqb commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

Builds on #1531 (the --preset-path/--config-value CLI overrides).

Adds test/run_lora_presets.sh and test/run_embedding_presets.sh to train every built-in preset against a small shared test/minimal.json config, plus two new load-only smoke tests run against each trained LoRA:

  • test/smoke_load_diffusers.py - loads the LoRA into a vanilla diffusers pipeline via load_lora_weights, to catch real-world LoRA key-name mismatches outside of OT's own loading code.
  • test/smoke_load_comfy.py - same, but against ComfyUI's own loader (comfy.sd.load_lora_for_models).

Both are CPU-only, load-only (no sampling). Training is decoupled from the two load checks via --config-value (from #1531), so each of the three stages (train / diffusers-load / comfy-load) can be rerun independently against already-saved LoRAs in models/lora_smoke/<preset>/model.safetensors.

Initial results across all built-in model types are summarized in #1544.

Test plan

  • pre-commit run --all-files passes
  • Launched the affected UI or script and exercised the change
  • Tested with at least one real preset / config when relevant (note which: all built-in LoRA and embedding presets, trained and load-checked on a remote GPU box)

AI assistance

Early AI prototype — opened for discussion, not ready for review


Drafted by Claude

@dxqb

dxqb commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator Author
  • can Forge be added in the same way?

dxqb added 2 commits June 20, 2026 20:33
--preset-path lets a built-in preset be applied (without migration, since
built-in presets are always saved in the current format) before the main
config file. --config-value KEY=VALUE applies a final override after both,
with dotted-path support for nested config objects - useful for scripting
training runs without hand-editing a config file (e.g. overriding the output
path or disabling compile per-run).
…+ ComfyUI)

Trains a real LoRA per preset (run_lora_presets.sh) or embedding (
run_embedding_presets.sh) against a small shared minimal.json config, then
verifies each trained LoRA loads via both a vanilla diffusers pipeline and
ComfyUI's own loader (CPU-only, load-only) to catch real-world LoRA key-name
mismatches that the existing sampling-based smoke tests don't exercise.
Training is decoupled from the two load checks via --config-value (added in
the previous commit), so any of the three stages (train, diffusers-load,
comfy-load) can be rerun independently against already-saved LoRAs.
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.

1 participant