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

Fix the bug of Missing dependencies and DeOldify path set in demo colorization_python #118

Merged
merged 5 commits into from
Sep 10, 2024

Conversation

JackLau1222
Copy link
Contributor

@JackLau1222 JackLau1222 commented May 24, 2024

DeOldify path set

the py_deoldify_module.py will be executed firstly, but the sys.path.insert(0, './DeOldify') writed in deoldify_demo.py, so there will be meeting error like this ModuleNotFoundError: No module named 'deoldify'

root@73559b1846e1:~/bmf/bmf/demo/colorization_python# python3 deoldify_demo.py 
Traceback (most recent call last):
  File "deoldify_demo.py", line 2, in <module>
    import py_deoldify_module
  File "/root/bmf/bmf/demo/colorization_python/py_deoldify_module.py", line 7, in <module>
    from deoldify import device
ModuleNotFoundError: No module named 'deoldify'

so i move the code into py_deoldify_module.py

# Add the DeOldify folder to the python search path
import sys

sys.path.insert(0, './DeOldify')
print(sys.path)

from deoldify import device

Missing dependencies

The DeOldify project missing dependence IPython

root@73559b1846e1:~/bmf/bmf/demo/colorization_python# python3.8 deoldify_demo.py 
['./DeOldify', '/root/bmf/bmf/demo/colorization_python', '/root/bmf/bmf/demo/colorization_python', '/usr/local/lib/python3.8/dist-packages/nvcv_python', '/root/bmf/output', '/usr/lib/python38.zip', '/usr/lib/python3.8', '/usr/lib/python3.8/lib-dynload', '/usr/local/lib/python3.8/dist-packages', '/usr/lib/python3/dist-packages']
INFO:matplotlib.font_manager:generated new fontManager
generated new fontManager
INFO:numexpr.utils:Note: NumExpr detected 40 cores but "NUMEXPR_MAX_THREADS" not set, so enforcing safe limit of 8.
Note: NumExpr detected 40 cores but "NUMEXPR_MAX_THREADS" not set, so enforcing safe limit of 8.
INFO:numexpr.utils:NumExpr defaulting to 8 threads.
NumExpr defaulting to 8 threads.
Traceback (most recent call last):
  File "deoldify_demo.py", line 2, in <module>
    import py_deoldify_module
  File "/root/bmf/bmf/demo/colorization_python/py_deoldify_module.py", line 14, in <module>
    from deoldify.visualize import *
  File "/root/bmf/bmf/demo/colorization_python/./DeOldify/deoldify/visualize.py", line 13, in <module>
    from IPython import display as ipythondisplay
ModuleNotFoundError: No module named 'IPython'

so i add a requirements.txt in the demo directory contains ipython

pip install BMF packages name is wrong in README.md

i fix it to the right name BabitMF and BabitMF-GPU but bmf

@sfeiwong sfeiwong merged commit d3b61cc into BabitMF:master Sep 10, 2024
2 checks passed
sfeiwong pushed a commit that referenced this pull request Sep 20, 2024
…orization_python (#118)

* fix the bug of requirements and DeOldify path set
* Update Readme.md
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

Successfully merging this pull request may close these issues.

2 participants