Update app.py
Browse files
app.py
CHANGED
@@ -14,6 +14,7 @@ from transformers import CLIPTextModel, CLIPTokenizer
|
|
14 |
from utils.unet import UNet3DConditionModel
|
15 |
from utils.pipeline_magictime import MagicTimePipeline
|
16 |
from utils.util import save_videos_grid, convert_ldm_unet_checkpoint, convert_ldm_clip_checkpoint, convert_ldm_vae_checkpoint, load_diffusers_lora_unet, convert_ldm_clip_text_model
|
|
|
17 |
|
18 |
pretrained_model_path = "runwayml/stable-diffusion-v1-5"
|
19 |
inference_config_path = "./sample_configs/RealisticVision.yaml"
|
@@ -61,7 +62,7 @@ examples = [
|
|
61 |
print(f"### Cleaning cached examples ...")
|
62 |
os.system(f"rm -rf gradio_cached_examples/")
|
63 |
|
64 |
-
|
65 |
class MagicTimeController:
|
66 |
def __init__(self, tokenizer, text_encoder, vae, unet, text_model):
|
67 |
|
|
|
14 |
from utils.unet import UNet3DConditionModel
|
15 |
from utils.pipeline_magictime import MagicTimePipeline
|
16 |
from utils.util import save_videos_grid, convert_ldm_unet_checkpoint, convert_ldm_clip_checkpoint, convert_ldm_vae_checkpoint, load_diffusers_lora_unet, convert_ldm_clip_text_model
|
17 |
+
import spaces
|
18 |
|
19 |
pretrained_model_path = "runwayml/stable-diffusion-v1-5"
|
20 |
inference_config_path = "./sample_configs/RealisticVision.yaml"
|
|
|
62 |
print(f"### Cleaning cached examples ...")
|
63 |
os.system(f"rm -rf gradio_cached_examples/")
|
64 |
|
65 |
+
@spaces.GPU(duration=300)
|
66 |
class MagicTimeController:
|
67 |
def __init__(self, tokenizer, text_encoder, vae, unet, text_model):
|
68 |
|