carson-katri / dream-textures

Stable Diffusion built-in to Blender
GNU General Public License v3.0
7.78k stars 418 forks source link

Generate is Disabled When Opening a Blend File #729

Closed NullSenseStudio closed 10 months ago

NullSenseStudio commented 10 months ago

Description

Generating any image is disabled when opening a .blend file, starting Blender directly and then using its File > Open... alternatively does not. Releasing the generator doesn't help.

The console gets spammed with 'str' object has no attribute 'model_type'. I've tracked this down to https://github.com/carson-katri/dream-textures/blob/4f210c51edd490f51ac31653a5fc3127fefb1e56/ui/panels/dream_texture.py#L368-L369 This actual error is occurring here https://github.com/carson-katri/dream-textures/blob/4f210c51edd490f51ac31653a5fc3127fefb1e56/diffusers_backend.py#L263-L268 For some reason model_lookup is not being updated and just returns the model id string.

It can be made to update by installing another model: either downloading, importing, or linking.

Steps to Reproduce

  1. open Blender and save a new .blend file
  2. close Blender
  3. open .blend file from file explorer (NOT from within Blender File > Open... / File > Open Recent)

Expected Behavior

Generate button to not be disabled.

Addon Version

Windows (CUDA)

GPU

NVIDIA