diffusers icon indicating copy to clipboard operation
diffusers copied to clipboard

have a small problem after upgrade diffusers and others

Open A-Polyana opened this issue 3 years ago • 14 comments

hello! I upgrade my diffuers and use dreamtbooth but It doesn't work like this code

> The following values were not passed to `accelerate launch` and had defaults used instead:
>         `--num_cpu_threads_per_process` was set to `4` to improve out-of-box performance
> To avoid this warning pass in values for each of the problematic parameters or run `accelerate config`.
> [2022-10-27 15:46:38,804] [WARNING] [runner.py:179:fetch_hostfile] Unable to find hostfile, will proceed with training with local resources only.
> [2022-10-27 15:46:38,850] [INFO] [runner.py:507:main] cmd = /home/polyana/anaconda3/envs/diffusers/bin/python -u -m deepspeed.launcher.launch --world_info=eyJsb2NhbGhvc3QiOiBbMF19 --master_addr=127.0.0.1 --master_port=29500 --no_local_rank train_dreambooth.py --pretrained_model_name_or_path=****/*** --instance_data_dir=training --class_data_dir=classes --output_dir=model --with_prior_preservation --prior_loss_weight=1.0 --instance_prompt=photo of a  --class_prompt=photo of a  --resolution=512 --train_batch_size=1 --sample_batch_size=1 --gradient_accumulation_steps=1 --gradient_checkpointing --learning_rate=5e-6 --lr_scheduler=constant --lr_warmup_steps=0 --num_class_images=200 --max_train_steps=3000 --mixed_precision=fp16
> [2022-10-27 15:46:40,204] [INFO] [launch.py:136:main] WORLD INFO DICT: {'localhost': [0]}
> [2022-10-27 15:46:40,204] [INFO] [launch.py:142:main] nnodes=1, num_local_procs=1, node_rank=0
> [2022-10-27 15:46:40,204] [INFO] [launch.py:155:main] global_rank_mapping=defaultdict(<class 'list'>, {'localhost': [0]})
> [2022-10-27 15:46:40,204] [INFO] [launch.py:156:main] dist_world_size=1
> [2022-10-27 15:46:40,204] [INFO] [launch.py:158:main] Setting CUDA_VISIBLE_DEVICES=0
> Traceback (most recent call last):
>   File "/home/polyana/github/diffusers/examples/dreambooth/train_dreambooth.py", line 659, in <module>
>     args = parse_args()
> TypeError: parse_args() missing 1 required positional argument: 'input_args'
> [2022-10-27 15:46:43,210] [INFO] [launch.py:286:sigkill_handler] Killing subprocess 1380
> [2022-10-27 15:46:43,210] [ERROR] [launch.py:292:sigkill_handler] ['/home/polyana/anaconda3/envs/diffusers/bin/python', '-u', 'train_dreambooth.py', '--pretrained_model_name_or_path=****/****', '--instance_data_dir=training', '--class_data_dir=classes', '--output_dir=model', '--with_prior_preservation', '--prior_loss_weight=1.0', '--instance_prompt=photo of a', '--class_prompt=photo of a', '--resolution=512', '--train_batch_size=1', '--sample_batch_size=1', '--gradient_accumulation_steps=1', '--gradient_checkpointing', '--learning_rate=5e-6', '--lr_scheduler=constant', '--lr_warmup_steps=0', '--num_class_images=200', '--max_train_steps=3000', '--mixed_precision=fp16'] exits with return code = 1
> Traceback (most recent call last):
>   File "/home/polyana/anaconda3/envs/diffusers/bin/accelerate", line 8, in <module>
>     sys.exit(main())
>   File "/home/polyana/anaconda3/envs/diffusers/lib/python3.9/site-packages/accelerate/commands/accelerate_cli.py", line 43, in main
>     args.func(args)
>   File "/home/polyana/anaconda3/envs/diffusers/lib/python3.9/site-packages/accelerate/commands/launch.py", line 827, in launch_command
>     deepspeed_launcher(args)
>   File "/home/polyana/anaconda3/envs/diffusers/lib/python3.9/site-packages/accelerate/commands/launch.py", line 540, in deepspeed_launcher
>     raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd)
> subprocess.CalledProcessError: Command '['deepspeed', '--no_local_rank', '--num_gpus', '1', 'train_dreambooth.py', '--pretrained_model_name_or_path=****/****', '--instance_data_dir=training', '--class_data_dir=classes', '--output_dir=model', '--with_prior_preservation', '--prior_loss_weight=1.0', '--instance_prompt=photo of a', '--class_prompt=photo of a', '--resolution=512', '--train_batch_size=1', '--sample_batch_size=1', '--gradient_accumulation_steps=1', '--gradient_checkpointing', '--learning_rate=5e-6', '--lr_scheduler=constant', '--lr_warmup_steps=0', '--num_class_images=200', '--max_train_steps=3000', '--mixed_precision=fp16']' returned non-zero exit status 1.

I Use this .sh(like README 8GB Train guide) with WSL2 Ubuntu WIN11 22H2, RTX3070 TI, 48GB RAM, DeepSpeed

export LD_LIBRARY_PATH=/usr/lib/wsl/lib:$LD_LIBRARY_PATH
export MODEL_NAME="****/****"
export INSTANCE_DIR="training"
export CLASS_DIR="classes"
export OUTPUT_DIR="model"
 
