Several Errors when Finetuning Stable Diffusion on M1 Pro
Hello everyone! I recently tried following this guide to finetune stable diffusion. I get 2 errors. First error
AttributeError: Can't pickle local object 'main.<locals>.<lambda>'
Second error
CalledProcessError: Command '['/usr/bin/python3', 'train_dreambooth.py', '--pretrained_model_name_or_path=CompVis/stable-diffusion-v1-4', '--instance_data_dir=imgs/', '--output_dir=model', '--instance_prompt=A **** man', '--resolution=512', '--train_batch_size=1', '--gradient_accumulation_steps=1', '--learning_rate=5e-6', '--lr_scheduler=constant', '--lr_warmup_steps=0', '--max_train_steps=400']' returned non-zero exit status 1.
My computer specifications: Computer: MacBook Pro Chip: Apple M1 Max macOS Version: Ventura 13.0.1
Hi @fakerybakery! Unfortunately we don't currently support fine-tuning using the mps device as there are some limitations in PyTorch that make it very challenging to work. See, for example, this issue.
We'll update our guides when the situation changes.
@fakerybakery see "workaround" section in related https://github.com/huggingface/diffusers/issues/1466
I managed to fine-tune model once and even got picture of a dog in a bucket with same specs. But later fine-tuning resulted in model which produces only black images.
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Please note that issues that do not follow the contributing guidelines are likely to be ignored.