This guide assumes you already have checked out the apple-silicon-mps-support
branch from https://github.com/bfirsh/stable-diffusion
- Add the sys path line to img2img.py above the ldm imports like so
sys.path.append(os.path.join(os.path.dirname(__file__), ".."))
from ldm.util import instantiate_from_config
from ldm.models.diffusion.ddim import DDIMSampler
from ldm.models.diffusion.plms import PLMSSampler
-
Ensure your base image is 512x512. I have heard that any multiple of 16 works, but I have not tested.
-
Ensure you pass in the runtime variable
--precision full
like so
python scripts/img2img.py --prompt "portrait of a lady leaning out a window looking out at the water \
from inside, painting by Edward Hopper" --init-img ~/Downloads/hopper.jpeg --n_samples 1 --n_iter 1 \
--precision full --strength 0.8
If things are not working:
- Ensure you have activated the virtual environment and saved the model in the correct location for the script to pick it up with the right model name
- Ensure you added the sys line above the ldm imports
- Ensure your base image is 512x512
- Ensure you have checked out the right branch (I haven't tried the anaconda version
twitter: jc50000000