Skip to content

fix: ignore submodule overrides when continuing fine-tune from backup#1474

Draft
dxqb wants to merge 1 commit into
Nerogar:masterfrom
dxqb:fix/override-transformer-backup
Draft

fix: ignore submodule overrides when continuing fine-tune from backup#1474
dxqb wants to merge 1 commit into
Nerogar:masterfrom
dxqb:fix/override-transformer-backup

Conversation

@dxqb
Copy link
Copy Markdown
Collaborator

@dxqb dxqb commented May 25, 2026

fixes #1402

Continuing a fine-tune from a backup only redirected the base model to
the backup path, leaving submodule override fields (e.g. "Override
Transformer") pointing at their configured paths. The loader then loaded
the override instead of the backup's trained submodule.

A backup is a complete internal model, so clear all submodule overrides
when continuing a fine-tune from one.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@dxqb dxqb added the merging last steps before merge label May 25, 2026
@dxqb
Copy link
Copy Markdown
Collaborator Author

dxqb commented May 25, 2026

Claude: clear_overrides() is too broad. It clears all six override fields, but two of them point at required components that aren't stored in the backup loader path, so resuming a fine-tune from backup will fail to load:

  • Würstchen / Stable Cascade — the internal backup saves only the prior pipe (WuerstchenModelSaver.__save_diffuserscreate_pipeline().prior_pipe). The effnet encoder and decoder come from effnet_encoder_model / decoder_model. After clearing them, the loader does DDPMWuerstchenScheduler.from_pretrained("") / load_file("") → raises. (The prior override is already neutralized by __load_internal, so it never needed clearing.)

  • HiDream — the text_encoder_4 encoder weights fall back to the backup subfolder when empty, but tokenizer_4 loads unconditionally with no fallback (HiDreamModelLoader.py:113): LlamaTokenizerFast.from_pretrained("") → raises.

The safe fix is to clear only what the backup actually carries — transformer_model (and optionally vae_model, harmless). Leave effnet_encoder_model, decoder_model, and text_encoder_4 intact.

@dxqb dxqb removed the merging last steps before merge label May 25, 2026
@dxqb dxqb marked this pull request as draft May 25, 2026 16:34
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]: "Override Transformer" overrides backup

1 participant