Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -192,12 +192,12 @@ def flush():
|
|
192 |
gc.collect()
|
193 |
torch.cuda.empty_cache()
|
194 |
|
195 |
-
@spaces.GPU
|
196 |
-
def clear_gpu():
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
|
202 |
class ControlNetDepthDesignModelMulti:
|
203 |
""" Produces random noise images """
|
@@ -286,6 +286,11 @@ class ControlNetDepthDesignModelMulti:
|
|
286 |
(orig_w, orig_h), Image.Resampling.LANCZOS
|
287 |
)
|
288 |
|
|
|
|
|
|
|
|
|
|
|
289 |
return design_image
|
290 |
|
291 |
|
|
|
192 |
gc.collect()
|
193 |
torch.cuda.empty_cache()
|
194 |
|
195 |
+
# @spaces.GPU
|
196 |
+
# def clear_gpu():
|
197 |
+
# pipe = pipe.to("cpu")
|
198 |
+
# guide_pipe = guide_pipe.to("cpu")
|
199 |
+
# depth_estimator = depth_estimator.to("cpu")
|
200 |
+
# torch.cuda.empty_cache()
|
201 |
|
202 |
class ControlNetDepthDesignModelMulti:
|
203 |
""" Produces random noise images """
|
|
|
286 |
(orig_w, orig_h), Image.Resampling.LANCZOS
|
287 |
)
|
288 |
|
289 |
+
pipe = pipe.to("cpu")
|
290 |
+
guide_pipe = guide_pipe.to("cpu")
|
291 |
+
depth_estimator = depth_estimator.to("cpu")
|
292 |
+
torch.cuda.empty_cache()
|
293 |
+
|
294 |
return design_image
|
295 |
|
296 |
|