Instructions to use FrancisRing/StableAnimator with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use FrancisRing/StableAnimator 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("FrancisRing/StableAnimator", 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
File size: 1,024 Bytes
60d99f6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | {
"ddconfig": {
"attn_resolutions": [],
"ch": 128,
"ch_fuse": [
-1,
-1,
2,
3,
-1,
-1
],
"ch_in": 128,
"ch_mult": [
1,
2,
2,
4,
4,
4
],
"f_t": 2,
"fp32_attention": true,
"fuse_mid": true,
"fuse_type": "attn",
"in_channels": 3,
"num_res_blocks": 2,
"out_ch": 3,
"pos_embed_mode": "t",
"resolution": 256,
"temp_res": 16,
"upsample_first": true,
"use_3d_conv": true,
"z_channels": 16
},
"ddconfig_2d": {
"attn_resolutions": [],
"ch": 128,
"ch_mult": [
1,
2,
4,
4
],
"dropout": 0.0,
"fp32_attention": true,
"in_channels": 3,
"num_res_blocks": 2,
"out_ch": 3,
"out_z": false,
"resolution": 256,
"z_channels": 4
},
"embed_dim": 16,
"enable_2d": true,
"model_type": "VAE",
"tile_overlap_factor": 0.25,
"tile_sample_min_size": 256,
"transformers_version": "4.39.3",
"use_tiling": true
}
|