opparco / stable-diffusion-webui-two-shot

Latent Couple extension (two shot diffusion port)
MIT License
711 stars 150 forks source link

Visualization in the rectangular section does not work #57

Open zerotwoo002 opened 1 year ago

zerotwoo002 commented 1 year ago

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 commented 1 year ago

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

Hyoruma69 commented 1 year ago

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

QoungYoung commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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