Disable torch.compile and fix video display
All checks were successful
Build and Push Docker Image / build (push) Successful in 33m17s
All checks were successful
Build and Push Docker Image / build (push) Successful in 33m17s
- Disable torch.compile (inductor -> disabled) to reduce cold start time - Fix handler to detect video type from file extension, not output key - Fix HTML to check filename extension for video display 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
15
handler.py
15
handler.py
@@ -341,6 +341,14 @@ def poll_for_completion(prompt_id: str, timeout: int = MAX_TIMEOUT) -> dict:
|
||||
raise TimeoutError(f"Workflow execution timed out after {timeout}s")
|
||||
|
||||
|
||||
def get_file_type(filename: str) -> str:
|
||||
"""Determine file type from extension."""
|
||||
ext = Path(filename).suffix.lower()
|
||||
if ext in [".mp4", ".webm", ".gif", ".mov", ".avi", ".mkv"]:
|
||||
return "video"
|
||||
return "image"
|
||||
|
||||
|
||||
def get_output_files(history: dict) -> list:
|
||||
"""Extract output file info from history."""
|
||||
outputs = []
|
||||
@@ -349,12 +357,13 @@ def get_output_files(history: dict) -> list:
|
||||
return outputs
|
||||
|
||||
for node_id, node_output in history["outputs"].items():
|
||||
# Handle image outputs
|
||||
# Handle image outputs (note: SaveVideo sometimes puts videos here)
|
||||
if "images" in node_output:
|
||||
for img in node_output["images"]:
|
||||
filename = img["filename"]
|
||||
outputs.append({
|
||||
"type": "image",
|
||||
"filename": img["filename"],
|
||||
"type": get_file_type(filename),
|
||||
"filename": filename,
|
||||
"subfolder": img.get("subfolder", ""),
|
||||
"type_folder": img.get("type", "output")
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user