xinjjj commited on
Commit
41cb729
·
1 Parent(s): 0562108

fix(zerogpu): bypass PyTorch CUDA caching allocator

Browse files
Files changed (1) hide show
  1. app.py +2 -0
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