herimor commited on
Commit
26aa528
·
1 Parent(s): 86c5e99

Disable torch dynamo

Browse files
Files changed (1) hide show
  1. app.py +8 -0
app.py CHANGED
@@ -1,3 +1,11 @@
 
 
 
 
 
 
 
 
1
  import json
2
  from pathlib import Path
3
 
 
1
+ import os
2
+
3
+ # Disable PyTorch dynamo/inductor globally
4
+ os.environ["TORCHDYNAMO_DISABLE"] = "1"
5
+ os.environ["TORCHINDUCTOR_DISABLE"] = "1"
6
+ import torch._dynamo as dynamo
7
+ dynamo.config.suppress_errors = True
8
+
9
  import json
10
  from pathlib import Path
11