Skip to content
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

Gradio 5 ImageMask problem with layers #10573

Open
1 task done
ukaprch opened this issue Feb 12, 2025 · 0 comments
Open
1 task done

Gradio 5 ImageMask problem with layers #10573

ukaprch opened this issue Feb 12, 2025 · 0 comments
Labels
bug Something isn't working 🖼️ ImageEditor

Comments

@ukaprch
Copy link

ukaprch commented Feb 12, 2025

Describe the bug

Recently I updated from an older release of Gradio V4.4 to the new V5.15 and after some growing pains I have one problem:
If I have a brush and I want to brush an outline on the canvas with an image, I need to set layers=True and use layer1 for the mask. In the past I didn't need to set layers and I used layer 0 as the mask and image: background. So what changed?

Have you searched existing issues? 🔎

  • I have searched and found no existing issues

Reproduction

import gradio as gr v 5.15

img_input_2 = gr.ImageMask(label="Input with boxes", interactive=True, type='pil', crop_size=(500, 500),
                            canvas_size=(500, 500), layers=True, brush=gr.Brush(colors=["#0000FF"]))

This is the problematic imagemask where I had to set layers=True in order to draw a mask on the image. I had to set layers1 to do the mask. In the past, this wasn't necessary. Is this considered a "New" feature of 5 release?

Screenshot

No response

Logs

System Info

python v12.5
gradio v5.15
windows 10

Severity

I can work around it

@ukaprch ukaprch added the bug Something isn't working label Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 🖼️ ImageEditor
Projects
None yet
Development

No branches or pull requests

2 participants