don't write 'version:' to the invokeai.yaml file

This commit is contained in:
Lincoln Stein 2023-07-08 12:06:23 -04:00
parent 69ef1e1e56
commit 92d4486214

View File

@ -168,7 +168,7 @@ from argparse import ArgumentParser
from omegaconf import OmegaConf, DictConfig from omegaconf import OmegaConf, DictConfig
from pathlib import Path from pathlib import Path
from pydantic import BaseSettings, Field, parse_obj_as from pydantic import BaseSettings, Field, parse_obj_as
from typing import ClassVar, Dict, List, Literal, Union, get_origin, get_type_hints, get_args from typing import ClassVar, Dict, List, Set, Literal, Union, get_origin, get_type_hints, get_args
INIT_FILE = Path('invokeai.yaml') INIT_FILE = Path('invokeai.yaml')
MODEL_CORE = Path('models/core') MODEL_CORE = Path('models/core')
@ -269,8 +269,8 @@ class InvokeAISettings(BaseSettings):
parser.add_parser(cls.cmd_name(), help=cls.__doc__) parser.add_parser(cls.cmd_name(), help=cls.__doc__)
@classmethod @classmethod
def _excluded(self)->List[str]: def _excluded(self)->Set[str]:
return ['type','initconf'] return {'type','initconf','version'}
class Config: class Config:
env_file_encoding = 'utf-8' env_file_encoding = 'utf-8'