Instructions to use Efficient-Large-Model/SANA-WM_bidirectional with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Efficient-Large-Model/SANA-WM_bidirectional with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image, export_to_video # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Efficient-Large-Model/SANA-WM_bidirectional", dtype=torch.bfloat16, device_map="cuda") pipe.to("cuda") prompt = "A man with short gray hair plays a red electric guitar." image = load_image( "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/guitar-man.png" ) output = pipe(image=image, prompt=prompt).frames[0] export_to_video(output, "output.mp4") - Notebooks
- Google Colab
- Kaggle
Add diffusers-format LTX-2 refiner
Browse files
refiner_diffusers/connectors/config.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "LTX2TextConnectors",
|
| 3 |
+
"_diffusers_version": "0.37.0.dev0",
|
| 4 |
+
"audio_connector_attention_head_dim": 128,
|
| 5 |
+
"audio_connector_num_attention_heads": 30,
|
| 6 |
+
"audio_connector_num_layers": 2,
|
| 7 |
+
"audio_connector_num_learnable_registers": 128,
|
| 8 |
+
"caption_channels": 3840,
|
| 9 |
+
"causal_temporal_positioning": false,
|
| 10 |
+
"connector_rope_base_seq_len": 4096,
|
| 11 |
+
"rope_double_precision": true,
|
| 12 |
+
"rope_theta": 10000.0,
|
| 13 |
+
"rope_type": "split",
|
| 14 |
+
"text_proj_in_factor": 49,
|
| 15 |
+
"video_connector_attention_head_dim": 128,
|
| 16 |
+
"video_connector_num_attention_heads": 30,
|
| 17 |
+
"video_connector_num_layers": 2,
|
| 18 |
+
"video_connector_num_learnable_registers": 128
|
| 19 |
+
}
|
refiner_diffusers/connectors/diffusion_pytorch_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:60e449350b12e22c58d6b64c96b9d3c7647b5b52ac688f36888a98a60b1e5806
|
| 3 |
+
size 2862957976
|
refiner_diffusers/transformer/config.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "LTX2VideoTransformer3DModel",
|
| 3 |
+
"_diffusers_version": "0.37.0.dev0",
|
| 4 |
+
"activation_fn": "gelu-approximate",
|
| 5 |
+
"attention_bias": true,
|
| 6 |
+
"attention_head_dim": 128,
|
| 7 |
+
"attention_out_bias": true,
|
| 8 |
+
"audio_attention_head_dim": 64,
|
| 9 |
+
"audio_cross_attention_dim": 2048,
|
| 10 |
+
"audio_hop_length": 160,
|
| 11 |
+
"audio_in_channels": 128,
|
| 12 |
+
"audio_num_attention_heads": 32,
|
| 13 |
+
"audio_out_channels": 128,
|
| 14 |
+
"audio_patch_size": 1,
|
| 15 |
+
"audio_patch_size_t": 1,
|
| 16 |
+
"audio_pos_embed_max_pos": 20,
|
| 17 |
+
"audio_sampling_rate": 16000,
|
| 18 |
+
"audio_scale_factor": 4,
|
| 19 |
+
"base_height": 2048,
|
| 20 |
+
"base_width": 2048,
|
| 21 |
+
"caption_channels": 3840,
|
| 22 |
+
"causal_offset": 1,
|
| 23 |
+
"cross_attention_dim": 4096,
|
| 24 |
+
"cross_attn_timestep_scale_multiplier": 1000,
|
| 25 |
+
"in_channels": 128,
|
| 26 |
+
"norm_elementwise_affine": false,
|
| 27 |
+
"norm_eps": 1e-06,
|
| 28 |
+
"num_attention_heads": 32,
|
| 29 |
+
"num_layers": 48,
|
| 30 |
+
"out_channels": 128,
|
| 31 |
+
"patch_size": 1,
|
| 32 |
+
"patch_size_t": 1,
|
| 33 |
+
"pos_embed_max_pos": 20,
|
| 34 |
+
"qk_norm": "rms_norm_across_heads",
|
| 35 |
+
"rope_double_precision": true,
|
| 36 |
+
"rope_theta": 10000.0,
|
| 37 |
+
"rope_type": "split",
|
| 38 |
+
"timestep_scale_multiplier": 1000,
|
| 39 |
+
"vae_scale_factors": [
|
| 40 |
+
8,
|
| 41 |
+
32,
|
| 42 |
+
32
|
| 43 |
+
]
|
| 44 |
+
}
|
refiner_diffusers/transformer/diffusion_pytorch_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:36bcd5fc5ddd98f60a923f5550c38426e51e5b311930204b2739f6b44fcaf41f
|
| 3 |
+
size 37759292408
|