-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
regression 4.18->4.19 gallery component loading breaks #7435
Comments
Hi @thiswillbeyourgithub I just tested the latest version of the import pickle
from PIL import Image
import io
def pickle_image(image_path, pickle_path):
with Image.open(image_path) as image:
img_byte_arr = io.BytesIO()
image.save(img_byte_arr, format=image.format)
img_byte_arr = img_byte_arr.getvalue()
with open(pickle_path, 'wb') as pickle_file:
pickle.dump(img_byte_arr, pickle_file)
def unpickle_image(pickle_path):
with open(pickle_path, 'rb') as pickle_file:
img_byte_arr = pickle.load(pickle_file)
image = Image.open(io.BytesIO(img_byte_arr))
return image
# Paths
image_path = 'cheetah.jpg'
pickle_path = 'image.pickle'
pickle_image(image_path, pickle_path)
unpickled_image = unpickle_image(pickle_path)
with gr.Blocks() as demo:
gr.Gallery([unpickled_image]*10)
demo.launch() Awaiting your repro! |
Thanks for the quick reply! I checked again and noticed a message in the chromium log: Indeed I'm using a self signed certificate so I tried turning off the ssl the image loads fine in chromium. Turning the ssl on breaks the image in chromium but not in firefox. I'm guessing this is due to #7411 So should I change my browser setup or was this an unintentional bug? |
Can you provide a step-by-step repro? Seems like an unintentional bug, though its very strange that you're seeing different behavior per browser? |
Progress! I managed to reproduce with your example. The image load fine in chromium with SSL on if I leave I've always been connecting to gradio using chromium with address My chromium version is The self signed certificate was created using (I think) this command: My repro code:
|
Can you please share your repro @riogesulgon ? |
You can check out this repository to reproduce the issue. Using |
Hi @riogesulgon ! Looks like this is fixed in the ![]() Will close for now. Please let us know if the future release does not fix this issue and we can reopen! Thanks. |
Describe the bug
Hi, I unfortunately don't have the time to produce a full reproduction but when I upgraded from 4.18.0 to 4.19.0 I noticed that my gallery components that loads from a pickle value seemed broken.
Changing the version back and forth toggle completely the bug. There are nothing in the logs.
4.18:

4.19:

Loads the correct number of images in the gallery but they are broken:
Looking at the changelog I thought that maybe it was because I tend to set postprocess=False to my events but actually no events are even triggered yet, it's just the value at component instantiation.
Replacing the value of the gallery (using my already existing buttons to load an image from clipboard) works fine and the image displays correctly. But I have code that should save the new image and re load them at startup and this is not working (the new image is broken on startup too)
Have you searched existing issues? 🔎
Reproduction
Screenshot
No response
Logs
No response
System Info
gradio 4.18 python 3.11.7 I can't update gradio while this isn't fixed
Severity
Blocking usage of gradio
The text was updated successfully, but these errors were encountered: