1
mirror of https://github.com/comfyanonymous/ComfyUI.git synced 2025-08-02 23:14:49 +08:00

Added ability to save images to temp dir

This commit is contained in:
pythongosssss
2023-03-13 19:34:05 +00:00
parent a50e111815
commit 6db777b348
3 changed files with 28 additions and 4 deletions

View File

@@ -113,7 +113,7 @@ class PromptServer():
async def view_image(request):
if "file" in request.match_info:
type = request.rel_url.query.get("type", "output")
if type != "output" and type != "input":
if type not in ["output", "input", "temp"]:
return web.Response(status=400)
output_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), type)