Solution for failed image generation in SD Forge and openoutpaint extension. #3037
bkrew
started this conversation in
Show and tell
Replies: 1 comment
|
You can also pass |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
This could also solve Problems in other aspects as it is quite a universal failsafe.
Possible fix for TypeError: argument of type 'NoneType' is not iterable in Stable Diffusion Forge with openOutpaint
Problem description
When generating images with the openOutpaint extension in Stable Diffusion WebUI Forge, I ran into the following error:
Likely cause
The error seems to come from modules/processing.py (line 1405).
It looks like the code applies not in to self.hr_additional_modules, which can sometimes be None instead of an iterable (list or string).
Workaround / change
I tested adding a simple null check to avoid applying the operator on None.
Original code:
if hasattr(self, 'hr_additional_modules') and 'Use same choices' not in self.hr_additional_modules:Modified code:
if hasattr(self, 'hr_additional_modules') and self.hr_additional_modules is not None and 'Use same choices' not in self.hr_additional_modules:Notes
This adjustment prevents the crash in my case.
I haven’t tested this thoroughly with other extensions or all Forge features yet.
It might be worth reviewing if there are other spots where hr_additional_modules can be None.
All reactions