fast-stable-diffusion icon indicating copy to clipboard operation
fast-stable-diffusion copied to clipboard

subprocess.CalledProcessError: Command returned non-zero exit status 1.

Open Drjacky opened this issue 3 years ago • 3 comments

Steps:   0% 0/500 [00:00<?, ?it/s]Traceback (most recent call last):
  File "/content/diffusers/examples/dreambooth/train_dreambooth.py", line 585, in <module>
    main()
  File "/content/diffusers/examples/dreambooth/train_dreambooth.py", line 509, in main
    for step, batch in enumerate(train_dataloader):
  File "/usr/local/lib/python3.7/dist-packages/accelerate/data_loader.py", line 348, in __iter__
    current_batch = next(dataloader_iter)
  File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/dataloader.py", line 681, in __next__
    data = self._next_data()
  File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/dataloader.py", line 721, in _next_data
    data = self._dataset_fetcher.fetch(index)  # may raise StopIteration
  File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/fetch.py", line 49, in <listcomp>
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/content/diffusers/examples/dreambooth/train_dreambooth.py", line 259, in __getitem__
    instance_image = Image.open(self.instance_images_path[index % self.num_instance_images])
  File "/usr/local/lib/python3.7/dist-packages/PIL/Image.py", line 2896, in open
    "cannot identify image file %r" % (filename if filename else fp)
PIL.UnidentifiedImageError: cannot identify image file '/content/data/this is myself whose nickname is drjekyll/birme-512x512.zip'
Steps:   0% 0/500 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "/usr/local/bin/accelerate", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/dist-packages/accelerate/commands/accelerate_cli.py", line 43, in main
    args.func(args)
  File "/usr/local/lib/python3.7/dist-packages/accelerate/commands/launch.py", line 837, in launch_command
    simple_launcher(args)
  File "/usr/local/lib/python3.7/dist-packages/accelerate/commands/launch.py", line 354, in simple_launcher
    raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd)
subprocess.CalledProcessError: Command '['/usr/bin/python3', '/content/diffusers/examples/dreambooth/train_dreambooth.py', '--pretrained_model_name_or_path=/content/stable-diffusion-v1-4', '--instance_data_dir=/content/data/this is myself whose nickname is drjekyll', '--class_data_dir=/content/data/person', '--output_dir=/content/models/this is myself whose nickname is drjekyll', '--with_prior_preservation', '--prior_loss_weight=1.0', '--instance_prompt=photo of a this is myself whose nickname is drjekyll person', '--class_prompt=photo of a person', '--seed=1125', '--resolution=512', '--mixed_precision=fp16', '--train_batch_size=1', '--gradient_accumulation_steps=1', '--use_8bit_adam', '--learning_rate=5e-6', '--lr_scheduler=constant', '--lr_warmup_steps=0', '--max_train_steps=500', '--num_class_images=200']' returned non-zero exit status 1.
Something went wrong

Drjacky avatar Oct 13 '22 13:10 Drjacky

remove "birme-512x512.zip'" from the instance folder, it should contain only picture files

TheLastBen avatar Oct 13 '22 13:10 TheLastBen

The error is gone but, there is no output after running Start DreamBooth cell in the google drive: Screen Shot 2022-10-13 at 15 56 57 Screen Shot 2022-10-13 at 15 57 08

Drjacky avatar Oct 13 '22 14:10 Drjacky

it looks like you lost network connection briefly

TheLastBen avatar Oct 13 '22 15:10 TheLastBen