Closed TomTomTommi closed 5 months ago
Just to confirm, following the install command pip install -r prompt-to-prompt/requirements.txt
, torch 2.2.2 is installed.
try def __call__(self, attn, is_cross, place_in_unet):
, maybe your python doesn't support this syntax?
Another problem appears:
File "img2stereo.py", line 33, in <module>
ldm_stable = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", use_auth_token=MY_TOKEN, scheduler=scheduler).to(device)
File "/home/jj323/.local/lib/python3.8/site-packages/diffusers/pipeline_utils.py", line 373, in from_pretrained
load_method = getattr(class_obj, load_method_name)
TypeError: getattr(): attribute name must be string
please check the value of class_obj
and load_method_name
, it is bug from diffusers, it seems you have different version of diffusers. Mine is 0.21.2
After re-installing the diffusers, this is solved. It seems the overall pipeline is ok, while the final step to save the image has an error:
File "img2stereo.py", line 405, in <module>
torchvision.utils.save_image(image_pair, os.path.join('outputs',f'{args.img_path.split("/")[-1]}'), normalize=True)
TypeError: tensor or list of tensors expected, got <class 'numpy.ndarray'>
yes, I just found it, change the final line to Image.fromarray(image_pair).save(os.path.join('outputs',f'{args.img_path.split("/")[-1]}'))
Hi,
I follow the command line in README to run
img2stereo.py
but an error occured: