mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Merge branch 'development' into fix-model-load-error-reporting
This commit is contained in:
commit
ba9c695463
@ -17,6 +17,7 @@ import transformers
|
|||||||
import traceback
|
import traceback
|
||||||
import textwrap
|
import textwrap
|
||||||
import contextlib
|
import contextlib
|
||||||
|
from typing import Union
|
||||||
from omegaconf import OmegaConf
|
from omegaconf import OmegaConf
|
||||||
from omegaconf.errors import ConfigAttributeError
|
from omegaconf.errors import ConfigAttributeError
|
||||||
from ldm.util import instantiate_from_config, ask_user
|
from ldm.util import instantiate_from_config, ask_user
|
||||||
@ -388,7 +389,7 @@ class ModelCache(object):
|
|||||||
def _has_cuda(self) -> bool:
|
def _has_cuda(self) -> bool:
|
||||||
return self.device.type == 'cuda'
|
return self.device.type == 'cuda'
|
||||||
|
|
||||||
def _cached_sha256(self,path,data) -> str | bytes:
|
def _cached_sha256(self,path,data) -> Union[str, bytes]:
|
||||||
dirname = os.path.dirname(path)
|
dirname = os.path.dirname(path)
|
||||||
basename = os.path.basename(path)
|
basename = os.path.basename(path)
|
||||||
base, _ = os.path.splitext(basename)
|
base, _ = os.path.splitext(basename)
|
||||||
|
12
scripts/load_models.py
Normal file
12
scripts/load_models.py
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
# Copyright (c) 2022 Lincoln D. Stein (https://github.com/lstein)
|
||||||
|
# Before running stable-diffusion on an internet-isolated machine,
|
||||||
|
# run this script from one with internet connectivity. The
|
||||||
|
# two machines must share a common .cache directory.
|
||||||
|
|
||||||
|
import warnings
|
||||||
|
import configure_invokeai
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
configure_invokeai.main()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user