fast-stable-diffusion icon indicating copy to clipboard operation
fast-stable-diffusion copied to clipboard

ModuleNotFoundError: No module named 'spandrel'

Open skjcs355062 opened this issue 11 months ago • 7 comments

happened when using Hires. fix

Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/call_queue.py", line 57, in f res = list(func(*args, **kwargs)) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/call_queue.py", line 36, in f res = func(*args, **kwargs) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/txt2img.py", line 110, in txt2img processed = processing.process_images(p) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/processing.py", line 785, in process_images res = process_images_inner(p) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/processing.py", line 921, in process_images_inner samples_ddim = p.sample(conditioning=p.c, unconditional_conditioning=p.uc, seeds=p.seeds, subseeds=p.subseeds, subseed_strength=p.subseed_strength, prompts=p.prompts) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/processing.py", line 1273, in sample return self.sample_hr_pass(samples, decoded_samples, seeds, subseeds, subseed_strength, prompts) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/processing.py", line 1322, in sample_hr_pass image = images.resize_image(0, image, target_width, target_height, upscaler_name=self.hr_upscaler) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/images.py", line 286, in resize_image res = resize(im, width, height) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/images.py", line 278, in resize im = upscaler.scaler.upscale(im, scale, upscaler.data_path) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/upscaler.py", line 65, in upscale img = self.do_upscale(img, selected_model) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/realesrgan_model.py", line 39, in do_upscale model_descriptor = modelloader.load_spandrel_model( File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/modelloader.py", line 149, in load_spandrel_model import spandrel ModuleNotFoundError: No module named 'spandrel'

skjcs355062 avatar Mar 04 '24 08:03 skjcs355062

Same!(runpod) I found this and it worked for me!! : you'll need to run the following command:

pip install spandrel

dazaibsd avatar Mar 04 '24 15:03 dazaibsd

Same issue with google colap pro...

Where do I have to enter "pip install spandrel"?

DeAiArt avatar Mar 04 '24 20:03 DeAiArt

same

KyotoLyon avatar Mar 04 '24 21:03 KyotoLyon

me too. Could you please provide the installation code and location.

A3734 avatar Mar 05 '24 02:03 A3734

This is how I did it on Runpod, I'm not sure if it works the same on Colab:

1)Click on the terminal 2)Paste "pip install spandrel" 3) Press Enter I'm almost sure that the installation path doesn't matter, as I've done it twice in random folders and it worked both times, and there didn't seem to be anything new in the folders. I suppose it's because the command updates something. I repeat, this last part I mentioned is just my assumption since I'm not an expert 1 2 3

dazaibsd avatar Mar 05 '24 02:03 dazaibsd

I believe on Google Colab, resolving it as follows would be appropriate: Install spandrel underneath the Control Net, as shown in the image. ESRGAN folder has also been created. spandrel

A3734 avatar Mar 05 '24 04:03 A3734

IMPORTANT for win(ComfyUI). Installed folders("spadrel" and "spadrel-0.x.x.dist-info") should be placed \ComfyUI_windows_portable\python_embeded\Lib\site-packages

afill86 avatar Jun 03 '24 13:06 afill86