Issue
Just got access to SDXL model, looking to test it for its upcoming release... Unfortunately, the code we currently use for our service seems to not work with stabilityai/stable-diffusion-xl-base-0.9
, and I'm not entirely sure what is different with SDXL and what I need to change.
We are using a different pipeline so we can generate previews of the images, so its not the typical template that is provided on the SDXL model readme.
The error seems to be happening in unet_2d_condition.py
(in diffusers lib)
Traceback (most recent call last):
File "C:\Users\myalt\Desktop\testing image grid\main.py", line 159, in <module>
socker_listener.generate_image()
File "C:\Users\myalt\Desktop\testing image grid\main.py", line 154, in generate_image
foo = self.blocking_code()
File "C:\Users\myalt\Desktop\testing image grid\main.py", line 109, in blocking_code
noise_pred = self.unet(latent_model_input, t,
File "C:\Users\myalt\Desktop\testing image grid\venv\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "C:\Users\myalt\Desktop\testing image grid\venv\lib\site-packages\diffusers\models\unet_2d_condition.py", line 839, in forward
if "text_embeds" not in added_cond_kwargs:
TypeError: argument of type 'NoneType' is not iterable
I've updated to diffusers==0.18.2
.
Here is a example code which makes a bunch of images and puts them into a grid, using this a custom pipeline https://hatebin.com/tqppqfsehk
Solution
Interesting, this looks like a bug in diffusers. added_cond_kwargs
is specified as being optional, and the function signature explicitly defaults it to None
. However, the subsequent code does not check for the None
case, treating it as if it is a dictionary. It's worth filing an issue with diffusers
if it hasn't already been reported. They can probably fix it by simply setting added_cond_kwargs
to {}
if it's passed as None
.
In the meantime, you should be able to work around this by explicitly passing added_cond_kwargs={}
to the unet function.
Answered By - nneonneo
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.