Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
import gradio as gr
|
2 |
import torch
|
3 |
import os
|
4 |
-
import spaces
|
5 |
import uuid
|
6 |
|
7 |
from diffusers import AnimateDiffPipeline, MotionAdapter, EulerDiscreteScheduler
|
@@ -36,7 +35,7 @@ from transformers import CLIPFeatureExtractor
|
|
36 |
feature_extractor = CLIPFeatureExtractor.from_pretrained("openai/clip-vit-base-patch32")
|
37 |
|
38 |
# Function
|
39 |
-
|
40 |
def generate_image(prompt, base="Realistic", motion="", step=8, resolution="Square", progress=gr.Progress()):
|
41 |
global step_loaded
|
42 |
global base_loaded
|
|
|
1 |
import gradio as gr
|
2 |
import torch
|
3 |
import os
|
|
|
4 |
import uuid
|
5 |
|
6 |
from diffusers import AnimateDiffPipeline, MotionAdapter, EulerDiscreteScheduler
|
|
|
35 |
feature_extractor = CLIPFeatureExtractor.from_pretrained("openai/clip-vit-base-patch32")
|
36 |
|
37 |
# Function
|
38 |
+
#@spaces.GPU(duration=30,queue=False)
|
39 |
def generate_image(prompt, base="Realistic", motion="", step=8, resolution="Square", progress=gr.Progress()):
|
40 |
global step_loaded
|
41 |
global base_loaded
|