Added support for VHS upload directory node

This commit is contained in:
Nathan
2024-05-16 16:11:42 -07:00
parent 4519fa7581
commit f66de3c822
4 changed files with 39 additions and 5 deletions
+12
View File
@@ -47,6 +47,18 @@ async def validate_input_path(request):
print("Error:", e)
return web.json_response({ "error": e }, status=400)
@server.PromptServer.instance.routes.post("/comfy-cloud/validate-path")
async def validate_path_directory(request):
try:
data = await request.json()
input_path = data.get("path")
exists = os.path.exists(input_path)
return web.json_response({ "exists": exists }, status=200)
except Exception as e:
print("Error:", e)
return web.json_response({ "error": e }, status=400)
@server.PromptServer.instance.routes.post("/comfy-cloud/validate-prompt")
async def comfy_cloud_validate_prompt(request):
+3
View File
@@ -10,6 +10,9 @@ class FileProgress:
progress_dict: Dict[str, FileProgress] = {}
def progress_update(filename, value, max):
# filename can be PosixPath
filename = str(filename)
progress = progress_dict.get(filename, FileProgress(0, 0))
progress.value = value
progress.max = max