accelerate launch train_dreambooth.py \
  --pretrained_model_name_or_path=$MODEL_NAME \
  --instance_data_dir=$INSTANCE_DIR \
  --class_data_dir=$CLASS_DIR \
  --output_dir=$OUTPUT_DIR \
  --with_prior_preservation --prior_loss_weight=1.0 \
  --instance_prompt="photo of a" \
  --class_prompt="photo of a" \
  --resolution=512 \
  --train_batch_size=1 \
  --sample_batch_size=1 \
  --gradient_accumulation_steps=1 --gradient_checkpointing \
  --learning_rate=5e-6 \
  --lr_scheduler="constant" \
  --lr_warmup_steps=0 \
  --num_class_images=200 \
  --max_train_steps=3000 \
  --mixed_precision=fp16

Can you help me with what I have to do to get it back to work?

A-Polyana avatar Oct 27 '22 06:10 A-Polyana

I Try re-install hugingface/diffuers git and transformers but still saw error message like this

        `--num_cpu_threads_per_process` was set to `4` to improve out-of-box performance
To avoid this warning pass in values for each of the problematic parameters or run `accelerate config`.
[2022-10-28 12:54:39,347] [WARNING] [runner.py:179:fetch_hostfile] Unable to find hostfile, will proceed with training with local resources only.
[2022-10-28 12:54:39,395] [INFO] [runner.py:507:main] cmd = /home/polyana/anaconda3/envs/diffusers/bin/python -u -m deepspeed.launcher.launch --world_info=eyJsb2NhbGhvc3QiOiBbMF19 --master_addr=127.0.0.1 --master_port=29500 --no_local_rank train_dreambooth.py --pretrained_model_name_or_path=****/**** --instance_data_dir=training --class_data_dir=classes --output_dir=model --with_prior_preservation --prior_loss_weight=1.0 --instance_prompt=photo of a **** --class_prompt=photo of a **** --resolution=512 --train_batch_size=1 --sample_batch_size=1 --gradient_accumulation_steps=1 --gradient_checkpointing --learning_rate=5e-6 --lr_scheduler=constant --lr_warmup_steps=0 --num_class_images=200 --max_train_steps=3000 --mixed_precision=fp16
[2022-10-28 12:54:40,960] [INFO] [launch.py:136:main] WORLD INFO DICT: {'localhost': [0]}
[2022-10-28 12:54:40,960] [INFO] [launch.py:142:main] nnodes=1, num_local_procs=1, node_rank=0
[2022-10-28 12:54:40,960] [INFO] [launch.py:155:main] global_rank_mapping=defaultdict(<class 'list'>, {'localhost': [0]})
[2022-10-28 12:54:40,960] [INFO] [launch.py:156:main] dist_world_size=1
[2022-10-28 12:54:40,960] [INFO] [launch.py:158:main] Setting CUDA_VISIBLE_DEVICES=0
/home/polyana/anaconda3/envs/diffusers/lib/python3.9/site-packages/accelerate/accelerator.py:179: UserWarning: `log_with=tensorboard` was passed but no supported trackers are currently installed.
  warnings.warn(f"`log_with={log_with}` was passed but no supported trackers are currently installed.")
[2022-10-28 12:54:43,300] [INFO] [comm.py:633:init_distributed] Initializing TorchBackend in DeepSpeed with backend nccl
Fetching 15 files: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████| 15/15 [00:00<00:00, 41228.41it/s]
You have passed `None` for safety_checker to disable its functionality in <class 'diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion.StableDiffusionPipeline'>. Note that this might lead to problems when using <class 'diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion.StableDiffusionPipeline'> and is not recommended.
Generating class images:   0%|                                                                                                       | 0/200 [00:01<?, ?it/s]
Traceback (most recent call last):
  File "/home/polyana/github/diffusers/examples/dreambooth/train_dreambooth.py", line 662, in <module>
    main(args)
  File "/home/polyana/github/diffusers/examples/dreambooth/train_dreambooth.py", line 376, in main
    images = pipeline(example["prompt"]).images
  File "/home/polyana/anaconda3/envs/diffusers/lib/python3.9/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
    return func(*args, **kwargs)
  File "/home/polyana/anaconda3/envs/diffusers/lib/python3.9/site-packages/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py", line 328, in __call__
    noise_pred = self.unet(latent_model_input, t, encoder_hidden_states=text_embeddings).sample
  File "/home/polyana/anaconda3/envs/diffusers/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1190, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home/polyana/anaconda3/envs/diffusers/lib/python3.9/site-packages/diffusers/models/unet_2d_condition.py", line 296, in forward
    sample, res_samples = downsample_block(
  File "/home/polyana/anaconda3/envs/diffusers/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1190, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home/polyana/anaconda3/envs/diffusers/lib/python3.9/site-packages/diffusers/models/unet_blocks.py", line 563, in forward
    hidden_states = attn(hidden_states, context=encoder_hidden_states)
  File "/home/polyana/anaconda3/envs/diffusers/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1190, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home/polyana/anaconda3/envs/diffusers/lib/python3.9/site-packages/diffusers/models/attention.py", line 169, in forward
    hidden_states = block(hidden_states, context=context)
  File "/home/polyana/anaconda3/envs/diffusers/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1190, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home/polyana/anaconda3/envs/diffusers/lib/python3.9/site-packages/diffusers/models/attention.py", line 218, in forward
    hidden_states = self.attn1(self.norm1(hidden_states)) + hidden_states
  File "/home/polyana/anaconda3/envs/diffusers/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1190, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home/polyana/anaconda3/envs/diffusers/lib/python3.9/site-packages/diffusers/models/attention.py", line 297, in forward
    return self.to_out(hidden_states)
  File "/home/polyana/anaconda3/envs/diffusers/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1190, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home/polyana/anaconda3/envs/diffusers/lib/python3.9/site-packages/torch/nn/modules/container.py", line 204, in forward
    input = module(input)
  File "/home/polyana/anaconda3/envs/diffusers/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1190, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home/polyana/anaconda3/envs/diffusers/lib/python3.9/site-packages/torch/nn/modules/linear.py", line 114, in forward
    return F.linear(input, self.weight, self.bias)
RuntimeError: mat1 and mat2 must have the same dtype
[2022-10-28 12:54:58,982] [INFO] [launch.py:286:sigkill_handler] Killing subprocess 932
[2022-10-28 12:54:58,983] [ERROR] [launch.py:292:sigkill_handler] ['/home/polyana/anaconda3/envs/diffusers/bin/python', '-u', 'train_dreambooth.py', '--pretrained_model_name_or_path=****/****', '--instance_data_dir=training', '--class_data_dir=classes', '--output_dir=model', '--with_prior_preservation', '--prior_loss_weight=1.0', '--instance_prompt=photo of a ****', '--class_prompt=photo of a ****', '--resolution=512', '--train_batch_size=1', '--sample_batch_size=1', '--gradient_accumulation_steps=1', '--gradient_checkpointing', '--learning_rate=5e-6', '--lr_scheduler=constant', '--lr_warmup_steps=0', '--num_class_images=200', '--max_train_steps=3000', '--mixed_precision=fp16'] exits with return code = 1
Traceback (most recent call last):
  File "/home/polyana/anaconda3/envs/diffusers/bin/accelerate", line 8, in <module>
    sys.exit(main())
  File "/home/polyana/anaconda3/envs/diffusers/lib/python3.9/site-packages/accelerate/commands/accelerate_cli.py", line 43, in main
    args.func(args)
  File "/home/polyana/anaconda3/envs/diffusers/lib/python3.9/site-packages/accelerate/commands/launch.py", line 827, in launch_command
    deepspeed_launcher(args)
  File "/home/polyana/anaconda3/envs/diffusers/lib/python3.9/site-packages/accelerate/commands/launch.py", line 540, in deepspeed_launcher
    raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd)
