Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,8 +9,8 @@ import subprocess, json, tempfile, sys
|
|
| 9 |
COMFY_DIR = Path("ComfyUI")
|
| 10 |
WORKFLOW_JSON = Path("workflow_api.json")
|
| 11 |
|
| 12 |
-
#
|
| 13 |
-
LOGS_DIR = Path("
|
| 14 |
LOGS_DIR.mkdir(parents=True, exist_ok=True)
|
| 15 |
|
| 16 |
def patch_workflow(wf, pic_path, face_path, prompt):
|
|
@@ -47,7 +47,7 @@ def run(picture, face, positive):
|
|
| 47 |
"--workflow", str(tmp_wf)
|
| 48 |
], cwd=COMFY_DIR, capture_output=True, text=True)
|
| 49 |
|
| 50 |
-
#
|
| 51 |
log_file = LOGS_DIR / "comfy.txt"
|
| 52 |
with open(log_file, "w") as f:
|
| 53 |
f.write("=== STDOUT ===\n")
|
|
|
|
| 9 |
COMFY_DIR = Path("ComfyUI")
|
| 10 |
WORKFLOW_JSON = Path("workflow_api.json")
|
| 11 |
|
| 12 |
+
# ✅ Correction ici : logs en dossier local
|
| 13 |
+
LOGS_DIR = Path("logs")
|
| 14 |
LOGS_DIR.mkdir(parents=True, exist_ok=True)
|
| 15 |
|
| 16 |
def patch_workflow(wf, pic_path, face_path, prompt):
|
|
|
|
| 47 |
"--workflow", str(tmp_wf)
|
| 48 |
], cwd=COMFY_DIR, capture_output=True, text=True)
|
| 49 |
|
| 50 |
+
# ✅ Sauvegarde des logs dans ./logs
|
| 51 |
log_file = LOGS_DIR / "comfy.txt"
|
| 52 |
with open(log_file, "w") as f:
|
| 53 |
f.write("=== STDOUT ===\n")
|