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

No module named 'improved_diffusion' #123

Open
liuyisu opened this issue Jan 11, 2024 · 7 comments
Open

No module named 'improved_diffusion' #123

liuyisu opened this issue Jan 11, 2024 · 7 comments

Comments

@liuyisu
Copy link

liuyisu commented Jan 11, 2024

请问遇到ModuleNotFoundError: No module named 'improved_diffusion'
​该怎样处理呢

@tobi-ore
Copy link

clone the repo and install 'improved_diffusion' using:
pip install -e .

@liuyisu
Copy link
Author

liuyisu commented Jan 12, 2024

clone the repo and install 'improved_diffusion' using: pip install -e .

58b478226e30bd7be28b95b4ecc65f8 Thank you very much for your reply. I encountered the above problem while testing on the server. Do you know how to handle it? Thank you very much

@tobi-ore
Copy link

Refer to the documentation provided in the repo on how to properly run the code. For example the image_train.py is in the scripts folder. You ought to use scripts/image_train.py

@liuyisu
Copy link
Author

liuyisu commented Jan 12, 2024

Yes, I later discovered and corrected this issue, it seems to be still improved_ The issue of diffusion. I am a beginner, this is really too difficult
e1dde001131a1764e6432ee40ef333b

@tobi-ore
Copy link

tobi-ore commented Jan 20, 2024

Your pip install -e call is wrong. There is a full stop “.” after the -e to install the improved_diffusion package from the current directory pip install -e .. Make sure you’re in the improved_diffusion directory you cloned from here. Or put the path to the improved_diffusion folder instead of the “.”

@ali-alhwayzee
Copy link

There are two possibilities, according to what happened to me:

The first is to ensure that MPI is installed
https://www.microsoft.com/en-us/download/details.aspx?id=105289
The second is that the path is inside the "improved_diffusion" file
After setting the parameters, use the following command inside the terminal in the path above
python scripts/image_train.py --data_dir path/to/images $MODEL_FLAGS $DIFFUSION_FLAGS $TRAIN_FLAGS
Make sure to check the image file path
"--data_dir path/to/images"

@gao040608
Copy link

你需要在当前环境下运行pip install -e .

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

4 participants