AUTOMATIC1111 / stable-diffusion-webui-promptgen

stable-diffusion-webui-promptgen
MIT License
484 stars 93 forks source link

[Bug]: Some console error #20

Open LLKoder opened 1 year ago

LLKoder commented 1 year ago

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]

Wovik253 commented 1 year ago

Same here

snakemr commented 9 months ago

Python 3.10.6 Version: v1.7.0 still here

D0n-A commented 8 months ago

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.

DavideAlidosi commented 7 months ago

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!