Spaces:
Running on Zero
Running on Zero
fix(zerogpu): bypass PyTorch CUDA caching allocator
Browse files
app.py
CHANGED
|
@@ -17,6 +17,8 @@
|
|
| 17 |
|
| 18 |
import os
|
| 19 |
|
|
|
|
|
|
|
| 20 |
os.environ["GRADIO_APP"] = "texture_edit"
|
| 21 |
import gradio as gr
|
| 22 |
from app_style import custom_theme, image_css, lighting_css
|
|
|
|
| 17 |
|
| 18 |
import os
|
| 19 |
|
| 20 |
+
# ZeroGPU/cu128 can hit an NVML assert inside PyTorch CUDACachingAllocator.
|
| 21 |
+
os.environ.setdefault("PYTORCH_NO_CUDA_MEMORY_CACHING", "1")
|
| 22 |
os.environ["GRADIO_APP"] = "texture_edit"
|
| 23 |
import gradio as gr
|
| 24 |
from app_style import custom_theme, image_css, lighting_css
|