subprocess.CalledProcessError: Command '['deepspeed', '--no_local_rank', '--num_gpus', '1', 'train_dreambooth.py', '--pretrained_model_name_or_path=****/****', '--instance_data_dir=training', '--class_data_dir=classes', '--output_dir=model', '--with_prior_preservation', '--prior_loss_weight=1.0', '--instance_prompt=photo of a ****', '--class_prompt=photo of a ****', '--resolution=512', '--train_batch_size=1', '--sample_batch_size=1', '--gradient_accumulation_steps=1', '--gradient_checkpointing', '--learning_rate=5e-6', '--lr_scheduler=constant', '--lr_warmup_steps=0', '--num_class_images=200', '--max_train_steps=3000', '--mixed_precision=fp16']' returned non-zero exit status 1.

A-Polyana avatar Oct 28 '22 04:10 A-Polyana

this has something to do with the classes, if you already have some, it should not trigger an error. I found it out, after i deleted the content of the classes folder (without any new git pulls, etc.), everything was identical (same machine, env, session, etc.).

petekay avatar Oct 28 '22 22:10 petekay

this has something to do with the classes, if you already have some, it should not trigger an error. I found it out, after i deleted the content of the classes folder (without any new git pulls, etc.), everything was identical (same machine, env, session, etc.).

okay i will check it after full classes image

A-Polyana avatar Oct 29 '22 06:10 A-Polyana

this has something to do with the classes, if you already have some, it should not trigger an error. I found it out, after i deleted the content of the classes folder (without any new git pulls, etc.), everything was identical (same machine, env, session, etc.).

if in classeses no images

The following values were not passed to `accelerate launch` and had defaults used instead:
        `--num_cpu_threads_per_process` was set to `4` to improve out-of-box performance
To avoid this warning pass in values for each of the problematic parameters or run `accelerate config`.
The cache for model files in Transformers v4.22.0 has been updated. Migrating your old cache. This is a one-time only operation. You can interrupt this and resume the migration later on by calling `transformers.utils.move_cache()`.
Moving 0 files to the new cache system
0it [00:00, ?it/s]
[2022-10-29 16:23:24,991] [INFO] [comm.py:633:init_distributed] Initializing TorchBackend in DeepSpeed with backend nccl
Fetching 12 files: 100%|█████████████████████████████████████████████████████████████| 12/12 [00:00<00:00, 48865.68it/s]
Traceback (most recent call last):
  File "/home/polyana/github/diffusers/examples/dreambooth/train_dreambooth.py", line 662, in <module>
    main(args)
  File "/home/polyana/github/diffusers/examples/dreambooth/train_dreambooth.py", line 356, in main
    pipeline = StableDiffusionPipeline.from_pretrained(
  File "/home/polyana/anaconda3/envs/diffusers/lib/python3.9/site-packages/diffusers/pipeline_utils.py", line 577, in from_pretrained
    raise ValueError(
ValueError: Pipeline <class 'diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion.StableDiffusionPipeline'> expected {'safety_checker', 'scheduler', 'feature_extractor', 'text_encoder', 'tokenizer', 'vae', 'unet'}, but only {'safety_checker', 'scheduler', 'text_encoder', 'tokenizer', 'vae', 'unet'} were passed.
ERROR:torch.distributed.elastic.multiprocessing.api:failed (exitcode: 1) local_rank: 0 (pid: 29338) of binary: /home/polyana/anaconda3/envs/diffusers/bin/python

if in classeses in images(--num_class_images=10) i saw this message after train

Steps:  80%|████████████████████████████████████████████▊           | 8/10 [00:17<00:02,  1.31s/it, loss=0.501, lr=5e-6][2022-10-29 16:22:26,037] [INFO] [stage_1_and_2.py:1763:step] [deepspeed] OVERFLOW! Rank 0 Skipping step. Attempted loss scale: 16777216.0, reducing to 8388608.0
Steps:  90%|██████████████████████████████████████████████████▍     | 9/10 [00:18<00:01,  1.23s/it, loss=0.636, lr=5e-6][2022-10-29 16:22:27,110] [INFO] [stage_1_and_2.py:1763:step] [deepspeed] OVERFLOW! Rank 0 Skipping step. Attempted loss scale: 8388608.0, reducing to 4194304.0
Fetching 12 files: 100%|██████████████████████████████████████████████████████████████| 12/12 [00:00<00:00, 7184.08it/s]
Traceback (most recent call last):                                                               | 0/12 [00:00<?, ?it/s]
  File "/home/polyana/github/diffusers/examples/dreambooth/train_dreambooth.py", line 662, in <module>
    main(args)
  File "/home/polyana/github/diffusers/examples/dreambooth/train_dreambooth.py", line 646, in main
    pipeline = StableDiffusionPipeline.from_pretrained(
  File "/home/polyana/anaconda3/envs/diffusers/lib/python3.9/site-packages/diffusers/pipeline_utils.py", line 577, in from_pretrained
    raise ValueError(
ValueError: Pipeline <class 'diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion.StableDiffusionPipeline'> expected {'unet', 'text_encoder', 'feature_extractor', 'scheduler', 'tokenizer', 'safety_checker', 'vae'}, but only {'unet', 'text_encoder', 'scheduler', 'tokenizer', 'vae'} were passed.
Steps: 100%|███████████████████████████████████████████████████████| 10/10 [00:22<00:00,  2.26s/it, loss=0.112, lr=5e-6]
ERROR:torch.distributed.elastic.multiprocessing.api:failed (exitcode: 1) local_rank: 0 (pid: 29215) of binary: /home/polyana/anaconda3/envs/diffusers/bin/python

that very interesting

A-Polyana avatar Oct 29 '22 07:10 A-Polyana

cc @patil-suraj here

patrickvonplaten avatar Nov 02 '22 11:11 patrickvonplaten

Hey @A-Polyana

The first error that you posted

> Traceback (most recent call last):
>   File "/home/polyana/github/diffusers/examples/dreambooth/train_dreambooth.py", line 659, in <module>
>     args = parse_args()

it has been resolved in this commit https://github.com/huggingface/diffusers/commit/eceeebdf9147fa8daa6acaa69088def0f60315a2

from the other logs I see the error is

ValueError: Pipeline <class 'diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion.StableDiffusionPipeline'> expected {'unet', 'text_encoder', 'feature_extractor', 'scheduler', 'tokenizer', 'safety_checker', 'vae'}, but only {'unet', 'text_encoder', 'scheduler', 'tokenizer', 'vae'} were passed.

this means that the safety checker is not saved in the model that you are passing to the script. Make sure to either

  • save safety_checker in the model
  • or modify the script to set safety_checker=None in StableDiffusionPipeline.from_pretrained

hope this helps

patil-suraj avatar Nov 02 '22 13:11 patil-suraj

Hey @A-Polyana

The first error that you posted

> Traceback (most recent call last):
>   File "/home/polyana/github/diffusers/examples/dreambooth/train_dreambooth.py", line 659, in <module>
>     args = parse_args()

it has been resolved in this commit eceeebd

from the other logs I see the error is

ValueError: Pipeline <class 'diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion.StableDiffusionPipeline'> expected {'unet', 'text_encoder', 'feature_extractor', 'scheduler', 'tokenizer', 'safety_checker', 'vae'}, but only {'unet', 'text_encoder', 'scheduler', 'tokenizer', 'vae'} were passed.

this means that the safety checker is not saved in the model that you are passing to the script. Make sure to either

  • save safety_checker in the model
  • or modify the script to set safety_checker=None in StableDiffusionPipeline.from_pretrained

hope this helps

Now Generating class images work`s well! I think I need to see how it goes

A-Polyana avatar Nov 02 '22 15:11 A-Polyana

yep! Now work`s well all! with deepSpeed

A-Polyana avatar Nov 02 '22 15:11 A-Polyana

Glad it's fixed!

patil-suraj avatar Nov 02 '22 15:11 patil-suraj

Glad it's fixed!

Ty for help! but There's still a little problem runwayml/stable-diffusion-v1-5 Model well working But Other Model Not work :(

Traceback (most recent call last):                                                               | 0/12 [00:00<?, ?it/s]
  File "/home/polyana/github/diffusers/examples/dreambooth/train_dreambooth.py", line 660, in <module>
    main(args)
  File "/home/polyana/github/diffusers/examples/dreambooth/train_dreambooth.py", line 644, in main
    pipeline = StableDiffusionPipeline.from_pretrained(
  File "/home/polyana/anaconda3/envs/diffusers/lib/python3.9/site-packages/diffusers/pipeline_utils.py", line 581, in from_pretrained
    raise ValueError(
ValueError: Pipeline <class 'diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion.StableDiffusionPipeline'> expected {'feature_extractor', 'tokenizer', 'scheduler', 'text_encoder', 'safety_checker', 'vae', 'unet'}, but only {'tokenizer', 'scheduler', 'text_encoder', 'vae', 'unet'} were passed.
Steps: 100%|██████████████████████████████████████████████████████| 10/10 [00:18<00:00,  1.88s/it, loss=0.0784, lr=5e-6]
ERROR:torch.distributed.elastic.multiprocessing.api:failed (exitcode: 1) local_rank: 0 (pid: 3914) of binary: /home/polyana/anaconda3/envs/diffusers/bin/python

Maybe I do upgrade safety_checker in the model It was built around the same time as the stable-diffusion-v1.4 model

A-Polyana avatar Nov 02 '22 15:11 A-Polyana

Just answered here https://github.com/huggingface/diffusers/issues/1068#issuecomment-1308883358

patil-suraj avatar Nov 09 '22 15:11 patil-suraj

Glad it's fixed!

Ty for help! but There's still a little problem runwayml/stable-diffusion-v1-5 Model well working But Other Model Not work :(

Traceback (most recent call last):                                                               | 0/12 [00:00<?, ?it/s]
  File "/home/polyana/github/diffusers/examples/dreambooth/train_dreambooth.py", line 660, in <module>
    main(args)
  File "/home/polyana/github/diffusers/examples/dreambooth/train_dreambooth.py", line 644, in main
    pipeline = StableDiffusionPipeline.from_pretrained(
  File "/home/polyana/anaconda3/envs/diffusers/lib/python3.9/site-packages/diffusers/pipeline_utils.py", line 581, in from_pretrained
    raise ValueError(
ValueError: Pipeline <class 'diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion.StableDiffusionPipeline'> expected {'feature_extractor', 'tokenizer', 'scheduler', 'text_encoder', 'safety_checker', 'vae', 'unet'}, but only {'tokenizer', 'scheduler', 'text_encoder', 'vae', 'unet'} were passed.
Steps: 100%|██████████████████████████████████████████████████████| 10/10 [00:18<00:00,  1.88s/it, loss=0.0784, lr=5e-6]
ERROR:torch.distributed.elastic.multiprocessing.api:failed (exitcode: 1) local_rank: 0 (pid: 3914) of binary: /home/polyana/anaconda3/envs/diffusers/bin/python

Maybe I do upgrade safety_checker in the model It was built around the same time as the stable-diffusion-v1.4 model

Is your problem solved?

universewill avatar Nov 25 '22 14:11 universewill

Glad it's fixed!

Ty for help! but There's still a little problem runwayml/stable-diffusion-v1-5 Model well working But Other Model Not work :(

Traceback (most recent call last):                                                               | 0/12 [00:00<?, ?it/s]
  File "/home/polyana/github/diffusers/examples/dreambooth/train_dreambooth.py", line 660, in <module>
    main(args)
  File "/home/polyana/github/diffusers/examples/dreambooth/train_dreambooth.py", line 644, in main
    pipeline = StableDiffusionPipeline.from_pretrained(
  File "/home/polyana/anaconda3/envs/diffusers/lib/python3.9/site-packages/diffusers/pipeline_utils.py", line 581, in from_pretrained
    raise ValueError(
ValueError: Pipeline <class 'diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion.StableDiffusionPipeline'> expected {'feature_extractor', 'tokenizer', 'scheduler', 'text_encoder', 'safety_checker', 'vae', 'unet'}, but only {'tokenizer', 'scheduler', 'text_encoder', 'vae', 'unet'} were passed.
Steps: 100%|██████████████████████████████████████████████████████| 10/10 [00:18<00:00,  1.88s/it, loss=0.0784, lr=5e-6]
ERROR:torch.distributed.elastic.multiprocessing.api:failed (exitcode: 1) local_rank: 0 (pid: 3914) of binary: /home/polyana/anaconda3/envs/diffusers/bin/python

Maybe I do upgrade safety_checker in the model It was built around the same time as the stable-diffusion-v1.4 model

Is your problem solved?

maybe not

A-Polyana avatar Nov 25 '22 21:11 A-Polyana

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.

github-actions[bot] avatar Dec 20 '22 15:12 github-actions[bot]