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

Output images are downloaded to the current directory when using gradio_client for gr.Gallery #4494

Closed
1 task done
hysts opened this issue Jun 13, 2023 · 2 comments · Fixed by #4501
Closed
1 task done
Assignees
Labels
bug Something isn't working

Comments

@hysts
Copy link
Collaborator

hysts commented Jun 13, 2023

Describe the bug

Not sure if this is a bug or as intended, but gradio_client.Client saves output images of gr.Gallery in a directory under the current directory, while files are downloaded to a directory under /tmp for gr.Audio, gr.Model3D, and gr.Video, and gr.Image is downloaded to /tmp.

I don't like this behavior because it clutters my working directory and because it's not easy to delete generated directories as they have random names generated by uuid.uuid4().

It would be nice if the outputs of gr.Gallery are also downloaded to a directory under /tmp.

Is there an existing issue for this?

  • I have searched the existing issues

Reproduction

from gradio_client import Client

client = Client('stabilityai/stable-diffusion')
out = client.predict('an astronaut riding a horse', '', 9, fn_index=1)

Screenshot

No response

Logs

n/a

System Info

gradio==3.34.0
gradio_client==0.2.6

Severity

annoying

@hysts hysts added the bug Something isn't working label Jun 13, 2023
@abidlabs
Copy link
Member

Looks like a bug indeed!

@abidlabs abidlabs self-assigned this Jun 13, 2023
@abidlabs
Copy link
Member

This is why the working directory gets cluttered when running the pytests locally as well, which has been annoying me for a while. Will fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants