Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
import random
|
| 2 |
-
|
| 3 |
import gradio as gr
|
| 4 |
import torch
|
| 5 |
from diffusers import StableDiffusionXLPipeline
|
|
@@ -20,7 +20,7 @@ pipe.scheduler = TCDScheduler.from_config(pipe.scheduler.config)
|
|
| 20 |
pipe.load_lora_weights(tcd_lora_id)
|
| 21 |
pipe.fuse_lora()
|
| 22 |
|
| 23 |
-
|
| 24 |
def inference(prompt, num_inference_steps=4, seed=-1, eta=0.3):
|
| 25 |
if seed is None or seed == '' or seed == -1:
|
| 26 |
seed = int(random.randrange(4294967294))
|
|
|
|
| 1 |
import random
|
| 2 |
+
import spaces
|
| 3 |
import gradio as gr
|
| 4 |
import torch
|
| 5 |
from diffusers import StableDiffusionXLPipeline
|
|
|
|
| 20 |
pipe.load_lora_weights(tcd_lora_id)
|
| 21 |
pipe.fuse_lora()
|
| 22 |
|
| 23 |
+
@spaces.GPU
|
| 24 |
def inference(prompt, num_inference_steps=4, seed=-1, eta=0.3):
|
| 25 |
if seed is None or seed == '' or seed == -1:
|
| 26 |
seed = int(random.randrange(4294967294))
|