fix image upload, running from main

This commit is contained in:
Benjamin Berman 2023-08-04 15:43:41 -07:00
parent e78702d4b9
commit 3216d1c6b0
3 changed files with 8 additions and 3 deletions

View File

@ -170,3 +170,6 @@ def main():
print("\nStopped server")
cleanup_temp()
if __name__ == "__main__":
main()

View File

@ -144,7 +144,7 @@ class PromptServer():
def get_dir_by_type(dir_type=None):
type_dir = ""
if dir_type is None:
dir_type = "../../input"
dir_type = "input"
if dir_type == "input":
type_dir = folder_paths.get_input_directory()
@ -201,7 +201,7 @@ class PromptServer():
@routes.post("/upload/image")
async def upload_image(request):
post = await request.post()
return image_upload(post)
return await image_upload(post)
@routes.post("/upload/mask")
async def upload_mask(request):

View File

@ -1,2 +1,4 @@
from comfy.cmd.main import main
main()
if __name__ == "__main__":
main()