Finish base layout. Fix bugs. Need to test for stability and clean up.

This commit is contained in:
Sj-Si
2024-01-11 15:06:57 -05:00
parent 3db6938caa
commit 0726a6e12e
9 changed files with 89 additions and 124 deletions

View File

@@ -20,14 +20,16 @@ class ExtraNetworksPageHypernetworks(ui_extra_networks.ExtraNetworksPage):
path, ext = os.path.splitext(full_path)
sha256 = sha256_from_cache(full_path, f'hypernet/{name}')
shorthash = sha256[0:10] if sha256 else None
search_terms = [self.search_terms_from_path(path)]
if sha256:
search_terms.append(sha256)
return {
"name": name,
"filename": full_path,
"shorthash": shorthash,
"preview": self.find_preview(path),
"description": self.find_description(path),
"search_term": self.search_terms_from_path(path) + " " + (sha256 or ""),
"search_terms": search_terms,
"prompt": quote_js(f"<hypernet:{name}:") + " + opts.extra_networks_default_multiplier + " + quote_js(">"),
"local_preview": f"{path}.preview.{shared.opts.samples_format}",
"sort_keys": {'default': index, **self.get_sort_keys(path + ext)},