Skip to content

anima: officially support release architecture#2738

Merged
bghira merged 2 commits into
mainfrom
bugfix/anima-release
Jun 4, 2026
Merged

anima: officially support release architecture#2738
bghira merged 2 commits into
mainfrom
bugfix/anima-release

Conversation

@bghira

@bghira bghira commented Jun 4, 2026

Copy link
Copy Markdown
Owner

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:

  • Added support for new model flavours (release and base-v1.0) in Anima.HUGGINGFACE_PATHS, both pointing to the official converted Diffusers repository.
  • Refactored adapter file resolution logic in 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]
  • Updated configuration parsing to allow for alternate key names (e.g., "target_vocab_size" or "vocab_size", "num_attention_heads" or "num_heads"), improving compatibility with different config formats.

Validation and Error Handling:

  • Added validation in _latent_sequence_length to 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:

  • Added tests to verify the new model flavours use the correct converted Diffusers repositories and that the new layout switches component sources as expected. [1] [2]
  • Added a test to ensure the model can load the release-style text_conditioner adapter, including config and weights, from a sibling directory.

Dependency and Import Updates:

  • Added explicit imports for EntryNotFoundError and LocalEntryNotFoundError to 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.

This comment was marked as resolved.

@bghira bghira merged commit 33d5eaf into main Jun 4, 2026
2 checks passed
@bghira bghira deleted the bugfix/anima-release branch June 4, 2026 23:42
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.

2 participants