TypeError: argument of type 'NoneType' is not iterable

#7
by Softology - opened

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 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

I also raised a git issue here if that is a better place to report errors. If so, you can close/delete this one.
https://github.com/Stability-AI/StableCascade/issues/11

This was due to not having the model files downloaded. Make sure you get the models as specified in download_models.sh

Softology changed discussion status to closed

Sign up or log in to comment