实际上是因为comfyui里面判断了gligen-gui的websocket连接和服务端口不符导致的
具体在comfyui的server.py的134行,注释掉就好了
if parsed.port is None: #if origin doesn't have a port strip it from the host to handle weird browsers, same for host
host_domain = host_domain_parsed.hostname
if host_domain_parsed.port is None:
origin_domain = parsed.hostname
#if loopback and host_domain is not None and origin_domain is not None and len(host_domain) > 0 and len(origin_domain) > 0:
# if host_domain != origin_domain:
# logging.warning("WARNING: request with non matching host and origin {} != {}, returning 403".format(host_domain, origin_domain))
# return web.Response(status=403)
if request.method == "OPTIONS":
response = web.Response()
else:
response = await handler(request)