Spaces:
Runtime error
Runtime error
disable compilation for now
Browse files
app.py
CHANGED
|
@@ -382,11 +382,19 @@ def _apply_torch_compile_optimizations():
|
|
| 382 |
print(" Continuing without compilation (slower but functional)\n")
|
| 383 |
|
| 384 |
|
| 385 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 386 |
if torch.cuda.is_available():
|
| 387 |
-
|
| 388 |
-
|
| 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)
|