Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Remove dead text_encoder None-checks for models that always load their text encoders#1579

Merged
dxqb merged 1 commit into
Nerogar:mergefrom
dxqb:te-include-flag-cleanup
Jul 4, 2026
Merged

Remove dead text_encoder None-checks for models that always load their text encoders#1579
dxqb merged 1 commit into
Nerogar:mergefrom
dxqb:te-include-flag-cleanup

Conversation

@dxqb

@dxqb dxqb commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

see title

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: ____)

will test in merge branch

AI assistance

  • AI-assisted — I have read every line in this diff and can defend each change

…r TE

Chroma, Qwen, Flux2, and ZImage never observe the include_text_encoder
config flag in their model loaders, so their text encoder attribute is
never None after loading. The is-None/truthy guards around it were dead
code; drop them and make the calls unconditional.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@dxqb dxqb merged commit 06f3e0d into Nerogar:merge Jul 4, 2026
1 check passed
@dxqb dxqb deleted the te-include-flag-cleanup branch July 4, 2026 08:14
dxqb added a commit to dxqb/OneTrainer-hameerabbasi that referenced this pull request Jul 5, 2026
These models always load their text encoder, but the checkpointing-refactor
merge on this branch didn't pick up the None-check removal from Nerogar#1579
because the surrounding lines had already diverged.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
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