Spaces:
Build error
Build error
cocktailpeanut
commited on
Commit
•
6defae8
1
Parent(s):
5c59ba2
update
Browse files
app.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
import spaces
|
2 |
import os, logging, time, argparse, random, tempfile, rembg, shlex, subprocess
|
3 |
import gradio as gr
|
4 |
import numpy as np
|
@@ -69,7 +69,7 @@ pipe_t2i.to('cuda:0', torch.float16)
|
|
69 |
### gradio
|
70 |
rembg_session = rembg.new_session()
|
71 |
|
72 |
-
|
73 |
def generate(text, seed):
|
74 |
def fill_background(image):
|
75 |
image = np.array(image).astype(np.float32) / 255.0
|
@@ -98,7 +98,7 @@ def generate(text, seed):
|
|
98 |
return samples
|
99 |
|
100 |
|
101 |
-
|
102 |
def render(image, mc_resolution=256, formats=["obj"]):
|
103 |
image = Image.fromarray(image)
|
104 |
image = image.resize((768, 768))
|
|
|
1 |
+
#import spaces
|
2 |
import os, logging, time, argparse, random, tempfile, rembg, shlex, subprocess
|
3 |
import gradio as gr
|
4 |
import numpy as np
|
|
|
69 |
### gradio
|
70 |
rembg_session = rembg.new_session()
|
71 |
|
72 |
+
#@spaces.GPU
|
73 |
def generate(text, seed):
|
74 |
def fill_background(image):
|
75 |
image = np.array(image).astype(np.float32) / 255.0
|
|
|
98 |
return samples
|
99 |
|
100 |
|
101 |
+
#@spaces.GPU
|
102 |
def render(image, mc_resolution=256, formats=["obj"]):
|
103 |
image = Image.fromarray(image)
|
104 |
image = image.resize((768, 768))
|