Acly / comfyui-tooling-nodes

Nodes for using ComfyUI as a backend for external tools. Send and receive images directly without filesystem upload/download.
GNU General Public License v3.0
319 stars 38 forks source link

Incorrect padding #3

Closed twitset closed 11 months ago

twitset commented 1 year ago

When pasting a base64 encoded image into the textbox, this error message occurs

image

Acly commented 1 year ago

Please provide the full base64 string (as text) so I can check.

twitset commented 1 year ago

bad_b64.txt

twitset commented 1 year ago

It also says that the image file is truncated with this: trunc.txt

https://justpaste.it/1z0cc

Acly commented 1 year ago

Seems to be a UI issue. Both b64 strings work fine if I send them directly as part of a prompt.

You can inspect the POST request which is sent by the UI to the server in the browser, and observe the b64 string is truncated there. I think in both cases it is cut off at the first occurence of //.

I don't think this can be solved without modifying the front-end/UI. There are probably better ways to solve whatever you're trying to do. The node is geared towards other tools/front-ends which send a prompt via POST directly, where this issue doesn't occur.

42lux commented 12 months ago

I had the same problem with my base64 nodes disable multiline and you are fine.

Acly commented 11 months ago

That works, thanks!