[Bug]: Some console error
LLKoder opened this issue · 4 comments
On start up I see some console error:
...\stable-diffusion-webui\extensions\stable-diffusion-webui-promptgen\scripts\promptgen.py:160: GradioDeprecationWarning: The `style` method is deprecated. Please set these arguments in the constructor instead.
prompt = gr.Textbox(label="Prompt", elem_id="promptgen_prompt", show_label=False, lines=2, placeholder="Beginning of the prompt (press Ctrl+Enter or Alt+Enter to generate)").style(container=False)
...\stable-diffusion-webui\modules\gradio_extensons.py:25: GradioUnusedKwargWarning: You have unused kwarg parameters in Button, please remove them: {'full_width': True}
res = original_IOComponent_init(self, *args, **kwargs)
version: v1.6.0
python: 3.10.11
torch: 2.0.1+cu118
xformers: 0.0.20
gradio: 3.41.2
checkpoint: [171c237b86]
Same here
Python 3.10.6
Version: v1.7.0
still here
I am not a professional developer, but a possible solution would be:
just replace
prompt = gr.Textbox(label="Prompt", elem_id="promptgen_prompt", show_label=False, lines=2, placeholder="Beginning of the prompt (press Ctrl+Enter or Alt+Enter to generate)").style(container=False)
to
prompt = gr.Textbox(label="Prompt", elem_id="promptgen_prompt", show_label=False, lines=2, placeholder="Beginning of the prompt (press Ctrl+Enter or Alt+Enter to generate)", container=False)
in file .../stable-diffusion-webui-promptgen/scripts/promptgen.py (160)
and don't forget to delete the folder "__pycache__" in .../stable-diffusion-webui-promptgen/scripts
At least the first warning should go away.
I am not a professional developer, but a possible solution would be: just replace
prompt = gr.Textbox(label="Prompt", elem_id="promptgen_prompt", show_label=False, lines=2, placeholder="Beginning of the prompt (press Ctrl+Enter or Alt+Enter to generate)").style(container=False)
to
prompt = gr.Textbox(label="Prompt", elem_id="promptgen_prompt", show_label=False, lines=2, placeholder="Beginning of the prompt (press Ctrl+Enter or Alt+Enter to generate)", container=False)
in file .../stable-diffusion-webui-promptgen/scripts/promptgen.py (160) and don't forget to delete the folder "pycache" in .../stable-diffusion-webui-promptgen/scripts
At least the first warning should go away.
Thanks for the fix!