prompt-to-prompt
prompt-to-prompt copied to clipboard
Request for help, problems with the installation
Hello, I have tried to run this application, but it always gives me this error:
TypeError Traceback (most recent call last)
/usr/local/lib/python3.8/dist-packages/diffusers/pipeline_utils.py in from_pretrained(cls, pretrained_model_name_or_path, **kwargs) 371 load_method_name = importable_classes[class_name][1] 372 --> 373 load_method = getattr(class_obj, load_method_name) 374 375 loading_kwargs = {}
TypeError: getattr(): attribute name must be strin Could you please help me to solve it. Thank you in advance
I found it work that you can change the diffusers version to make sure it >=0.40.
añadir !pip install --upgrade diffusers transformers scipy
y correrá
@landian60 or @uziel313, How did you get past the other errors that happen after this? In #29 , I pointed at two of them:
- Setting the offset in ptp_utils.py L163 doesn't work with the newest diffusers.
- After turning off the offset kwarg above, I get TypeError: forward() got an unexpected keyword argument 'attention_mask'.
Hello, I also encountered a similar problem. The error occurs because of version inconsistencies between diffusers, transformers, and pretrained weights ("CompVis/stable-diffusion-v1-4").
Here is my solution.
diffusers==0.3.0
transformers==4.24.0
For "CompVis/stable-diffusion-v1-4", we add "revision='249dd2d739844dea6a0bc7fc27b3c1d014720b28'" for the stable version.
ldm_stable = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", use_auth_token=MY_TOKEN, revision="249dd2d739844dea6a0bc7fc27b3c1d014720b28").to(device)