set defaults for version dct

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2025-11-12 14:18:45 -05:00
parent a76168ba4b
commit 7c5d1505b8
5 changed files with 10 additions and 9 deletions
+5 -4
View File
@@ -20,7 +20,7 @@ class Dot(dict): # dot notation access to dictionary attributes
pkg_resources, setuptools, distutils = None, None, None # defined via ensure_base_requirements
version = None
version = { 'app': 'sd.next', 'version': 'unknown', 'branch': 'unknown', 'kanvas': 'unknown' }
current_branch = None
log = logging.getLogger("sd")
console = None
@@ -613,7 +613,7 @@ def check_diffusers():
t_start = time.time()
if args.skip_all:
return
sha = '0fd58c7706ac69e046587c374320637c29b62b06' # diffusers commit hash
sha = 'd6c63bb956358f1990443a849ca250419a238b95' # diffusers commit hash
# if args.use_rocm or args.use_zluda or args.use_directml:
# sha = '043ab2520f6a19fce78e6e060a68dbc947edb9f9' # lock diffusers versions for now
pkg = pkg_resources.working_set.by_key.get('diffusers', None)
@@ -1438,10 +1438,11 @@ def get_version(force=False):
'updated': updated,
'hash': githash,
'branch': branch_name.replace('\n', ''),
'url': origin.replace('\n', '').removesuffix('.git') + '/tree/' + branch_name.replace('\n', '')
'url': origin.replace('\n', '').removesuffix('.git') + '/tree/' + branch_name.replace('\n', ''),
'kanvas': 'uknown',
}
except Exception:
version = { 'app': 'sd.next', 'version': 'unknown', 'branch': 'unknown' }
version = { 'app': 'sd.next', 'version': 'unknown', 'branch': 'unknown', 'kanvas': 'unknown' }
cwd = os.getcwd()
try:
if os.path.exists('extensions-builtin/sdnext-modernui'):
-1
View File
@@ -7,7 +7,6 @@ function controlInputMode(inputMode, ...args) {
log('controlInputMode', { mode: inputMode, tab: inputTab, kanvas: typeof Kanvas });
if ((inputTab === 'Image') && (typeof 'Kanvas' !== 'undefined')) {
inputTab = 'Kanvas';
// const imageData = window.kanvas.getImageData();
const imageData = window.kanvas.getImage();
args[0] = imageData;
}
+3 -2
View File
@@ -116,13 +116,14 @@ def resize_image(resize_mode: int, im: Union[Image.Image, torch.Tensor], width:
src_image = resize(im, src_w, src_h)
else:
return im
res = Image.fromarray(seam_carving.resize(
np_image = seam_carving.resize(
src_image, # source image (rgb or gray)
size=(width, height), # target size
energy_mode=energy_mode, # choose from {backward, forward}
order="width-first", # choose from {width-first, height-first}
keep_mask=None, # object mask to protect from removal
))
)
res = Image.fromarray(np_image)
return res
t0 = time.time()
+1 -1
Submodule wiki updated: 92701d4a20...21b5e921d8