Commit
•
edefd31
1
Parent(s):
d9905a4
add zerogpu support
Browse files
app.py
CHANGED
@@ -3,6 +3,7 @@ import subprocess
|
|
3 |
|
4 |
import gradio as gr
|
5 |
import numpy as np
|
|
|
6 |
import torch
|
7 |
from diffusers import DiffusionPipeline
|
8 |
|
@@ -20,6 +21,7 @@ pipeline = DiffusionPipeline.from_pretrained(
|
|
20 |
).to("cuda")
|
21 |
|
22 |
|
|
|
23 |
def run(image):
|
24 |
input_image = np.array(image, dtype=np.float32) / 255.0
|
25 |
splat = pipeline(
|
|
|
3 |
|
4 |
import gradio as gr
|
5 |
import numpy as np
|
6 |
+
import spaces
|
7 |
import torch
|
8 |
from diffusers import DiffusionPipeline
|
9 |
|
|
|
21 |
).to("cuda")
|
22 |
|
23 |
|
24 |
+
@spaces.GPU
|
25 |
def run(image):
|
26 |
input_image = np.array(image, dtype=np.float32) / 255.0
|
27 |
splat = pipeline(
|