Add --max-upload-size argument, the default is 100MB.

This commit is contained in:
comfyanonymous
2023-10-29 03:55:46 -04:00
parent aac8fc99d6
commit a12cc05323
2 changed files with 4 additions and 1 deletions

View File

@@ -82,7 +82,8 @@ class PromptServer():
if args.enable_cors_header:
middlewares.append(create_cors_middleware(args.enable_cors_header))
self.app = web.Application(client_max_size=104857600, middlewares=middlewares)
max_upload_size = round(args.max_upload_size * 1024 * 1024)
self.app = web.Application(client_max_size=max_upload_size, middlewares=middlewares)
self.sockets = dict()
self.web_root = os.path.join(os.path.dirname(
os.path.realpath(__file__)), "web")