First time posting here - the context:
I just wanted to try the below sourcecode from HuggingFace
#%matplotlib inline
import torch
from diffusers.pipelines import DiffusionPipeline
from matplotlib import pyplot as plt
model_id = ""
ldm = DiffusionPipeline.from_pretrained(model_id)
prompt = "PastelPusheen"
images = ldm([prompt], num_inference_steps=50, eta=0.3, guidance_scale=6)["sample"]
plt.imshow(images[0])
Once it’s run it threw me this error
Traceback (most recent call last):
File “/Users/Casey/Desktop/myDevPortFolio/PastelPusheenGenV2/psndf.py”, line 6, in
from diffusers.pipelines import DiffusionPipeline
File “”, line 1075, in _handle_fromlist
File “/Users/Casey/Desktop/myDevPortFolio/PastelPusheenGenV2/my-env/lib/python3.10/site-packages/diffusers/utils/import_utils.py”, line 943, in getattr
module = self._get_module(self._class_to_module[name])
File “/Users/Casey/Desktop/myDevPortFolio/PastelPusheenGenV2/my-env/lib/python3.10/site-packages/diffusers/utils/import_utils.py”, line 955, in _get_module
raise RuntimeError(
RuntimeError: Failed to import diffusers.pipelines.pipeline_utils because of the following error (look up to see its traceback):
Failed to import diffusers.models.autoencoders.autoencoder_kl because of the following error (look up to see its traceback):
I don’t understand this - I tried deleting and re-installing pytorch etc but none of them helped. Could anyone point me in the right direction?