Skip to content

fix: detect Z-Image LoRAs with transformer.layers prefix#8986

Merged
lstein merged 2 commits intoinvoke-ai:mainfrom
Pfannkuchensack:feat/onetrainer-zimage-lora-format
Apr 7, 2026
Merged

fix: detect Z-Image LoRAs with transformer.layers prefix#8986
lstein merged 2 commits intoinvoke-ai:mainfrom
Pfannkuchensack:feat/onetrainer-zimage-lora-format

Conversation

@Pfannkuchensack
Copy link
Copy Markdown
Collaborator

Summary

OneTrainer exports Z-Image LoRAs with transformer.layers. key prefix instead of diffusion_model.layers.. Add this prefix (and the PEFT-wrapped base_model.model.transformer.layers. variant) to the Z-Image LoRA probe so these models are correctly identified and loaded.

QA Instructions

Import a OneTrainer Z-Image LoRA (with transformer.layers. key prefix) and verify it is detected as a Z-Image LoRA and loads correctly.

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated (if applicable)
  • ❗Changes to a redux slice have a corresponding migration
  • Documentation added / updated (if applicable)
  • Updated What's New copy (if doing a release after this PR)

OneTrainer exports Z-Image LoRAs with 'transformer.layers.' key prefix
instead of 'diffusion_model.layers.'. Add this prefix (and the
PEFT-wrapped 'base_model.model.transformer.layers.' variant) to the
Z-Image LoRA probe so these models are correctly identified and loaded.
@github-actions github-actions bot added python PRs that change python files backend PRs that change backend files labels Mar 23, 2026
Copy link
Copy Markdown
Collaborator

@lstein lstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as advertised.

@lstein lstein enabled auto-merge (squash) April 7, 2026 01:43
@lstein lstein merged commit ae42182 into invoke-ai:main Apr 7, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend PRs that change backend files python PRs that change python files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants