stable-diffusion-webui-promptgen icon indicating copy to clipboard operation
stable-diffusion-webui-promptgen copied to clipboard

[Bug]: Some console error

Open LLKoder opened this issue 2 years ago • 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]

LLKoder avatar Sep 15 '23 04:09 LLKoder

Same here

Wovik253 avatar Oct 13 '23 19:10 Wovik253

Python 3.10.6 Version: v1.7.0 still here

snakemr avatar Feb 19 '24 14:02 snakemr

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.

D0n-A avatar Mar 18 '24 22:03 D0n-A

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!

DavideAlidosi avatar Mar 29 '24 18:03 DavideAlidosi