Open cocktailpeanut opened 9 months ago
If path is dir it load from diffusers dir,or it is file from ckpt or safetensors(and ignore subset dir unet dir). About MAC,i just change device from "cuda" to judge if it is mps. Cant do other test for no MAC in here....
The
if str(pretrained_model_path).endswith(".safetensors")
andelif str(pretrained_model_path).endswith(".ckpt"):
fail because thepretrained_model_path
is NOT the model file path, but theunet
folder path.I got it to work by reverting back to the original code. Maybe I'm missing something, was there a specific reason for this change? Feel free to ignore the PR if I am missing something, just thought I would send the PR since I got it to work after changing these lines.
BTW, couldn't get it to work on Macs despite the code changes to properly support mps. Keep getting memory issues, any ideas?