Sygil-Dev / stable-diffusion

GNU Affero General Public License v3.0
1.72k stars 149 forks source link

unsupported operand type(s) for +=: 'dict' and 'str' #221

Closed orionflame closed 2 years ago

orionflame commented 2 years ago

Hi,

I just installed the latest version and I tried face fix and upres modules they work fine. But when I tried to use a prompt to generate an image, it throws that error.

Here is the full stack error: https://imgur.com/a/iIhPZpJ

jim-22 commented 2 years ago

The problem is in this bit:

https://github.com/hlky/stable-diffusion/blob/e2897e6b17579b499578d2e88f6337025adaae08/scripts/webui.py#L987-L998

info was changed from a string to a dict but last two lines weren't updated to reflect that change.

Changing line 998 to say

         info['text'] += "\n\n" + comment

seems to fix it

orionflame commented 2 years ago

I just tried it same error.

jim-22 commented 2 years ago

It works for me. Did you restart the python process and reload the window? It needs to reload the code.

orionflame commented 2 years ago

thx i was just retrying without doing that and i saw the updated code in the error thats why i thought it reloaded it. how can I restart the python process? you mean do the whole webui startup from anaconda again?

James-Whitney commented 2 years ago

can confirm it works after (requires restarting the webui.cmd)

orionflame commented 2 years ago

thx it works indeed

hlky commented 2 years ago

Fixed, thanks @jim-22