Oysiyl commited on
Commit
8eb6a33
·
1 Parent(s): 0d712f8

disable compilation for now

Browse files
Files changed (1) hide show
  1. app.py +12 -4
app.py CHANGED
@@ -382,11 +382,19 @@ def _apply_torch_compile_optimizations():
382
  print(" Continuing without compilation (slower but functional)\n")
383
 
384
 
385
- # Only apply torch.compile on CUDA (not on MPS for local testing)
 
 
 
 
 
 
 
 
 
386
  if torch.cuda.is_available():
387
- _apply_torch_compile_optimizations()
388
- else:
389
- print("ℹ️ Skipping torch.compile (not on CUDA)")
390
 
391
 
392
  @spaces.GPU(duration=30)
 
382
  print(" Continuing without compilation (slower but functional)\n")
383
 
384
 
385
+ # DISABLED: torch.compile causes graph breaks in ComfyUI timestep_embedding
386
+ # Error: "Cannot construct `ConstantVariable` for value of type <class 'torch.device'>"
387
+ # This is a known PyTorch limitation - torch.compile can't handle torch.device in graph
388
+ # Uncomment when PyTorch/ComfyUI fixes ConstantVariable handling for torch.device
389
+ #
390
+ # if torch.cuda.is_available():
391
+ # _apply_torch_compile_optimizations()
392
+ # else:
393
+ # print("ℹ️ Skipping torch.compile (not on CUDA)")
394
+
395
  if torch.cuda.is_available():
396
+ print("ℹ️ torch.compile disabled (compatibility issues with ComfyUI)")
397
+ print(" App uses bfloat16 + VAE tiling + cache clearing for optimization")
 
398
 
399
 
400
  @spaces.GPU(duration=30)