Skip to content

Error while running main.py #368

@Griphcode

Description

@Griphcode

I get this error when i run the main.py file

Global seed set to 23
Traceback (most recent call last):
  File "c:\Users\admin\stable-diffusion\main.py", line 552, in <module>
    model = instantiate_from_config(config.model)
  File "C:\Python310\lib\site-packages\omegaconf\dictconfig.py", line 355, in __getattr__
    self._format_and_raise(
  File "C:\Python310\lib\site-packages\omegaconf\base.py", line 231, in _format_and_raise
    format_and_raise(
  File "C:\Python310\lib\site-packages\omegaconf\_utils.py", line 900, in format_and_raise
    _raise(ex, cause)
  File "C:\Python310\lib\site-packages\omegaconf\_utils.py", line 798, in _raise
    raise ex.with_traceback(sys.exc_info()[2])  # set env var OC_CAUSE=1 for full trace
  File "C:\Python310\lib\site-packages\omegaconf\dictconfig.py", line 351, in __getattr__
    return self._get_impl(
  File "C:\Python310\lib\site-packages\omegaconf\dictconfig.py", line 442, in _get_impl
    node = self._get_child(
  File "C:\Python310\lib\site-packages\omegaconf\basecontainer.py", line 73, in _get_child
    child = self._get_node(
  File "C:\Python310\lib\site-packages\omegaconf\dictconfig.py", line 480, in _get_node
    raise ConfigKeyError(f"Missing key {key!s}")
omegaconf.errors.ConfigAttributeError: Missing key model
    full_key: model
    object_type=dict

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\Users\admin\stable-diffusion\main.py", line 760, in <module>
    if trainer.global_rank == 0:
NameError: name 'trainer' is not defined. Did you mean: 'Trainer'?```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions