webui报错

升级Webui时报错如下时

升级下gradio即可,pip install -U gradio

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Traceback (most recent call last):
File "/user/stable-diffusion-webui/webui.py", line 340, in <module>
webui()
File "/user/stable-diffusion-webui/webui.py", line 243, in webui
shared.demo = modules.ui.create_ui()
File "/user/stable-diffusion-webui/modules/ui.py", line 448, in create_ui
with gr.Blocks(analytics_enabled=False) as txt2img_interface:
File "/user/anaconda3/envs/webui/lib/python3.10/site-packages/gradio/blocks.py", line 486, in __init__
super().__init__(render=False, **kwargs)
File "/user/stable-diffusion-webui/modules/scripts.py", line 561, in BlockContext_init
add_classes_to_gradio_component(self)
File "/user/stable-diffusion-webui/modules/scripts.py", line 529, in add_classes_to_gradio_component
comp.elem_classes = ["gradio-" + comp.get_block_name(), *(comp.elem_classes or [])]
AttributeError: 'Blocks' object has no attribute 'elem_classes


Traceback (most recent call last):
File "/user/stable-diffusion-webui/modules/ui.py", line 460, in create_ui
txt2img_prompt, txt2img_prompt_styles, txt2img_negative_prompt, submit, _, _, txt2img_prompt_style_apply, txt2img_save_style, txt2img_paste, extra_networks_button, token_counter, token_button, negative_token_counter, negative_token_button = create_toprow(is_img2img=False)
File "/user/stable-diffusion-webui/modules/ui.py", line 288, in create_toprow
prompt = gr.Textbox(label="Prompt", elem_id=f"{id_part}_prompt", show_label=False, lines=3, placeholder="Prompt (press Ctrl+Enter or Alt+Enter to generate)")
File "/user/anaconda3/envs/webui/lib/python3.10/site-packages/gradio/components.py", line 300, in __init__
IOComponent.__init__(
File "/user/stable-diffusion-webui/modules/scripts.py", line 536, in IOComponent_init
add_classes_to_gradio_component(self)
File "/user/stable-diffusion-webui/modules/scripts.py", line 521, in add_classes_to_gradio_component
comp.elem_classes = ["gradio-" + comp.get_block_name(), *(comp.elem_classes or [])]
AttributeError: 'Textbox' object has no attribute 'elem_classes'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/user/stable-diffusion-webui/webui.py", line 337, in <module>
webui()
File "/user/stable-diffusion-webui/webui.py", line 240, in webui
shared.demo = modules.ui.create_ui()
File "/user/stable-diffusion-webui/modules/ui.py", line 459, in create_ui
with gr.Blocks(analytics_enabled=False) as txt2img_interface:
File "/user/anaconda3/envs/webui/lib/python3.10/site-packages/gradio/blocks.py", line 1097, in __exit__
self.config = self.get_config_file()
File "/user/anaconda3/envs/webui/lib/python3.10/site-packages/gradio/blocks.py", line 1073, in get_config_file
"props": utils.delete_none(block.get_config())
File "/user/anaconda3/envs/webui/lib/python3.10/site-packages/gradio/components.py", line 322, in get_config
"type": self.type,
AttributeError: 'Textbox' object has no attribute 'type'. Did you mean: 'style'?

webui报错
https://johnson7788.github.io/2023/03/29/webui%E6%8A%A5%E9%94%99/
作者
Johnson
发布于
2023年3月29日
许可协议