improved-diffusion icon indicating copy to clipboard operation
improved-diffusion copied to clipboard

No module named 'improved_diffusion'

Open liuyisu opened this issue 1 year ago • 7 comments

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

liuyisu avatar Jan 11 '24 12:01 liuyisu

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

tobi-ore avatar Jan 11 '24 20:01 tobi-ore

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

liuyisu avatar Jan 12 '24 03:01 liuyisu

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

tobi-ore avatar Jan 12 '24 04:01 tobi-ore

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

liuyisu avatar Jan 12 '24 05:01 liuyisu

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 “.”

tobi-ore avatar Jan 20 '24 14:01 tobi-ore

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"

ali-alhwayzee avatar May 15 '24 19:05 ali-alhwayzee

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

gao040608 avatar Jul 26 '24 08:07 gao040608