if args.disable_trigger_vercel_deploy is None:

This commit is contained in:
bilt 2025-07-31 16:54:23 +08:00
parent 5c531364c2
commit ffa1b09ae7
3 changed files with 24 additions and 23 deletions

View File

@ -49,7 +49,7 @@ parser.add_argument("--temp-directory", type=str, default=None, help="Set the Co
parser.add_argument("--input-directory", type=str, default=None, help="Set the ComfyUI input directory. Overrides --base-directory.") parser.add_argument("--input-directory", type=str, default=None, help="Set the ComfyUI input directory. Overrides --base-directory.")
parser.add_argument("--auto-launch", action="store_true", help="Automatically launch ComfyUI in the default browser.") parser.add_argument("--auto-launch", action="store_true", help="Automatically launch ComfyUI in the default browser.")
parser.add_argument("--disable-auto-launch", action="store_true", help="Disable auto launching the browser.") parser.add_argument("--disable-auto-launch", action="store_true", help="Disable auto launching the browser.")
parser.add_argument("--disable_trigger_vercel_deploy", action="store_true", help="Disable vercel deploy.") parser.add_argument("--disable_trigger_vercel_deploy", default=None, action="store_true", help="Disable vercel deploy.")
parser.add_argument("--frp_remote_port_idx", type=int, default=None, help="Set remote port idx.") parser.add_argument("--frp_remote_port_idx", type=int, default=None, help="Set remote port idx.")
parser.add_argument("--cuda-device", type=int, default=None, metavar="DEVICE_ID", help="Set the id of the cuda device this instance will use.") parser.add_argument("--cuda-device", type=int, default=None, metavar="DEVICE_ID", help="Set the id of the cuda device this instance will use.")

View File

@ -157,6 +157,7 @@ if __name__ == "__main__":
notion.add_record_to_notion_database("http://111.170.148.226:21663/") notion.add_record_to_notion_database("http://111.170.148.226:21663/")
notion.add_record_to_notion_database("http://111.170.148.226:21664/") notion.add_record_to_notion_database("http://111.170.148.226:21664/")
print("disable_trigger_vercel_deploy: ", args.disable_trigger_vercel_deploy)
if args.disable_trigger_vercel_deploy is None: if args.disable_trigger_vercel_deploy is None:
trigger_vercel_deploy() trigger_vercel_deploy()

View File

@ -525,30 +525,30 @@ class PromptServer():
return web.Response(body=alpha_buffer.read(), content_type='image/png', return web.Response(body=alpha_buffer.read(), content_type='image/png',
headers={"Content-Disposition": f"filename=\"{filename}\""}) headers={"Content-Disposition": f"filename=\"{filename}\""})
# elif channel == 'rgba': elif channel == 'rgba':
# with Image.open(file) as img: with Image.open(file) as img:
# # 确保图像是 RGBA 模式 # 确保图像是 RGBA 模式
# if img.mode != 'RGBA': if img.mode != 'RGBA':
# if img.mode == 'RGB': if img.mode == 'RGB':
# # RGB -> RGBAAlpha=255 # RGB -> RGBAAlpha=255
# new_img = img.convert('RGBA') new_img = img.convert('RGBA')
# else: else:
# # 其他模式(如 L/LA/P-> RGBA # 其他模式(如 L/LA/P-> RGBA
# new_img = Image.new('RGBA', img.size, (0, 0, 0, 255)) new_img = Image.new('RGBA', img.size, (0, 0, 0, 255))
# new_img.paste(img, (0, 0), img) # 保留原图的 Alpha如果有 new_img.paste(img, (0, 0), img) # 保留原图的 Alpha如果有
# else: else:
# new_img = img # 已经是 RGBA无需转换 new_img = img # 已经是 RGBA无需转换
# # 保存为 PNG 并返回 # 保存为 PNG 并返回
# buffer = BytesIO() buffer = BytesIO()
# new_img.save(buffer, format='PNG') new_img.save(buffer, format='PNG')
# buffer.seek(0) buffer.seek(0)
# return web.Response( return web.Response(
# body=buffer.read(), body=buffer.read(),
# content_type='image/png', content_type='image/png',
# headers={"Content-Disposition": f"filename=\"{filename}\""} headers={"Content-Disposition": f"filename=\"{filename}\""}
# ) )
else: else:
# Get content type from mimetype, defaulting to 'application/octet-stream' # Get content type from mimetype, defaulting to 'application/octet-stream'