RhymesAI commited on
Commit
b2a21d4
1 Parent(s): 2afcdf8

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +52 -5
README.md CHANGED
@@ -5,8 +5,8 @@ language:
5
  ---
6
 
7
  <p align="center">
8
- 🔗 <a href="https://rhymes.ai/" target="_blank"> Try Aria!</a> · 📖 <a href="https://www.rhymes.ai/blog-details/aria-first-open-multimodal-native-moe-model" target="_blank">Blog</a> · 📌 <a href="https://arxiv.org/pdf/2410.05993" target="_blank">Paper</a>
9
- · ⭐<a href="https://github.com/rhymes-ai/Aria" target="_blank">GitHub</a>
10
  </p>
11
 
12
  # Gallery
@@ -72,9 +72,56 @@ Allegro is capable of producing high-quality, 6-second videos at 30 frames per s
72
 
73
 
74
  # Quick start
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
 
76
  # License
77
  This repo is released under the Apache 2.0 License.
78
-
79
- # Disclaimer
80
- The Allegro models are provided on an "AS IS" basis, and we disclaim any liability for consequences or damages arising from your use. Users are kindly advised to ensure compliance with all applicable laws and regulations. This includes, but is not limited to, prohibitions against illegal activities and the generation of content that is violent, pornographic, obscene, or otherwise deemed non-safe, inappropriate, or illegal. By using these models, you agree that we shall not be held accountable for any consequences resulting from your use.
 
5
  ---
6
 
7
  <p align="center">
8
+ <a href="https://rhymes.ai/" target="_blank"> Gallery</a> · <a href="https://github.com/rhymes-ai/Aria" target="_blank">GitHub</a> · <a href="https://www.rhymes.ai/blog-details/" target="_blank">Blog</a> · <a href="https://arxiv.org/pdf/2410.05993" target="_blank">Paper</a> · <a href="https://discord" target="_blank">Discord</a>
9
+
10
  </p>
11
 
12
  # Gallery
 
72
 
73
 
74
  # Quick start
75
+ You can quickly get started with Allegro using the Hugging Face Diffusers library.
76
+ For more tutorials, see Allegro GitHub (link-tbd).
77
+
78
+ Install necessary requirements:
79
+ ```python
80
+ pip install diffusers transformers imageio
81
+ ```
82
+ Inference on single gpu:
83
+ ```python
84
+ from diffusers import DiffusionPipeline
85
+ import torch
86
+
87
+ allegro_pipeline = DiffusionPipeline.from_pretrained(
88
+ "rhythms-ai/allegro", trust_remote_code=True, torch_dtype=torch.bfloat16
89
+ ).to("cuda")
90
+
91
+ allegro_pipeline.vae = allegro_pipeline.vae.to(torch.float32)
92
+
93
+ prompt = "a video of an astronaut riding a horse on mars"
94
+
95
+ positive_prompt = """
96
+ (masterpiece), (best quality), (ultra-detailed), (unwatermarked),
97
+ {}
98
+ emotional, harmonious, vignette, 4k epic detailed, shot on kodak, 35mm photo,
99
+ sharp focus, high budget, cinemascope, moody, epic, gorgeous
100
+ """
101
+
102
+ negative_prompt = """
103
+ nsfw, lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality,
104
+ low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry.
105
+ """
106
+
107
+ num_sampling_steps, guidance_scale, seed = 100, 7.5, 42
108
+
109
+ user_prompt = positive_prompt.format(args.user_prompt.lower().strip())
110
+ out_video = allegro_pipeline(
111
+ user_prompt,
112
+ negative_prompt=negative_prompt,
113
+ num_frames=88,
114
+ height=720,
115
+ width=1280,
116
+ num_inference_steps=num_sampling_steps,
117
+ guidance_scale=guidance_scale,
118
+ max_sequence_length=512,
119
+ generator = torch.Generator(device="cuda:0").manual_seed(seed)
120
+ ).video[0]
121
+
122
+ imageio.mimwrite("test_video.mp4", out_video, fps=15, quality=8)
123
+
124
+ ```
125
 
126
  # License
127
  This repo is released under the Apache 2.0 License.