ahrm / UnstableFusion

A Stable Diffusion desktop frontend with inpainting, img2img and more!
GNU General Public License v3.0
1.26k stars 86 forks source link

NameError: 'StableDiffusionHandler' is not defined #40

Closed wyattjohnsonbro closed 1 year ago

wyattjohnsonbro commented 2 years ago

The full traceback is:

Traceback (most recent call last):
  File "/home/pokemon343638/UnstableFusion-main/unstablefusion.py", line 897, in handle_generate_button
    if type(self.get_handler()) == ServerStableDiffusionHandler:
  File "/home/pokemon343638/UnstableFusion-main/unstablefusion.py", line 460, in get_handler
    return self.stable_diffusion_manager.get_handler()
  File "/home/pokemon343638/UnstableFusion-main/unstablefusion.py", line 329, in get_handler
    return self.get_local_handler(self.get_huggingface_token())
  File "/home/pokemon343638/UnstableFusion-main/unstablefusion.py", line 312, in get_local_handler
    self.cached_local_handler = StableDiffusionHandler(token)
NameError: name 'StableDiffusionHandler' is not defined
ahrm commented 2 years ago

This should not happen, we import StableDiffusionHandler here:

try:
    from diffusionserver import StableDiffusionHandler
except ImportError:
    print(traceback.format_exc())
    print('Could not import StableDiffusionHandler, can not run locally')

So if there is a failure importing it, there should be a message on the output.