StableCascade icon indicating copy to clipboard operation
StableCascade copied to clipboard

TypeError: argument of type 'NoneType' is not iterable

Open SoftologyPro opened this issue 1 year ago • 3 comments

When running the text_to_image.ipynb notebook. Gets to the 3rd "Load Extras & Models" cell and then this error. I get the same error if I copy/paste the code into a new py script and run outside jupyter. Any ideas? I did setup a new clean virtual environment using the requirements.txt provided.

TypeError Traceback (most recent call last)
Cell In[3], line 3
1 # SETUP MODELS & DATA
2 extras = core.setup_extras_pre()
----> 3 models = core.setup_models(extras)
4 models.generator.eval().requires_grad_(False)
5 print("STAGE C READY")

File D:\Tests\StableCascade\train\train_c.py:128, in WurstCore.setup_models(self, extras)
126 effnet = EfficientNetEncoder()
127 effnet_checkpoint = load_or_fail(self.config.effnet_checkpoint_path)
--> 128 effnet.load_state_dict(effnet_checkpoint if 'state_dict' not in effnet_checkpoint else effnet_checkpoint['state_dict'])
129 effnet.eval().requires_grad_(False).to(self.device)
130 del effnet_checkpoint

TypeError: argument of type 'NoneType' is not iterable

SoftologyPro avatar Feb 13 '24 21:02 SoftologyPro

I think this is the same as #6

tolidano avatar Feb 13 '24 21:02 tolidano

You need to run the download_models.sh script in the models folder.

yskan avatar Feb 13 '24 21:02 yskan

OK, thanks. That got past the error.

SoftologyPro avatar Feb 13 '24 22:02 SoftologyPro