Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to Locate 'imwatermark' Module #371

Open
Greenhat09 opened this issue Apr 15, 2024 · 1 comment
Open

Unable to Locate 'imwatermark' Module #371

Greenhat09 opened this issue Apr 15, 2024 · 1 comment

Comments

@Greenhat09
Copy link

I'm encountering an issue while attempting to execute a Python script named txt2img.py. After installing all the required libraries using 'pip install -r requirements.py', I tried to run the script with the following command: 'python scripts/txt2img.py --prompt "cat" --ckpt weights/768-v-ema.ckpt --config configs/stable-diffusion/v2-inference-v.yaml --H 768 --W 768'. However, I received the following error message:

Traceback (most recent call last):
File "/Users/dylan/Documents/AI_art/stablediffusion/scripts/txt2img.py", line 14, in
from imwatermark import WatermarkEncoder
ModuleNotFoundError: No module named 'imwatermark'

I'm using Ubuntu 20.04 with Python 3.9. Could you assist me in troubleshooting this problem?

@Hemakshi011
Copy link

Install with pip install invisible-watermark
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)
Source: https://stackoverflow.com/questions/74524544/importerror-cannot-import-name-watermarkencoder-from-imwatermark

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants