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

Visualization in the rectangular section does not work #57

Open
zerotwoo002 opened this issue Jun 22, 2023 · 5 comments
Open

Visualization in the rectangular section does not work #57

zerotwoo002 opened this issue Jun 22, 2023 · 5 comments

Comments

@zerotwoo002
Copy link

When I click visualize, the inscription "error" just appears at the bottom. Here are the logs from the console:
Traceback (most recent call last):
File "G:\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 422, in run_predict
output = await app.get_blocks().process_api(
File "G:\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1326, in process_api
data = self.postprocess_data(fn_index, result["prediction"], state)
File "G:\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1260, in postprocess_data
prediction_value = block.postprocess(prediction_value)
File "G:\stable-diffusion-webui\venv\lib\site-packages\gradio\components.py", line 4457, in postprocess
file = self.img_array_to_temp_file(img, dir=self.DEFAULT_TEMP_DIR)
File "G:\stable-diffusion-webui\venv\lib\site-packages\gradio\components.py", line 355, in img_array_to_temp_file
return self.pil_to_temp_file(pil_image, dir, format="png")
TypeError: save_pil_to_file() got an unexpected keyword argument 'format'

@sasori7
Copy link

sasori7 commented Jun 23, 2023

Me too. I'm a new installer. The rest seems to work ok, just the visualizer doesn't.

@Hyoruma69
Copy link

daam, same problem, I hope someone help... Has anyone tried installing an older version?

@QoungYoung
Copy link

Temporary solution:
Under your Stable Diffusion path, find the venv/Lib/site-packages/gradio/components.py
Modify line 355
return self.pil_to_temp_file(pil_image, dir, format="png")
to
return self.pil_to_temp_file(pil_image, dir)
Save and restart
Now it works fine

@zerotwoo002
Copy link
Author

Temporary solution: Under your Stable Diffusion path, find the venv/Lib/site-packages/gradio/components.py Modify line 355 return self.pil_to_temp_file(pil_image, dir, format="png") to return self.pil_to_temp_file(pil_image, dir) Save and restart Now it works fine

Thanks! Now it works

@IrisShard
Copy link

IrisShard commented Jun 26, 2023

Temporary solution: Under your Stable Diffusion path, find the venv/Lib/site-packages/gradio/components.py Modify line 355 return self.pil_to_temp_file(pil_image, dir, format="png") to return self.pil_to_temp_file(pil_image, dir) Save and restart Now it works fine

I changed the line, but it does not work for me; I am still getting the error on the visualization screen.

Traceback (most recent call last):
File "C:\Users\User\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 422, in run_predict
output = await app.get_blocks().process_api(
File "C:\Users\User\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1326, in process_api
data = self.postprocess_data(fn_index, result["prediction"], state)
File "C:\Users\User\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1260, in postprocess_data
prediction_value = block.postprocess(prediction_value)
File "C:\Users\User\stable-diffusion-webui\venv\lib\site-packages\gradio\components.py", line 4457, in postprocess
file = self.img_array_to_temp_file(img, dir=self.DEFAULT_TEMP_DIR)
File "C:\Users\User\stable-diffusion-webui\venv\lib\site-packages\gradio\components.py", line 355, in img_array_to_temp_file
return self.pil_to_temp_file(pil_image, dir)
TypeError: save_pil_to_file() got an unexpected keyword argument 'format'

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants