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

ModuleNotFoundError: No module named 'diffusers.pipelines.pipeline_utils' #29

Open
swayam1998 opened this issue Mar 28, 2023 · 0 comments

Comments

@swayam1998
Copy link

swayam1998 commented Mar 28, 2023

After following the fine-tuning/dreambooth/stablediffusion_dreambooth_finetuning.en.ipynb notebook steps I get this error.

PYTHONPATH=/opt/ml/code:/opt/conda/bin:/opt/conda/lib/python39.zip:/opt/conda/lib/python3.9:/opt/conda/lib/python3.9/lib-dynload:/opt/conda/lib/python3.9/site-packages:/opt/ml/code/repositories/xformers
Invoking script with the following command:
/opt/conda/bin/python train_dreambooth.py --attention xformers --class_data_dir /opt/ml/input/data/class_images/ --class_prompt photo\ of\ a\ man --gradient_accumulation_steps 1 --gradient_checkpointing True --instance_data_dir /opt/ml/input/data/images/ --instance_prompt photo\ of\ zwx\ man --learning_rate 2e-06 --lr_scheduler constant --lr_warmup_steps 0 --max_train_steps 300 --mixed_precision fp16 --model_name aws-trained-dreambooth-model --models_path /opt/ml/model/ --not_cache_latents True --num_class_images 50 --pretrained_model_name_or_path SG161222/Realistic_Vision_V1.4 --prior_loss_weight 0.5 --resolution 512 --sample_batch_size 1 --save_steps 300 --save_use_epochs False --train_batch_size 1 --train_text_encoder False --use_8bit_adam False --use_ema True --with_prior_preservation True
2023-03-28 08:26:02,862 sagemaker-training-toolkit INFO Exceptions not imported for SageMaker Debugger as it is not installed.
2023-03-28 08:26:02,862 sagemaker-training-toolkit INFO Exceptions not imported for SageMaker TF as Tensorflow is not installed.
Traceback (most recent call last):
File "/opt/ml/code/train_dreambooth.py", line 30, in
from extensions.sd_dreambooth_extension.dreambooth import xattention
File "/opt/ml/code/extensions/sd_dreambooth_extension/dreambooth/xattention.py", line 10, in
from diffusers.pipelines.pipeline_utils import LOADABLE_CLASSES
ModuleNotFoundError: No module named 'diffusers.pipelines.pipeline_utils'
2023-03-28 08:26:04,999 sagemaker-training-toolkit ERROR Reporting training FAILURE
2023-03-28 08:26:04,999 sagemaker-training-toolkit ERROR ExecuteUserScriptError:
ExitCode 1
ErrorMessage ""
Command "/opt/conda/bin/python train_dreambooth.py --attention xformers --class_data_dir /opt/ml/input/data/class_images/ --class_prompt photo\ of\ a\ man --gradient_accumulation_steps 1 --gradient_checkpointing True --instance_data_dir /opt/ml/input/data/images/ --instance_prompt photo\ of\ zwx\ man --learning_rate 2e-06 --lr_scheduler constant --lr_warmup_steps 0 --max_train_steps 300 --mixed_precision fp16 --model_name aws-trained-dreambooth-model --models_path /opt/ml/model/ --not_cache_latents True --num_class_images 50 --pretrained_model_name_or_path SG161222/Realistic_Vision_V1.4 --prior_loss_weight 0.5 --resolution 512 --sample_batch_size 1 --save_steps 300 --save_use_epochs False --train_batch_size 1 --train_text_encoder False --use_8bit_adam False --use_ema True --with_prior_preservation True"
2023-03-28 08:26:04,999 sagemaker-training-toolkit ERROR Encountered exit_code 1

I think the diffuser version in the public docker image is causing the issue. I do see some commits by @stevensu1977 to solve this issue but they are still occurring. Am I going wrong somewhere?

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

1 participant