Spaces:
No application file
No application file
Update app (3).py
Browse files- app (3).py +1 -9
app (3).py
CHANGED
@@ -1,6 +1,5 @@
|
|
1 |
import gradio as gr
|
2 |
from PIL import Image
|
3 |
-
import spaces
|
4 |
|
5 |
from src.tryon_pipeline import StableDiffusionXLInpaintPipeline as TryonPipeline
|
6 |
from src.unet_hacked_garmnet import UNet2DConditionModel as UNet2DConditionModel_ref
|
@@ -127,16 +126,9 @@ pipe = TryonPipeline.from_pretrained(
|
|
127 |
)
|
128 |
pipe.unet_encoder = UNet_Encoder
|
129 |
|
130 |
-
zero = torch.Tensor([0]).cuda()
|
131 |
-
print(zero.device) # <-- 'cpu' 🤔
|
132 |
-
|
133 |
-
@spaces.GPU
|
134 |
-
def greet(n):
|
135 |
-
print(zero.device) # <-- 'cuda:0' 🤗
|
136 |
-
# return f"Hello {zero + n} Tensor"
|
137 |
|
138 |
|
139 |
-
|
140 |
def start_tryon(dict,garm_img,garment_des,is_checked,is_checked_crop,denoise_steps,seed):
|
141 |
device = "cuda"
|
142 |
|
|
|
1 |
import gradio as gr
|
2 |
from PIL import Image
|
|
|
3 |
|
4 |
from src.tryon_pipeline import StableDiffusionXLInpaintPipeline as TryonPipeline
|
5 |
from src.unet_hacked_garmnet import UNet2DConditionModel as UNet2DConditionModel_ref
|
|
|
126 |
)
|
127 |
pipe.unet_encoder = UNet_Encoder
|
128 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
|
130 |
|
131 |
+
@spaces.GPU
|
132 |
def start_tryon(dict,garm_img,garment_des,is_checked,is_checked_crop,denoise_steps,seed):
|
133 |
device = "cuda"
|
134 |
|