Importerror: Cannot Import Name 'Watermarkencoder' from 'Imwatermark'

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.

2

2 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)

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Marcus Vance

Marcus Vance

Cybersecurity & Digital Privacy Researcher

Marcus Vance is a cybersecurity auditor and technology writer dedicated to educating the public about online safety, data privacy regulations, enterprise security, and emerging cyber threats.

Share this article
Twitter Facebook Pinterest