sd-webui-complete-setup icon indicating copy to clipboard operation
sd-webui-complete-setup copied to clipboard

error 413 when using png info

Open leviackermann59 opened this issue 8 months ago • 7 comments

im using forge on paperspace and i keep getting this error when i try to use the PNG info tab.

i checked the nginx.conf file and the client max body size is already set to 1024M. the file I'm uploading is 2MB in size.

Image

leviackermann59 avatar Mar 06 '25 07:03 leviackermann59

Where did you see the nginx.conf file ? Because I didn't setup nginx on Paperspace. Also, 1024M means 1GB.

ffxvs avatar Mar 06 '25 07:03 ffxvs

found it here etc/nginx/nginx.conf

leviackermann59 avatar Mar 06 '25 07:03 leviackermann59

Can you upload the file here?

ffxvs avatar Mar 06 '25 07:03 ffxvs

cant upload the file but here is the contents of it

events { worker_connections 2048; }

http {
    client_max_body_size 1024M;

    # Stable Diffusion Webui
    server {
        listen 3001;

        location /ws {
            proxy_http_version 1.1;
            proxy_set_header Accept-Encoding gzip;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            add_header Cache-Control no-cache;
            proxy_set_header Host $host;

            proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
	        proxy_set_header   X-Real-IP		$remote_addr;
            proxy_pass http://localhost:3000;
        }

        location /queue/join {
            proxy_http_version 1.1;
            proxy_set_header Accept-Encoding gzip;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            add_header Cache-Control no-cache;
            proxy_set_header Host $host;

            proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
	        proxy_set_header   X-Real-IP		$remote_addr;
            proxy_pass http://localhost:3000;
        }

        location / {
            add_header Cache-Control no-cache;
            proxy_pass http://localhost:3000;
            proxy_http_version 1.1;
            proxy_set_header Accept-Encoding gzip;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Host $host;

            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;


            proxy_intercept_errors on;
            error_page 502 =200 @502;
        }

        location /README.md{
            root /usr/share/nginx/html;
        }

        location @502 {
            add_header Cache-Control no-cache;
            root /usr/share/nginx/html;
            rewrite ^(.*)$ /readme.html break;
        }
    }
}

leviackermann59 avatar Mar 06 '25 09:03 leviackermann59

That config file is for Runpod. And since I didn't setup the nginx server on Paperspace, I suspect that Paperspace's default nginx server is causing the error. A possible solution is that we have to use our own nginx, but I'm not too sure.

ffxvs avatar Mar 06 '25 09:03 ffxvs

i just wanna add that this issue seems to happen only when i use gradio link. when i use paperspace's link, i png info works

leviackermann59 avatar Mar 06 '25 13:03 leviackermann59

Wait, are you sure that's a gradio link? not a ngrok link? Because gradio link are not enabled by default. Did you enable it yourself?

ffxvs avatar Mar 07 '25 06:03 ffxvs