Spaces:
Runtime error
Runtime error
Lawrence-cj
commited on
Commit
•
e0e8c81
1
Parent(s):
6f9746c
Zero-GPU
Browse files
app.py
CHANGED
@@ -7,6 +7,7 @@ import random
|
|
7 |
import gradio as gr
|
8 |
import numpy as np
|
9 |
import uuid
|
|
|
10 |
from diffusers import ConsistencyDecoderVAE, DPMSolverMultistepScheduler, Transformer2DModel, AutoencoderKL, SASolverScheduler
|
11 |
import torch
|
12 |
from typing import Tuple
|
@@ -191,6 +192,7 @@ def randomize_seed_fn(seed: int, randomize_seed: bool) -> int:
|
|
191 |
|
192 |
@torch.no_grad()
|
193 |
@torch.inference_mode()
|
|
|
194 |
def generate(
|
195 |
prompt: str,
|
196 |
negative_prompt: str = "",
|
|
|
7 |
import gradio as gr
|
8 |
import numpy as np
|
9 |
import uuid
|
10 |
+
import spaces
|
11 |
from diffusers import ConsistencyDecoderVAE, DPMSolverMultistepScheduler, Transformer2DModel, AutoencoderKL, SASolverScheduler
|
12 |
import torch
|
13 |
from typing import Tuple
|
|
|
192 |
|
193 |
@torch.no_grad()
|
194 |
@torch.inference_mode()
|
195 |
+
@spaces.GPU(duration=120)
|
196 |
def generate(
|
197 |
prompt: str,
|
198 |
negative_prompt: str = "",
|