mirror of https://github.com/vladmandic/automatic
update state cache
parent
403441feea
commit
4d10449ae1
|
|
@ -10,7 +10,8 @@
|
|||
"torch": "unknown",
|
||||
"python": "3.14.3 (main, Feb 4 2026, 09:28:29) [GCC 13.3.0]",
|
||||
"platform": "linux",
|
||||
"requirements": "cb99715eb5944d558a05c4f573053d62837fce7ba6337f1025c5c1e363f1be59",
|
||||
"requirements": "371491b35da9028466bb445ad4fc6f2fff1742e37ad0c851030ca0dd348b82d8",
|
||||
"installer": "285607749a1f183de49be90c7b42864a8a40ceae29eaaa49d2ef9eff9dbf93bb",
|
||||
"extensions": {
|
||||
"stable-diffusion-webui-rembg": "cfceed7243ce97cf8fd64a43df0291448c22a9dd",
|
||||
"sd-extension-chainner": "2a7005fbcf8985644b66121365fa7228a65f34b0",
|
||||
|
|
@ -18,4 +19,4 @@
|
|||
"sdnext-kanvas": "79cae1944646e57cfbfb126a971a04e44e45d776",
|
||||
"sdnext-modernui": "fc7cf10dcc3f17377b6a18c4cd0dbd2be5480f0b"
|
||||
}
|
||||
}
|
||||
}
|
||||
12
installer.py
12
installer.py
|
|
@ -1507,17 +1507,19 @@ def get_state():
|
|||
'python': sys.version,
|
||||
'platform': sys.platform,
|
||||
'requirements': 'unknown',
|
||||
'installer': 'unknown',
|
||||
'extensions': {}
|
||||
}
|
||||
try:
|
||||
import hashlib
|
||||
if os.path.isfile('requirements.txt'):
|
||||
with open('requirements.txt', 'rb') as f:
|
||||
state['requirements'] = hashlib.sha256(f.read()).hexdigest()
|
||||
with open('requirements.txt', 'rb') as f:
|
||||
state['requirements'] = hashlib.sha256(f.read()).hexdigest()
|
||||
with open('installer.py', 'rb') as f:
|
||||
state['installer'] = hashlib.sha256(f.read()).hexdigest()
|
||||
except Exception:
|
||||
pass
|
||||
try:
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
from concurrent.futures.thread import ThreadPoolExecutor
|
||||
from modules.paths import extensions_builtin_dir, extensions_dir
|
||||
extension_folders = [extensions_builtin_dir] if args.safe else [extensions_builtin_dir, extensions_dir]
|
||||
ext_dirs = []
|
||||
|
|
@ -1551,7 +1553,7 @@ def check_state():
|
|||
with open('data/installer.json', 'r', encoding='utf8') as f:
|
||||
saved_state = json.load(f)
|
||||
unchanged = saved_state == get_state()
|
||||
log.debug(f'State: changed={unchanged}')
|
||||
log.debug(f'State: cached={unchanged}')
|
||||
return unchanged
|
||||
except Exception:
|
||||
return False
|
||||
|
|
|
|||
Loading…
Reference in New Issue