-
Notifications
You must be signed in to change notification settings - Fork 86
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
TypeError: save_pil_to_file() got an unexpected keyword argument 'format' #120
Comments
@777777lkj I have never seen this error before, so at this point I cannot imagine either the cause or the solution. If there is a case where the error does not occur, could you please tell me the difference in settings and environment from that case? If you can give me that information, I may be able to reproduce the phenomenon and determine the cause from that information. |
@ototadana I'm not entirely sure, but I think this problem is not with this extension, but the webui instead. |
@iamrohitanshu The cause seems to be that the save_pil_to_file method overridden by SD Web UI (-1.3.2) does not match the arguments required by gradio.
However, the latest version of the Web UI (1.4.0) has the following fixes and should work fine. I am not sure why this problem is occurring. It may be a distribution-specific problem that does not occur with the original Web UI. @777777lkj @player99963 |
After testing, the problems have all been solved. |
This issue occurred when updating to the latest version
To create a public link, set
share=True
inlaunch()
.Startup time: 11.2s (import torch: 1.0s, import gradio: 0.7s, import ldm: 0.3s, other imports: 0.6s, load scripts: 3.3s, create ui: 2.9s, gradio launch: 2.4s).
number of faces: 1
prompt for the face: <lora:face (1):1>
Traceback (most recent call last):
File "D:\sd-webui-aki\sd-webui-aki-v4\py310\lib\site-packages\gradio\routes.py", line 422, in run_predict
output = await app.get_blocks().process_api(
File "D:\sd-webui-aki\sd-webui-aki-v4\py310\lib\site-packages\gradio\blocks.py", line 1326, in process_api
data = self.postprocess_data(fn_index, result["prediction"], state)
File "D:\sd-webui-aki\sd-webui-aki-v4\py310\lib\site-packages\gradio\blocks.py", line 1260, in postprocess_data
prediction_value = block.postprocess(prediction_value)
File "D:\sd-webui-aki\sd-webui-aki-v4\py310\lib\site-packages\gradio\components.py", line 4457, in postprocess
file = self.img_array_to_temp_file(img, dir=self.DEFAULT_TEMP_DIR)
File "D:\sd-webui-aki\sd-webui-aki-v4\py310\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'
提示:Python 运行时抛出了一个异常。请检查疑难解答页面。
number of faces: 1
prompt for the face: <lora:face (1):1>
Traceback (most recent call last):
File "D:\sd-webui-aki\sd-webui-aki-v4\py310\lib\site-packages\gradio\routes.py", line 422, in run_predict
event_id = getattr(body, "event_id", None)
File "D:\sd-webui-aki\sd-webui-aki-v4\py310\lib\site-packages\gradio\blocks.py", line 1326, in process_api
):
File "D:\sd-webui-aki\sd-webui-aki-v4\py310\lib\site-packages\gradio\blocks.py", line 1260, in postprocess_data
output = []
File "D:\sd-webui-aki\sd-webui-aki-v4\py310\lib\site-packages\gradio\components.py", line 4457, in postprocess
File "D:\sd-webui-aki\sd-webui-aki-v4\py310\lib\site-packages\gradio\components.py", line 355, in img_array_to_temp_file
TypeError: save_pil_to_file() got an unexpected keyword argument 'format'
提示:Python 运行时抛出了一个异常。请检查疑难解答页面。
The text was updated successfully, but these errors were encountered: