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

Error While Attempting to Run Simple Lama #6

Open
DNucX opened this issue Nov 20, 2023 · 3 comments
Open

Error While Attempting to Run Simple Lama #6

DNucX opened this issue Nov 20, 2023 · 3 comments

Comments

@DNucX
Copy link

DNucX commented Nov 20, 2023

Hello,

Upon attempting to run simple lama, I get the following error(s):

Traceback (most recent call last):
  File "simpLama3.8/bin/simple_lama", line 8, in <module>
    sys.exit(lama_cli())
  File "/home/user/pythonProjects/simpLama3.8/lib/python3.8/site-packages/simple_lama_inpainting/cli.py", line 36, in lama_cli
    fire.Fire(main)
  File "/home/user/pythonProjects/simpLama3.8/lib/python3.8/site-packages/fire/core.py", line 141, in Fire
    component_trace = _Fire(component, args, parsed_flag_args, context, name)
  File "/home/user/pythonProjects/simpLama3.8/lib/python3.8/site-packages/fire/core.py", line 475, in _Fire
    component, remaining_args = _CallAndUpdateTrace(
  File "/home/user/pythonProjects/simpLama3.8/lib/python3.8/site-packages/fire/core.py", line 691, in _CallAndUpdateTrace
    component = fn(*varargs, **kwargs)
  File "/home/user/pythonProjects/simpLama3.8/lib/python3.8/site-packages/simple_lama_inpainting/cli.py", line 24, in main
    assert img.mode == "RGB" and mask.mode == "L"
AssertionError

I have installed all the necessary requirements and dependencies, not unless I've missed some. Any help on this would be greatly appreciated! Thank you!

@enesmsahin
Copy link
Owner

Hey @DNucX,
Looking at the error, I suggest that you should check the format of the image and mask files. Image should be "RGB - 3 channel", and the mask should be "Grayscale - 1 channel".

@DNucX
Copy link
Author

DNucX commented Nov 21, 2023

Hi @enesmsahin ,

Thank you for writing.

It turns out the mask image was not grayscale. I converted it to grayscale and ran the command again. It worked, but this time I get the following error:

RuntimeError: Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http:https://www.nvidia.com/Download/index.aspx

My server does not have a NVIDIA GPU. Is there anyway to run the command using the CPU?

Thank you!

@tzktz
Copy link

tzktz commented Feb 12, 2024

Hi @enesmsahin ,

Thank you for writing.

It turns out the mask image was not grayscale. I converted it to grayscale and ran the command again. It worked, but this time I get the following error:

RuntimeError: Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http:https://www.nvidia.com/Download/index.aspx

My server does not have a NVIDIA GPU. Is there anyway to run the command using the CPU?

Thank you!

Edit the simple_lama_inpainting/model.py file..

self.model = torch.jit.load(model_path, map_location='cpu')

it works smoothly for cpu..

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

3 participants