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

【Error】Stable Diffusion Colab doesn't work #2960

Open
meron32 opened this issue Dec 7, 2024 · 3 comments
Open

【Error】Stable Diffusion Colab doesn't work #2960

meron32 opened this issue Dec 7, 2024 · 3 comments

Comments

@meron32
Copy link

meron32 commented Dec 7, 2024

This is an error in the block Start Stable Diffusion tell me how to solve? :

Traceback (most recent call last):
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 13, in
initialize.imports()
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/initialize.py", line 17, in imports
import pytorch_lightning # noqa: F401
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/init.py", line 34, in
from pytorch_lightning.callbacks import Callback # noqa: E402
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/callbacks/init.py", line 26, in
from pytorch_lightning.callbacks.pruning import ModelPruning
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/callbacks/pruning.py", line 30, in
from pytorch_lightning.core.module import LightningModule
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/core/init.py", line 16, in
from pytorch_lightning.core.module import LightningModule
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/core/module.py", line 41, in
from pytorch_lightning.loggers import Logger, LoggerCollection
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/loggers/init.py", line 24, in
from pytorch_lightning.loggers.wandb import WandbLogger # noqa: F401
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/loggers/wandb.py", line 34, in
import wandb
File "/usr/local/lib/python3.10/dist-packages/wandb/init.py", line 21, in
from wandb import sdk as wandb_sdk
File "/usr/local/lib/python3.10/dist-packages/wandb/sdk/init.py", line 28, in
from .wandb_init import _attach, init
File "/usr/local/lib/python3.10/dist-packages/wandb/sdk/wandb_init.py", line 39, in
from . import wandb_login, wandb_setup
File "/usr/local/lib/python3.10/dist-packages/wandb/sdk/wandb_login.py", line 19, in
from .wandb_settings import Settings
File "/usr/local/lib/python3.10/dist-packages/wandb/sdk/wandb_settings.py", line 25, in
from pydantic import (
File "/usr/local/lib/python3.10/dist-packages/pydantic/init.py", line 418, in getattr
module = import_module(module_name, package=package)
File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/usr/local/lib/python3.10/dist-packages/pydantic/main.py", line 34, in
from ._internal import (
File "/usr/local/lib/python3.10/dist-packages/pydantic/_internal/_decorators.py", line 16, in
from ._core_utils import get_type_ref
File "/usr/local/lib/python3.10/dist-packages/pydantic/_internal/_core_utils.py", line 8, in
from pydantic_core import validate_core_schema as _validate_core_schema
ImportError: cannot import name 'validate_core_schema' from 'pydantic_core' (/usr/local/lib/python3.10/dist-packages/pydantic_core/init.py)

@MRINFINITE0
Copy link

Traceback (most recent call last):
File "/content/diffusers/examples/dreambooth/train_dreambooth.py", line 803, in
main()
File "/content/diffusers/examples/dreambooth/train_dreambooth.py", line 640, in main
accelerator.init_trackers("dreambooth", config=vars(args))
File "/usr/local/lib/python3.10/dist-packages/accelerate/accelerator.py", line 1067, in init_trackers
tracker.store_init_configuration(config)
File "/usr/local/lib/python3.10/dist-packages/accelerate/tracking.py", line 152, in store_init_configuration
self.writer.add_hparams(values, metric_dict={})
File "/usr/local/lib/python3.10/dist-packages/torch/utils/tensorboard/writer.py", line 330, in add_hparams
exp, ssi, sei = hparams(hparam_dict, metric_dict, hparam_domain_discrete)
File "/usr/local/lib/python3.10/dist-packages/torch/utils/tensorboard/summary.py", line 270, in hparams
ssi.hparams[k].string_value = v
File "/usr/local/lib/python3.10/dist-packages/google/protobuf/internal/containers.py", line 70, in getitem
return self._values[key]
TypeError: list indices must be integers or slices, not str
Traceback (most recent call last):
File "/usr/local/bin/accelerate", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.10/dist-packages/accelerate/commands/accelerate_cli.py", line 43, in main
args.func(args)
File "/usr/local/lib/python3.10/dist-packages/accelerate/commands/launch.py", line 837, in launch_command
simple_launcher(args)
File "/usr/local/lib/python3.10/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', '--image_captions_filename', '--train_only_unet', '--save_starting_step=500', '--save_n_steps=0', '--Session_dir=/content/gdrive/MyDrive/Fast-Dreambooth/Sessions/mrunal', '--pretrained_model_name_or_path=/content/stable-diffusion-v1-5', '--instance_data_dir=/content/gdrive/MyDrive/Fast-Dreambooth/Sessions/mrunal/instance_images', '--output_dir=/content/models/mrunal', '--captions_dir=/content/gdrive/MyDrive/Fast-Dreambooth/Sessions/mrunal/captions', '--instance_prompt=', '--seed=983297', '--resolution=512', '--mixed_precision=fp16', '--train_batch_size=1', '--gradient_accumulation_steps=1', '--use_8bit_adam', '--learning_rate=2e-06', '--lr_scheduler=linear', '--lr_warmup_steps=0', '--max_train_steps=1500']' returned non-zero exit status 1.
Something went wrong

I got this error any solution?? I have been using 12 images each of 512px

@priyadharsan1403
Copy link

Traceback (most recent call last): File "/content/diffusers/examples/dreambooth/train_dreambooth.py", line 803, in main() File "/content/diffusers/examples/dreambooth/train_dreambooth.py", line 640, in main accelerator.init_trackers("dreambooth", config=vars(args)) File "/usr/local/lib/python3.10/dist-packages/accelerate/accelerator.py", line 1067, in init_trackers tracker.store_init_configuration(config) File "/usr/local/lib/python3.10/dist-packages/accelerate/tracking.py", line 152, in store_init_configuration self.writer.add_hparams(values, metric_dict={}) File "/usr/local/lib/python3.10/dist-packages/torch/utils/tensorboard/writer.py", line 330, in add_hparams exp, ssi, sei = hparams(hparam_dict, metric_dict, hparam_domain_discrete) File "/usr/local/lib/python3.10/dist-packages/torch/utils/tensorboard/summary.py", line 270, in hparams ssi.hparams[k].string_value = v File "/usr/local/lib/python3.10/dist-packages/google/protobuf/internal/containers.py", line 70, in getitem return self._values[key] TypeError: list indices must be integers or slices, not str Traceback (most recent call last): File "/usr/local/bin/accelerate", line 8, in sys.exit(main()) File "/usr/local/lib/python3.10/dist-packages/accelerate/commands/accelerate_cli.py", line 43, in main args.func(args) File "/usr/local/lib/python3.10/dist-packages/accelerate/commands/launch.py", line 837, in launch_command simple_launcher(args) File "/usr/local/lib/python3.10/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', '--image_captions_filename', '--train_only_unet', '--save_starting_step=500', '--save_n_steps=0', '--Session_dir=/content/gdrive/MyDrive/Fast-Dreambooth/Sessions/mrunal', '--pretrained_model_name_or_path=/content/stable-diffusion-v1-5', '--instance_data_dir=/content/gdrive/MyDrive/Fast-Dreambooth/Sessions/mrunal/instance_images', '--output_dir=/content/models/mrunal', '--captions_dir=/content/gdrive/MyDrive/Fast-Dreambooth/Sessions/mrunal/captions', '--instance_prompt=', '--seed=983297', '--resolution=512', '--mixed_precision=fp16', '--train_batch_size=1', '--gradient_accumulation_steps=1', '--use_8bit_adam', '--learning_rate=2e-06', '--lr_scheduler=linear', '--lr_warmup_steps=0', '--max_train_steps=1500']' returned non-zero exit status 1. Something went wrong

I got this error any solution?? I have been using 12 images each of 512px

i too getting same error

@kaitas
Copy link

kaitas commented Dec 20, 2024

I've tacked to fix the issue, so it seems comes from protobuf and wandb dependencies.
I'm not sure why they are included but maybe it comes from Flux support I guess.

I'll continue to fix it in my repo.
aicuai/Book-StartGuideSDXL#5

maybe we need to fix static versions for them...
https://raw.githubusercontent.com/TheLastBen/fast-stable-diffusion/main/Dependencies/A1111.txt

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

4 participants