-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
gr.Image
with tool=sketch
can receive wrong typed argument in preprocess
#3623
Comments
Also happens with #!/usr/bin/env python
import os
import json
import numpy as np
import gradio as gr
def fn(im1, im2, im3, im4):
return []
demo = gr.Interface(
fn,
inputs=[
gr.Image(label="Image"),
gr.Image(label="Image w/ Cropper", tool="select"),
gr.Image(label="Image w/ Sketch", tool="sketch"),
gr.Image(label="Image w/ Color Sketch", tool="color-sketch"),
],
outputs=[
],
examples=[
[
os.path.join(os.path.dirname(__file__), "images/cheetah1.jpg"),
os.path.join(os.path.dirname(__file__), "images/cheetah1.jpg"),
os.path.join(os.path.dirname(__file__), "images/cheetah1.jpg"),
os.path.join(os.path.dirname(__file__), "images/cheetah1.jpg"),
]
]
* 3,
title="Kitchen Sink",
description="Try out all the components!",
article="Learn more about [Gradio](http://gradio.app)",
cache_examples=True,
)
demo.launch(server_port=9876)
|
I think this is an even simpler example. If you upload an image, and then collapse and uncollapse the accordion, the same error occurs after clicking the button, and furthermore before even clicking the button the image disappears from the UI entirely, rendering the image component unusable. import gradio as gr
with gr.Blocks() as demo:
with gr.Accordion(label='test'):
img = gr.Image(source='upload', tool='sketch')
button = gr.Button("Print to console")
button.click(lambda x: print(x), inputs=[img], outputs=[])
demo.launch() This is a pretty large issue for the ControlNet extension for the Stable Diffusion web UI currently, because the interface for extensions tend be accordions that the user often collapses to save space. |
I think this may have been resolved by #4073? I can run the demo I mentioned above just fine now. |
Two different issues are at play here. The bug that was affecting your demo has been fixed, but there is still a bug affecting @space-nuko's original example |
Moving to 4.0 milestone when we will rework the |
Describe the bug
Sometimes I can no longer send an image over to another image component, it causes an error
Is there an existing issue for this?
Reproduction
gr.Image
on pageScreenshot
No response
Logs
System Info
Severity
blocking upgrade to latest gradio version
The text was updated successfully, but these errors were encountered: