Closed aekaisato closed 2 years ago
This is a bug of Gradio, I think it was mentioned it's potentially due to the way they do their SSH tunnelling or something. If generation time takes longer than ~60 seconds.
https://github.com/gradio-app/gradio/issues/2111 https://github.com/gradio-app/gradio/issues/1337
Colab issue, not a bug. As in, it's just something that happens when using colab, it's not a bug in the notebook itself.
Describe the bug I am currently using altryne's colab for the WebUI, and any generations with 3 or more batches of images don't output onto Gradio. However, they save to Google Drive perfectly fine. I'll put much more detail to (hopefully) help debug in "additional context".
To Reproduce Steps to reproduce the behavior:
Expected behavior Images would display on gallery component in the WebUI over multiple generations, not just the first one.
Screenshots
Desktop (please complete the following information):
Additional context I monitored the console and network tabs in Firefox DevTools, and found that
/predict
POST request actually does complete, but aDOMException
is thrown. Looking at the response JSON, I found that there was typically one image that was sent corrupted, and doesn't display in some image viewers. Additionally, pngcheck returnszlib: inflate error = -3 (data error)
. Since the images successfully save to Google Drive uncorrupted, the images are actually generated successfully, they just aren't sent properly to the browser client. I decoded the base64 PNGs for some generations, both uncorrupted and corrupted, and placed them with their uncorupted Google Drive outputs and the JSON response data for the generation: 4 batches generated twice with the same seed - 4-batch_sameseed.zip generating images, increasing the number by 1 every time - n-batch.zip The corrupted images have some amount of "correct" data at the start of the base64 string, but it eventually cuts off and is replaced with improper data I'm not sure the source of. My file manager preview thumbnail shows other images in the data, but GIMP shows it as cutting off, and my image viewer, nomacs, is unable to open the file entirely. What's perhaps even more baffling is that Chromium throwsnet::ERR_HTTP2_PROTOCOL_ERROR 200
in the exact same circumstances as the DOMException, where generating one or two images works fine, but three or more throws and error. In Chromium I am unable to access the JSON output. I have nothing else to add with this info, but I hope it helps.