Giter Club home page Giter Club logo

Comments (5)

tongyx361 avatar tongyx361 commented on July 28, 2024

Thank you so much for the issue! Let's resolve it together 😀

ModuleNotFoundError: No module named 'ImageReward' indicates that the Python interpreter failed to search for the ImageReward package from your Python environment.

So you might need to try checking your Python environment, which might has the following problems:

  • The environment shown is different from the one actually used (this sometimes happens in Conda), try reactivating the environment with conda activate <env_name_with_image-reward_installed> in Conda for example.
  • pip did not install image-reward successfully, try pip show image-reward to check if it has been installed successfully.

If the problem is still not solved after checking the above problems and trying the corresponding solutions, please feel free to continue to ask.

from imagereward.

bparlan avatar bparlan commented on July 28, 2024

Since my error is similar and I can provide further information, I am commenting and populating similar error. pip install image-reward ran successfully:

C:\WINDOWS\system32>pip show image-reward
Name: image-reward
Version: 1.2
Summary: ImageReward
Home-page: https://github.com/THUDM/ImageReward
Author: Jiazheng Xu, et al.
Author-email: <[email protected]>
License: Apache 2.0 license
Location: c:\python310\lib\site-packages
Requires: fairscale, huggingface-hub, timm, transformers
Required-by:

Dropped image_reward.py into D:\Projects\StableRegina\stable-diffusion-webui\scripts.
SD Webui is printing the following error:

Launching Web UI with arguments: --autolaunch --medvram --xformers
Error loading script: image_reward.py
Traceback (most recent call last):
  File "D:\Projects\StableRegina\stable-diffusion-webui\modules\scripts.py", line 257, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "D:\Projects\StableRegina\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "D:\Projects\StableRegina\stable-diffusion-webui\scripts\image_reward.py", line 18, in <module>
    import ImageReward as reward
ModuleNotFoundError: No module named 'ImageReward'

commandline args: --medvram --xformers
python: Python 3.10.6

from imagereward.

tongyx361 avatar tongyx361 commented on July 28, 2024

Since my error is similar and I can provide further information, I am commenting and populating similar error. pip install image-reward ran successfully:

C:\WINDOWS\system32>pip show image-reward
Name: image-reward
Version: 1.2
Summary: ImageReward
Home-page: https://github.com/THUDM/ImageReward
Author: Jiazheng Xu, et al.
Author-email: <[email protected]>
License: Apache 2.0 license
Location: c:\python310\lib\site-packages
Requires: fairscale, huggingface-hub, timm, transformers
Required-by:

Dropped image_reward.py into D:\Projects\StableRegina\stable-diffusion-webui\scripts. SD Webui is printing the following error:

Launching Web UI with arguments: --autolaunch --medvram --xformers
Error loading script: image_reward.py
Traceback (most recent call last):
  File "D:\Projects\StableRegina\stable-diffusion-webui\modules\scripts.py", line 257, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "D:\Projects\StableRegina\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "D:\Projects\StableRegina\stable-diffusion-webui\scripts\image_reward.py", line 18, in <module>
    import ImageReward as reward
ModuleNotFoundError: No module named 'ImageReward'

commandline args: --medvram --xformers python: Python 3.10.6

Thank you very much for offerring the error information!

It seems that you have encountered the same error as mentioned in this issue. You can refer to the suggested solution in it (activate venv and reinstall "image-reward").

Afterwards, that issue encountered some other errors that I couldn't reproduce. If you are able to reproduce similar errors, please let us know. Your feedback will greatly help us in improving this project!

from imagereward.

bparlan avatar bparlan commented on July 28, 2024

It seems that you have encountered the same error as mentioned in this issue. You can refer to the suggested solution in it (activate venv and reinstall "image-reward").

You were definitely right about it. Activate venv and reinstall image-reward solved my issue out. I will keep updating whenever I encounter any issue! Thanks for awesome community.

from imagereward.

tongyx361 avatar tongyx361 commented on July 28, 2024

It seems that you have encountered the same error as mentioned in this issue. You can refer to the suggested solution in it (activate venv and reinstall "image-reward").

You were definitely right about it. Activate venv and reinstall image-reward solved my issue out. I will keep updating whenever I encounter any issue! Thanks for awesome community.

Thank you very much for offering us with information to help identify and resolve the issue.

I'm closing this issue for now. If any of you encounters any new problems, please feel free to open a new issue.

Let's work together to make the entire community better!

from imagereward.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.