rupeshs / fastsdcpu

Fast stable diffusion on CPU
MIT License
1.51k stars 123 forks source link

AttributeError: 'NoneType' object has no attribute 'generated_images' - Can't start app after fresh install #170

Closed tak2hu closed 7 months ago

tak2hu commented 7 months ago

OS: Windows 11 Python Version: at first tried 3.9 and then 3.11, same error

After installing with ./install.bat, I tried ./start.bat but got this error

C:\Users\widi\Projects\py\fastsdcpu\env\Lib\site-packages\transformers\utils\generic.py:441: UserWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead.
  _torch_pytree._register_pytree_node(
C:\Users\widi\Projects\py\fastsdcpu\env\Lib\site-packages\transformers\utils\generic.py:309: UserWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead.
  _torch_pytree._register_pytree_node(
C:\Users\widi\Projects\py\fastsdcpu\env\Lib\site-packages\diffusers\utils\outputs.py:63: UserWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead.
  torch.utils._pytree._register_pytree_node(
C:\Users\widi\Projects\py\fastsdcpu\env\Lib\site-packages\diffusers\utils\outputs.py:63: UserWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead.
  torch.utils._pytree._register_pytree_node(
C:\Users\widi\Projects\py\fastsdcpu\env\Lib\site-packages\diffusers\utils\outputs.py:63: UserWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead.
  torch.utils._pytree._register_pytree_node(
C:\Users\widi\Projects\py\fastsdcpu\env\Lib\site-packages\transformers\utils\generic.py:309: UserWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead.
  _torch_pytree._register_pytree_node(
Error in loading settings : 1 validation error for Settings
  Input should be a valid dictionary or instance of Settings [type=model_type, input_value=None, input_type=NoneType]
    For further information visit https://errors.pydantic.dev/2.4/v/model_type
Running on Windows platform
OS: Windows-10-10.0.22631-SP0
Processor: Intel64 Family 6 Model 142 Stepping 10, GenuineIntel
Using device : cpu
Found 7 LCM models in config/lcm-models.txt
Found 7 stable diffusion models in config/stable-diffusion-models.txt
Found 3 LCM-LoRA models in config/lcm-lora-models.txt
Found 6 OpenVINO LCM models in config/openvino-lcm-models.txt
Traceback (most recent call last):
  File "C:\Users\widi\Projects\py\fastsdcpu\src\app.py", line 250, in <module>
    app_settings.settings.generated_images.save_image = True
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'generated_images'

python .\src\app.py does the same

rupeshs commented 7 months ago

Try a fresh installation or delete config/settings yaml file and try

tak2hu commented 7 months ago

Thanks! It worked after deleting configs/settings.yaml