import random
import torch
def set_env(seed=0):
torch.manual_seed(seed)
torch.set_grad_enabled(False)
def randomize_seed_fn(seed: int, randomize_seed: bool) -> int:
if randomize_seed:
seed = random.randint(0, 203279)
return seed
title_markdown = ("""
""")
DESCRIPTION = """
# Open-Sora-Plan v1.1.0
## If Open-Sora-Plan is helpful, please help to β¨ the [Github Repo](https://github.com/PKU-YuanGroup/Open-Sora-Plan) and recommend it to your friends π
#### [Open-Sora-Plan v1.1.0](https://github.com/PKU-YuanGroup/Open-Sora-Plan) is a transformer-based text-to-video diffusion system trained on text embeddings from T5.
#### This demo is only trained on 3k hours videos, when creating videos, please be aware that it has the potential to generate harmful videos. For more details read our [report]().
#### Image generation is typically 50 steps, video generation maybe 150 steps will yield good results, but this may take 3-4 minutes.
#### Feel free to enjoy the examples.
#### English prompts ONLY; ζη€Ίθ―δ»
ιθ±ζ
####
"""
#
#
#
#
#
#
#
# """)
block_css = """
#buttons button {
min-width: min(120px,100%);
}
"""
with open('examples/65.txt', 'r') as f:
examples_txt = f.readlines()
examples_txt = [i.strip() for i in examples_txt]
examples = [[i, 50, 7.5] for i in examples_txt]