mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
web and formatting fixes
- remove non-existent import InvokeAIWebConfig - fix workflow file formatting - clean up whitespace
This commit is contained in:
parent
eca1e449a8
commit
9e4e386c9b
6
.github/workflows/test-invoke-pip.yml
vendored
6
.github/workflows/test-invoke-pip.yml
vendored
@ -133,10 +133,10 @@ jobs:
|
|||||||
invokeai
|
invokeai
|
||||||
--no-patchmatch
|
--no-patchmatch
|
||||||
--no-nsfw_checker
|
--no-nsfw_checker
|
||||||
--precision=float32
|
--precision=float32
|
||||||
--always_use_cpu
|
--always_use_cpu
|
||||||
--outdir ${{ env.INVOKEAI_OUTDIR }}/${{ matrix.python-version }}/${{ matrix.pytorch }}
|
--outdir ${{ env.INVOKEAI_OUTDIR }}/${{ matrix.python-version }}/${{ matrix.pytorch }}
|
||||||
< ${{ env.TEST_PROMPTS }}
|
< ${{ env.TEST_PROMPTS }}
|
||||||
|
|
||||||
- name: Archive results
|
- name: Archive results
|
||||||
id: archive-results
|
id: archive-results
|
||||||
|
@ -7,7 +7,6 @@ from typing import types
|
|||||||
|
|
||||||
from ..services.default_graphs import create_system_graphs
|
from ..services.default_graphs import create_system_graphs
|
||||||
from ..services.latent_storage import DiskLatentsStorage, ForwardCacheLatentsStorage
|
from ..services.latent_storage import DiskLatentsStorage, ForwardCacheLatentsStorage
|
||||||
from ..services.config import InvokeAIWebConfig
|
|
||||||
from ..services.model_manager_initializer import get_model_manager
|
from ..services.model_manager_initializer import get_model_manager
|
||||||
from ..services.restoration_services import RestorationServices
|
from ..services.restoration_services import RestorationServices
|
||||||
from ..services.graph import GraphExecutionState, LibraryGraph
|
from ..services.graph import GraphExecutionState, LibraryGraph
|
||||||
|
@ -102,7 +102,7 @@ a Path object:
|
|||||||
conf - alias for the above
|
conf - alias for the above
|
||||||
embedding_path - path to the embeddings directory
|
embedding_path - path to the embeddings directory
|
||||||
lora_path - path to the LoRA directory
|
lora_path - path to the LoRA directory
|
||||||
|
|
||||||
In most cases, you will want to create a single InvokeAIAppConfig
|
In most cases, you will want to create a single InvokeAIAppConfig
|
||||||
object for the entire application. The get_invokeai_config() function
|
object for the entire application. The get_invokeai_config() function
|
||||||
does this:
|
does this:
|
||||||
@ -200,7 +200,7 @@ class InvokeAISettings(BaseSettings):
|
|||||||
settings_stanza = get_args(get_type_hints(cls)['type'])[0]
|
settings_stanza = get_args(get_type_hints(cls)['type'])[0]
|
||||||
else:
|
else:
|
||||||
settings_stanza = "Uncategorized"
|
settings_stanza = "Uncategorized"
|
||||||
|
|
||||||
env_prefix = cls.Config.env_prefix if hasattr(cls.Config,'env_prefix') else settings_stanza.upper()
|
env_prefix = cls.Config.env_prefix if hasattr(cls.Config,'env_prefix') else settings_stanza.upper()
|
||||||
|
|
||||||
initconf = cls.initconf.get(settings_stanza) \
|
initconf = cls.initconf.get(settings_stanza) \
|
||||||
@ -212,7 +212,7 @@ class InvokeAISettings(BaseSettings):
|
|||||||
for name, field in fields.items():
|
for name, field in fields.items():
|
||||||
if name not in cls._excluded():
|
if name not in cls._excluded():
|
||||||
current_default = field.default
|
current_default = field.default
|
||||||
|
|
||||||
category = field.field_info.extra.get("category","Uncategorized")
|
category = field.field_info.extra.get("category","Uncategorized")
|
||||||
env_name = env_prefix + '_' + name
|
env_name = env_prefix + '_' + name
|
||||||
if category in initconf and name in initconf.get(category):
|
if category in initconf and name in initconf.get(category):
|
||||||
@ -247,7 +247,7 @@ class InvokeAISettings(BaseSettings):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def _excluded(self)->List[str]:
|
def _excluded(self)->List[str]:
|
||||||
return ['type','initconf']
|
return ['type','initconf']
|
||||||
|
|
||||||
class Config:
|
class Config:
|
||||||
env_file_encoding = 'utf-8'
|
env_file_encoding = 'utf-8'
|
||||||
arbitrary_types_allowed = True
|
arbitrary_types_allowed = True
|
||||||
@ -263,7 +263,7 @@ class InvokeAISettings(BaseSettings):
|
|||||||
argparse_group = cls.argparse_groups[category]
|
argparse_group = cls.argparse_groups[category]
|
||||||
else:
|
else:
|
||||||
argparse_group = command_parser
|
argparse_group = command_parser
|
||||||
|
|
||||||
if get_origin(field_type) == Literal:
|
if get_origin(field_type) == Literal:
|
||||||
allowed_values = get_args(field.type_)
|
allowed_values = get_args(field.type_)
|
||||||
allowed_types = set()
|
allowed_types = set()
|
||||||
@ -367,7 +367,7 @@ setting environment variables INVOKEAI_<setting>.
|
|||||||
:param **kwargs: attributes to initialize with
|
:param **kwargs: attributes to initialize with
|
||||||
'''
|
'''
|
||||||
super().__init__(**kwargs)
|
super().__init__(**kwargs)
|
||||||
|
|
||||||
# Set the runtime root directory. We parse command-line switches here
|
# Set the runtime root directory. We parse command-line switches here
|
||||||
# in order to pick up the --root_dir option.
|
# in order to pick up the --root_dir option.
|
||||||
self.parse_args(argv)
|
self.parse_args(argv)
|
||||||
@ -447,7 +447,7 @@ setting environment variables INVOKEAI_<setting>.
|
|||||||
Path to the textual inversion embeddings directory.
|
Path to the textual inversion embeddings directory.
|
||||||
'''
|
'''
|
||||||
return self._resolve(self.embedding_dir) if self.embedding_dir else None
|
return self._resolve(self.embedding_dir) if self.embedding_dir else None
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def lora_path(self)->Path:
|
def lora_path(self)->Path:
|
||||||
'''
|
'''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user