carson-katri / dream-textures

Stable Diffusion built-in to Blender

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Generate is Disabled When Opening a Blend File

NullSenseStudio opened this issue · comments

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

except Exception as e:
print(e)

This actual error is occurring here
def validate(self, arguments: GenerationArguments):
model = model_lookup.get(arguments.model.id)
if model is None:
raise FixItError("No model selected.", FixItError.ChangeProperty("model"))
else:
if not model.model_type.matches_task(arguments.task):

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