anima: officially support release architecture#2738
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant improvements and refactoring to the Anima model's handling of Diffusers repository layouts, adapter file resolution, and configuration parsing. It also adds robust error handling for adapter loading, supports new model flavours, and extends the test suite to cover these enhancements and edge cases.
Model and Adapter Handling Improvements:
releaseandbase-v1.0) inAnima.HUGGINGFACE_PATHS, both pointing to the official converted Diffusers repository.AnimaTransformerModel: now supports multiple possible filenames for both adapter weights and configs, with improved error messages and handling of missing files. [1] [2] [3] [4]"target_vocab_size"or"vocab_size","num_attention_heads"or"num_heads"), improving compatibility with different config formats.Validation and Error Handling:
_latent_sequence_lengthto ensure latent tensor shapes are divisible by the transformer patch size, raising a clear error if not, and updated the corresponding test to verify this behavior. [1] [2]Testing Enhancements:
text_conditioneradapter, including config and weights, from a sibling directory.Dependency and Import Updates:
EntryNotFoundErrorandLocalEntryNotFoundErrorto improve error handling when resolving files from the Hugging Face Hub.These changes make the Anima model more robust, flexible, and compatible with both legacy and new Diffusers repository layouts, while improving error reporting and test coverage.