-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Handle GIFs correctly in Image component #1965
Comments
hello, have you solved it? |
I am also curious if you figured this out. |
No, I couldn't. |
What if instead of creating a new image (frame) and pasting the original, you did: frame = img.seek(i) That's how I would do it. I still don't see why your method failed though. Edit: please just ignore my comment - for some reason I was reading this for the PIL library, not Gradio |
I am also experiencing this same issue. The only way I've found to upload a gif with all frames to Image component is to provide the path to a hard drive file. A less elegant workaround that I've been using is to use the File component to upload the gif and then save the gif to hard drive and then input the hard drive gif to an Image component. Would be really nice if the Image component could just accept an animated gif via drag and drop and hold it for use in the code. |
I'm guessing this is related to converting everything to PNG on the backend c.f. #7486 |
Describe the bug
Hello, I had tried to upload GIF. I encountered an issue. I saw that when I wanted to split the GIF file frame by frame, it only took the first frame. This situation occurs in both local and embedded environments. Here's the code:
Output:
As you can see, there is only one frame of GIF file. I didn't encounter this issue when I wasn't using the Gradio. But, I want to implement this code on Gradio for GIF processing. Gradio just taking the first frame of GIF.
Is there an existing issue for this?
Reproduction
You can try to upload GIF on Huggingface Space. But, It will not return anything. You have to check out the logs.
Screenshot
No response
Logs
System Info
Severity
annoying
The text was updated successfully, but these errors were encountered: