mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-11 23:00:51 +08:00
fix image upload, running from main
This commit is contained in:
parent
e78702d4b9
commit
3216d1c6b0
@ -170,3 +170,6 @@ def main():
|
|||||||
print("\nStopped server")
|
print("\nStopped server")
|
||||||
|
|
||||||
cleanup_temp()
|
cleanup_temp()
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
@ -144,7 +144,7 @@ class PromptServer():
|
|||||||
def get_dir_by_type(dir_type=None):
|
def get_dir_by_type(dir_type=None):
|
||||||
type_dir = ""
|
type_dir = ""
|
||||||
if dir_type is None:
|
if dir_type is None:
|
||||||
dir_type = "../../input"
|
dir_type = "input"
|
||||||
|
|
||||||
if dir_type == "input":
|
if dir_type == "input":
|
||||||
type_dir = folder_paths.get_input_directory()
|
type_dir = folder_paths.get_input_directory()
|
||||||
@ -201,7 +201,7 @@ class PromptServer():
|
|||||||
@routes.post("/upload/image")
|
@routes.post("/upload/image")
|
||||||
async def upload_image(request):
|
async def upload_image(request):
|
||||||
post = await request.post()
|
post = await request.post()
|
||||||
return image_upload(post)
|
return await image_upload(post)
|
||||||
|
|
||||||
@routes.post("/upload/mask")
|
@routes.post("/upload/mask")
|
||||||
async def upload_mask(request):
|
async def upload_mask(request):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user