Instructions to use hf-internal-testing/tiny-anima-modular-pipe with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use hf-internal-testing/tiny-anima-modular-pipe with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("hf-internal-testing/tiny-anima-modular-pipe", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Add tiny Anima modular pipeline fixture
Browse files- README.md +14 -0
- modular_model_index.json +103 -0
- scheduler/scheduler_config.json +18 -0
- text_conditioner/config.json +14 -0
- text_conditioner/diffusion_pytorch_model.safetensors +3 -0
- text_encoder/config.json +37 -0
- text_encoder/model.safetensors +3 -0
- transformer/config.json +36 -0
- transformer/diffusion_pytorch_model.safetensors +3 -0
- vae/config.json +31 -0
- vae/diffusion_pytorch_model.safetensors +3 -0
README.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: diffusers
|
| 3 |
+
tags:
|
| 4 |
+
- modular-diffusers
|
| 5 |
+
- anima
|
| 6 |
+
---
|
| 7 |
+
|
| 8 |
+
# tiny-anima-modular-pipe
|
| 9 |
+
|
| 10 |
+
Tiny randomly-initialized Anima modular pipeline, used by the `diffusers` fast tests in
|
| 11 |
+
`tests/modular_pipelines/anima/`. Not useful for generation.
|
| 12 |
+
|
| 13 |
+
`tokenizer` and `t5_tokenizer` are not stored here — `modular_model_index.json` points them at
|
| 14 |
+
`hf-internal-testing/tiny-random-Qwen2VLForConditionalGeneration` and `hf-internal-testing/tiny-random-t5`.
|
modular_model_index.json
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_blocks_class_name": "AnimaAutoBlocks",
|
| 3 |
+
"_class_name": "AnimaModularPipeline",
|
| 4 |
+
"_diffusers_version": "0.40.0.dev0",
|
| 5 |
+
"scheduler": [
|
| 6 |
+
"diffusers",
|
| 7 |
+
"FlowMatchEulerDiscreteScheduler",
|
| 8 |
+
{
|
| 9 |
+
"pretrained_model_name_or_path": "hf-internal-testing/tiny-anima-modular-pipe",
|
| 10 |
+
"revision": null,
|
| 11 |
+
"subfolder": "scheduler",
|
| 12 |
+
"type_hint": [
|
| 13 |
+
"diffusers",
|
| 14 |
+
"FlowMatchEulerDiscreteScheduler"
|
| 15 |
+
],
|
| 16 |
+
"variant": null
|
| 17 |
+
}
|
| 18 |
+
],
|
| 19 |
+
"t5_tokenizer": [
|
| 20 |
+
"transformers",
|
| 21 |
+
"T5TokenizerFast",
|
| 22 |
+
{
|
| 23 |
+
"pretrained_model_name_or_path": "hf-internal-testing/tiny-random-t5",
|
| 24 |
+
"revision": null,
|
| 25 |
+
"subfolder": null,
|
| 26 |
+
"type_hint": [
|
| 27 |
+
"transformers",
|
| 28 |
+
"T5TokenizerFast"
|
| 29 |
+
],
|
| 30 |
+
"variant": null
|
| 31 |
+
}
|
| 32 |
+
],
|
| 33 |
+
"text_conditioner": [
|
| 34 |
+
"diffusers",
|
| 35 |
+
"AnimaTextConditioner",
|
| 36 |
+
{
|
| 37 |
+
"pretrained_model_name_or_path": "hf-internal-testing/tiny-anima-modular-pipe",
|
| 38 |
+
"revision": null,
|
| 39 |
+
"subfolder": "text_conditioner",
|
| 40 |
+
"type_hint": [
|
| 41 |
+
"diffusers",
|
| 42 |
+
"AnimaTextConditioner"
|
| 43 |
+
],
|
| 44 |
+
"variant": null
|
| 45 |
+
}
|
| 46 |
+
],
|
| 47 |
+
"text_encoder": [
|
| 48 |
+
"transformers",
|
| 49 |
+
"Qwen3Model",
|
| 50 |
+
{
|
| 51 |
+
"pretrained_model_name_or_path": "hf-internal-testing/tiny-anima-modular-pipe",
|
| 52 |
+
"revision": null,
|
| 53 |
+
"subfolder": "text_encoder",
|
| 54 |
+
"type_hint": [
|
| 55 |
+
"transformers",
|
| 56 |
+
"Qwen3Model"
|
| 57 |
+
],
|
| 58 |
+
"variant": null
|
| 59 |
+
}
|
| 60 |
+
],
|
| 61 |
+
"tokenizer": [
|
| 62 |
+
"transformers",
|
| 63 |
+
"Qwen2Tokenizer",
|
| 64 |
+
{
|
| 65 |
+
"pretrained_model_name_or_path": "hf-internal-testing/tiny-random-Qwen2VLForConditionalGeneration",
|
| 66 |
+
"revision": null,
|
| 67 |
+
"subfolder": null,
|
| 68 |
+
"type_hint": [
|
| 69 |
+
"transformers",
|
| 70 |
+
"Qwen2Tokenizer"
|
| 71 |
+
],
|
| 72 |
+
"variant": null
|
| 73 |
+
}
|
| 74 |
+
],
|
| 75 |
+
"transformer": [
|
| 76 |
+
"diffusers",
|
| 77 |
+
"CosmosTransformer3DModel",
|
| 78 |
+
{
|
| 79 |
+
"pretrained_model_name_or_path": "hf-internal-testing/tiny-anima-modular-pipe",
|
| 80 |
+
"revision": null,
|
| 81 |
+
"subfolder": "transformer",
|
| 82 |
+
"type_hint": [
|
| 83 |
+
"diffusers",
|
| 84 |
+
"CosmosTransformer3DModel"
|
| 85 |
+
],
|
| 86 |
+
"variant": null
|
| 87 |
+
}
|
| 88 |
+
],
|
| 89 |
+
"vae": [
|
| 90 |
+
"diffusers",
|
| 91 |
+
"AutoencoderKLQwenImage",
|
| 92 |
+
{
|
| 93 |
+
"pretrained_model_name_or_path": "hf-internal-testing/tiny-anima-modular-pipe",
|
| 94 |
+
"revision": null,
|
| 95 |
+
"subfolder": "vae",
|
| 96 |
+
"type_hint": [
|
| 97 |
+
"diffusers",
|
| 98 |
+
"AutoencoderKLQwenImage"
|
| 99 |
+
],
|
| 100 |
+
"variant": null
|
| 101 |
+
}
|
| 102 |
+
]
|
| 103 |
+
}
|
scheduler/scheduler_config.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "FlowMatchEulerDiscreteScheduler",
|
| 3 |
+
"_diffusers_version": "0.40.0.dev0",
|
| 4 |
+
"base_image_seq_len": 256,
|
| 5 |
+
"base_shift": 0.5,
|
| 6 |
+
"invert_sigmas": false,
|
| 7 |
+
"max_image_seq_len": 4096,
|
| 8 |
+
"max_shift": 1.15,
|
| 9 |
+
"num_train_timesteps": 1000,
|
| 10 |
+
"shift": 3.0,
|
| 11 |
+
"shift_terminal": null,
|
| 12 |
+
"stochastic_sampling": false,
|
| 13 |
+
"time_shift_type": "exponential",
|
| 14 |
+
"use_beta_sigmas": false,
|
| 15 |
+
"use_dynamic_shifting": false,
|
| 16 |
+
"use_exponential_sigmas": false,
|
| 17 |
+
"use_karras_sigmas": false
|
| 18 |
+
}
|
text_conditioner/config.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "AnimaTextConditioner",
|
| 3 |
+
"_diffusers_version": "0.40.0.dev0",
|
| 4 |
+
"min_sequence_length": 16,
|
| 5 |
+
"mlp_ratio": 4.0,
|
| 6 |
+
"model_dim": 16,
|
| 7 |
+
"num_attention_heads": 4,
|
| 8 |
+
"num_layers": 2,
|
| 9 |
+
"source_dim": 16,
|
| 10 |
+
"target_dim": 16,
|
| 11 |
+
"target_vocab_size": 32128,
|
| 12 |
+
"use_layer_norm": false,
|
| 13 |
+
"use_self_attention": true
|
| 14 |
+
}
|
text_conditioner/diffusion_pytorch_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:abd23e56f9608bb7065bcbfd5c5774db81746e47bc8aa34aeaa787a9b91e05a2
|
| 3 |
+
size 2095080
|
text_encoder/config.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"Qwen3Model"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"bos_token_id": null,
|
| 8 |
+
"dtype": "float32",
|
| 9 |
+
"eos_token_id": null,
|
| 10 |
+
"head_dim": 4,
|
| 11 |
+
"hidden_act": "silu",
|
| 12 |
+
"hidden_size": 16,
|
| 13 |
+
"initializer_range": 0.02,
|
| 14 |
+
"intermediate_size": 32,
|
| 15 |
+
"layer_types": [
|
| 16 |
+
"full_attention",
|
| 17 |
+
"full_attention"
|
| 18 |
+
],
|
| 19 |
+
"max_position_embeddings": 128,
|
| 20 |
+
"max_window_layers": 28,
|
| 21 |
+
"model_type": "qwen3",
|
| 22 |
+
"num_attention_heads": 4,
|
| 23 |
+
"num_hidden_layers": 2,
|
| 24 |
+
"num_key_value_heads": 2,
|
| 25 |
+
"pad_token_id": null,
|
| 26 |
+
"rms_norm_eps": 1e-06,
|
| 27 |
+
"rope_parameters": {
|
| 28 |
+
"rope_theta": 1000000.0,
|
| 29 |
+
"rope_type": "default"
|
| 30 |
+
},
|
| 31 |
+
"sliding_window": null,
|
| 32 |
+
"tie_word_embeddings": false,
|
| 33 |
+
"transformers_version": "5.14.1",
|
| 34 |
+
"use_cache": true,
|
| 35 |
+
"use_sliding_window": false,
|
| 36 |
+
"vocab_size": 152064
|
| 37 |
+
}
|
text_encoder/model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:86192180357afb3f5a419f22b56461699b6a9138f53a88f33645d608657213af
|
| 3 |
+
size 9753280
|
transformer/config.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "CosmosTransformer3DModel",
|
| 3 |
+
"_diffusers_version": "0.40.0.dev0",
|
| 4 |
+
"adaln_lora_dim": 4,
|
| 5 |
+
"attention_head_dim": 16,
|
| 6 |
+
"concat_padding_mask": true,
|
| 7 |
+
"controlnet_block_every_n": null,
|
| 8 |
+
"crossattn_proj_in_channels": 1024,
|
| 9 |
+
"encoder_hidden_states_channels": 1024,
|
| 10 |
+
"extra_pos_embed_type": null,
|
| 11 |
+
"img_context_dim_in": null,
|
| 12 |
+
"img_context_dim_out": 2048,
|
| 13 |
+
"img_context_num_tokens": 256,
|
| 14 |
+
"in_channels": 4,
|
| 15 |
+
"max_size": [
|
| 16 |
+
4,
|
| 17 |
+
32,
|
| 18 |
+
32
|
| 19 |
+
],
|
| 20 |
+
"mlp_ratio": 2,
|
| 21 |
+
"num_attention_heads": 2,
|
| 22 |
+
"num_layers": 2,
|
| 23 |
+
"out_channels": 4,
|
| 24 |
+
"patch_size": [
|
| 25 |
+
1,
|
| 26 |
+
2,
|
| 27 |
+
2
|
| 28 |
+
],
|
| 29 |
+
"rope_scale": [
|
| 30 |
+
1.0,
|
| 31 |
+
4.0,
|
| 32 |
+
4.0
|
| 33 |
+
],
|
| 34 |
+
"text_embed_dim": 16,
|
| 35 |
+
"use_crossattn_projection": false
|
| 36 |
+
}
|
transformer/diffusion_pytorch_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fb50a8b9b263cb67ca09a7de8335a4236c0192434dc8f2bb751c4aadeb46f6fe
|
| 3 |
+
size 130368
|
vae/config.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "AutoencoderKLQwenImage",
|
| 3 |
+
"_diffusers_version": "0.40.0.dev0",
|
| 4 |
+
"attn_scales": [],
|
| 5 |
+
"base_dim": 24,
|
| 6 |
+
"dim_mult": [
|
| 7 |
+
1,
|
| 8 |
+
2,
|
| 9 |
+
4
|
| 10 |
+
],
|
| 11 |
+
"dropout": 0.0,
|
| 12 |
+
"input_channels": 3,
|
| 13 |
+
"latents_mean": [
|
| 14 |
+
0.0,
|
| 15 |
+
0.0,
|
| 16 |
+
0.0,
|
| 17 |
+
0.0
|
| 18 |
+
],
|
| 19 |
+
"latents_std": [
|
| 20 |
+
1.0,
|
| 21 |
+
1.0,
|
| 22 |
+
1.0,
|
| 23 |
+
1.0
|
| 24 |
+
],
|
| 25 |
+
"num_res_blocks": 1,
|
| 26 |
+
"temperal_downsample": [
|
| 27 |
+
false,
|
| 28 |
+
true
|
| 29 |
+
],
|
| 30 |
+
"z_dim": 4
|
| 31 |
+
}
|
vae/diffusion_pytorch_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d82f6ac6ca2e5767a17a5efc504e0470705b3b3318bab132dd218ff0ff342d29
|
| 3 |
+
size 16230492
|