Skip to content

UnboundLocalError: local variable 'model' referenced before assignment, on all models but midas_v21_smallΒ #39

@jstanley14

Description

@jstanley14

Traceback (most recent call last):
File "G:\sd-new\modules\call_queue.py", line 45, in f
res = list(func(*args, **kwargs))
File "G:\sd-new\modules\call_queue.py", line 28, in f
res = func(*args, **kwargs)
File "G:\sd-new\modules\txt2img.py", line 49, in txt2img
processed = modules.scripts.scripts_txt2img.run(p, *args)
File "G:\sd-new\modules\scripts.py", line 337, in run
processed = script.run(p, *script_args)
File "G:\sd-new\extensions\multi-subject-render\scripts\multirender.py", line 263, in run
foreground_image_mask = sdmg.calculate_depth_map_for_waifus(foreground_image)
File "G:\sd-new\extensions/multi-subject-render/scripts/simple_depthmap.py", line 187, in calculate_depth_map_for_waifus
del model
UnboundLocalError: local variable 'model' referenced before assignment

This happens consistently when using any model except for midas_v21_small. All the models download fine, but the error happens after the foreground images are generated. midas_v21_small works fine. I saw the other issue with the same error, but that seems unrelated as my internet connection has no bearing here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions