ImportError: cannot import name 'WatermarkEncoder' from 'imWatermark'
Olivia Zamora
I'm trying to run stable diffusion on my local pc. It's a macbook pro m1. Even though I did follow every single step, I keep getting an import error. What might possibly be the reason and how may I fix it?
ImportError: cannot import name 'WatermarkEncoder' from 'imWatermark'
I was referring an online tutorial so I did end up searching through the comments. Found nothing so far.
22 Answers
If you look in the txt2img.py script it references
Install with pip install invisible-watermark
It seems they forgot to add it into requirements.txt or smt like that.
If you continue getting the error after invisible-watermark installation, change the line from imWatermark import WatermarkEncoder in txt2img.py to from imwatermark import WatermarkEncoder (lowercase)