mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Merge branch 'main' into metadata-fix
This commit is contained in:
commit
c90c4a32ee
@ -767,8 +767,8 @@ def main():
|
|||||||
if migrate_if_needed(opt, config.root_path):
|
if migrate_if_needed(opt, config.root_path):
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
if not config.model_conf_path.exists():
|
# run this unconditionally in case new directories need to be added
|
||||||
initialize_rootdir(config.root_path, opt.yes_to_all)
|
initialize_rootdir(config.root_path, opt.yes_to_all)
|
||||||
|
|
||||||
models_to_download = default_user_selections(opt)
|
models_to_download = default_user_selections(opt)
|
||||||
new_init_file = config.root_path / 'invokeai.yaml'
|
new_init_file = config.root_path / 'invokeai.yaml'
|
||||||
|
@ -14,6 +14,7 @@ from .base import (
|
|||||||
read_checkpoint_meta,
|
read_checkpoint_meta,
|
||||||
classproperty,
|
classproperty,
|
||||||
InvalidModelException,
|
InvalidModelException,
|
||||||
|
ModelNotFoundException,
|
||||||
)
|
)
|
||||||
from .sdxl import StableDiffusionXLModel
|
from .sdxl import StableDiffusionXLModel
|
||||||
import invokeai.backend.util.logging as logger
|
import invokeai.backend.util.logging as logger
|
||||||
@ -268,12 +269,17 @@ def _convert_ckpt_and_cache(
|
|||||||
# to avoid circular import errors
|
# to avoid circular import errors
|
||||||
from ..convert_ckpt_to_diffusers import convert_ckpt_to_diffusers
|
from ..convert_ckpt_to_diffusers import convert_ckpt_to_diffusers
|
||||||
from ...util.devices import choose_torch_device, torch_dtype
|
from ...util.devices import choose_torch_device, torch_dtype
|
||||||
|
|
||||||
|
model_base_to_model_type = {BaseModelType.StableDiffusion1: 'FrozenCLIPEmbedder',
|
||||||
|
BaseModelType.StableDiffusion2: 'FrozenOpenCLIPEmbedder',
|
||||||
|
}
|
||||||
|
|
||||||
logger.info(f'Converting {weights} to diffusers format')
|
logger.info(f'Converting {weights} to diffusers format')
|
||||||
with SilenceWarnings():
|
with SilenceWarnings():
|
||||||
convert_ckpt_to_diffusers(
|
convert_ckpt_to_diffusers(
|
||||||
weights,
|
weights,
|
||||||
output_path,
|
output_path,
|
||||||
|
model_type=model_base_to_model_type[version],
|
||||||
model_version=version,
|
model_version=version,
|
||||||
model_variant=model_config.variant,
|
model_variant=model_config.variant,
|
||||||
original_config_file=config_file,
|
original_config_file=config_file,
|
||||||
|
Loading…
Reference in New Issue
Block a user