ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

Paperspace usage?

Open jayceftg opened this issue 1 year ago • 1 comments

This is not a comfyUI issue, but a paperspace one, but am here to check if there's any solutions.

So I have been using comfyUI on paperspace's free servers for a while with this notebook script: https://github.com/comfyanonymous/ComfyUI/blob/master/notebooks/comfyui_colab.ipynb

However, they informed me that using cloudflare or tunneling with comfyUI there could be bannable. They say that deployment on Gradio (like automatic1111's webui) is fine.

Is there some way to do such a deployment?

jayceftg avatar Feb 12 '24 13:02 jayceftg

There is a dedicated ComfyUI notebook for Paperspace https://github.com/TheLastBen/fast-stable-diffusion

TheLastBen avatar Feb 13 '24 18:02 TheLastBen

There is a dedicated ComfyUI notebook for Paperspace https://github.com/TheLastBen/fast-stable-diffusion

Thanks very much, captain. It worked by creating a paperspacegradient.com official tunnel for the local port? Is it done automatically by Paperspace? I browsed through the notebook but not sure which part is related to the generation of this url?

jayceftg avatar Mar 15 '24 18:03 jayceftg

you run the cells down to "start comfyui" it will give you a link to the interface

TheLastBen avatar Mar 15 '24 21:03 TheLastBen

you run the cells down to "start comfyui" it will give you a link to the interface

Thanks. Yes, I got the link. However, I didn't find which one of the args or something else was related to the link? Is it from ComfyUI's script or your script?

jayceftg avatar Mar 16 '24 01:03 jayceftg

I'm not sure what you mean

TheLastBen avatar Mar 16 '24 17:03 TheLastBen

I'm not sure what you mean

Thanks. I was asking how a url like 'https://tensorboard-n5tozx0ylb.clg07azjl.paperspacegradient.com/' was generated for accessing ComfyUI on the local port?

From your code: Args="--listen --port 6006 --preview-method auto" on 'https://console.paperspace.com/github/TheLastBen/PPS?machine=Free-GPU&file=%2FPPS-ComfyUI.ipynb', you run ComfyUI on the local 6006 port, which could not be accessed remotely if not for you generating urls like 'https://tensorboard-n5tozx0ylb.clg07azjl.paperspacegradient.com/'.

This seems like a tunnelling service provided by paperspacegradient as it's in the url? But I didn't find info about this. Maybe that is related to the 'PAPERSPACE_FQDN' variable in 'https://huggingface.co/datasets/TheLastBen/PPS/raw/main/Scripts/mainppsComfy.py'?

Could you talk a bit about what sets up the tunnel?

jayceftg avatar Mar 16 '24 21:03 jayceftg

it is paperspace provided tunneling service

TheLastBen avatar Mar 17 '24 12:03 TheLastBen

it is paperspace provided tunneling service

Hi, really appreciate all the previous help. However, I encounter something I couldn't solve. When using your script, it generates a url like https://tensorboard-nicxemghpy.clg07azjl.paperspacegradient.com/.

Using it (tensorboard-nicxemghpy.clg07azjl.paperspacegradient.com) with the official example API script https://github.com/comfyanonymous/ComfyUI/blob/master/script_examples/websockets_api_example.py gives an error:

Traceback (most recent call last): File "c:\Users\AdminJ\Desktop\proj6related\comfyapi\websockets_api_example.py", line 215, in ws.connect("ws://{}/ws?clientId={}".format(server_address, client_id)) File "C:\Program Files\Python310\lib\site-packages\websocket_core.py", line 266, in connect self.sock, addrs = connect( File "C:\Program Files\Python310\lib\site-packages\websocket_http.py", line 128, in connect hostname, port_from_url, resource, is_secure = parse_url(url) File "C:\Program Files\Python310\lib\site-packages\websocket_url.py", line 62, in parse_url raise ValueError("scheme %s is invalid" % scheme) ValueError: scheme https is invalid

So it seems although the official script is trying to use ws, the url is converted from ws:// to htts:// so the ws related code couldn't run. Have you encountered this before?

jayceftg avatar Mar 23 '24 01:03 jayceftg

it is paperspace provided tunneling service

Probably it's related to tunnel restrictions or something. Tried the same offical ws script with Cloudflare tunnel it's 403 error. But 127.0.0.1:port would work.

jayceftg avatar Mar 23 '24 02:03 jayceftg