diff --git a/Nodes/Visuals.py b/Nodes/Visuals.py index cfd4354..7c8baab 100644 --- a/Nodes/Visuals.py +++ b/Nodes/Visuals.py @@ -39,7 +39,7 @@ class PrimereVisualCKPT: }, "hidden": { "subdir": ("checkpoints",), - "sortbuttons": (['aScore', 'Name', 'Version', 'Path', 'Date'],), + "sortbuttons": (['aScore', 'Name', 'Version', 'Path', 'Date', 'Symlink'],), "cache_key": ("model",), } } diff --git a/components/primereserver.py b/components/primereserver.py index bfd8d11..f3fc6e7 100644 --- a/components/primereserver.py +++ b/components/primereserver.py @@ -386,7 +386,7 @@ async def primere_get_filelinks(request): is_link = os.path.islink(str(singleFile)) if is_link == True: singleFile_link = Path(str(singleFile)).resolve() - filenameonly = Path(singleFile_link).stem + filenameonly = Path(singleFile).stem comfyModelDir = os.path.join(utility.comfy_dir, 'models') modelType = str(singleFile_link)[len(comfyModelDir) + 1:str(singleFile_link).find('\\', len(comfyModelDir) + 1)] filelinktypes[filenameonly] = modelType diff --git a/front_end/css/visual.css b/front_end/css/visual.css index df755a5..e1e7762 100644 --- a/front_end/css/visual.css +++ b/front_end/css/visual.css @@ -4,6 +4,7 @@ @import url("../fonts/NIMBUSSANSDEE_BOLD/stylesheet.css"); /* NIMBUSSANSDEE BOLD */ @import url("../fonts/FUTURATEE_LIGHT/stylesheet.css"); /* FUTURATEE LIGHT */ @import url("../fonts/NIMBUSSANSDEE_LIGHT/stylesheet.css"); /* NIMBUSSANSDEE LIGHT */ +@import url("../fonts/FUTURATEE_BOOK/stylesheet.css"); /* FUTURATEE BOOK */ /* Primere css for visual selectors */ #primere_visual_modal { @@ -100,7 +101,7 @@ #primere_visual_modal .checkpoint-name { overflow: hidden; display: inline-block; - width: 99%; + width: 100%; font-size: 11px; font-weight: normal; padding: 1px; @@ -190,6 +191,31 @@ bottom: 0px; } +#primere_visual_modal div.visual-symlink-type { + display: block; + position: absolute; + background-color: #0f5b77; + right: 0px; + top: 17px; + color: #c1deec; + white-space: nowrap; + padding-top: 1px; + padding-bottom: 1px; + padding-left: 5px; + padding-right: 5px; + border-left: #c1deec solid 1px; + border-bottom: #c1deec solid 1px; + -moz-border-radius-bottomleft: 4px; + -webkit-border-bottom-left-radius: 4px; + border-bottom-left-radius: 4px; + text-align: center; + font-family: 'FUTURATEE BOOK'; + text-transform: capitalize; + font-size: 11px; + font-weight: normal; + letter-spacing: 1px; +} + #primere_visual_modal .visual-aesthetic-score { display: block; position: absolute; diff --git a/front_end/fonts/FUTURATEE_BOOK/FUTURATEE-BOOK.eot b/front_end/fonts/FUTURATEE_BOOK/FUTURATEE-BOOK.eot new file mode 100644 index 0000000..f73842b Binary files /dev/null and b/front_end/fonts/FUTURATEE_BOOK/FUTURATEE-BOOK.eot differ diff --git a/front_end/fonts/FUTURATEE_BOOK/FUTURATEE-BOOK.svg b/front_end/fonts/FUTURATEE_BOOK/FUTURATEE-BOOK.svg new file mode 100644 index 0000000..c7644e1 --- /dev/null +++ b/front_end/fonts/FUTURATEE_BOOK/FUTURATEE-BOOK.svg @@ -0,0 +1,1721 @@ + + + + +Created by FontForge 20090914 at Fri Apr 26 11:57:35 2013 + By www-data +URW Software, Copyright 1993 by URW + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/front_end/fonts/FUTURATEE_BOOK/FUTURATEE-BOOK.ttf b/front_end/fonts/FUTURATEE_BOOK/FUTURATEE-BOOK.ttf new file mode 100644 index 0000000..30ee0bc Binary files /dev/null and b/front_end/fonts/FUTURATEE_BOOK/FUTURATEE-BOOK.ttf differ diff --git a/front_end/fonts/FUTURATEE_BOOK/FUTURATEE-BOOK.woff b/front_end/fonts/FUTURATEE_BOOK/FUTURATEE-BOOK.woff new file mode 100644 index 0000000..91514c2 Binary files /dev/null and b/front_end/fonts/FUTURATEE_BOOK/FUTURATEE-BOOK.woff differ diff --git a/front_end/fonts/FUTURATEE_BOOK/stylesheet.css b/front_end/fonts/FUTURATEE_BOOK/stylesheet.css new file mode 100644 index 0000000..330729e --- /dev/null +++ b/front_end/fonts/FUTURATEE_BOOK/stylesheet.css @@ -0,0 +1,10 @@ +@font-face { + font-family: 'FUTURATEE BOOK'; + src: url('FUTURATEE-BOOK.eot'); + src: url('FUTURATEE-BOOK.eot?#iefix') format('embedded-opentype'), + url('FUTURATEE-BOOK.ttf') format('truetype'), + url('FUTURATEE-BOOK.svg') format('svg'), + url('FUTURATEE-BOOK.woff') format('woff'); + font-weight: normal; + font-style: normal; +} \ No newline at end of file diff --git a/front_end/fonts/NIMBUSSANSDEE_REGULAR/NIMBUSSANSDEE-REGULAR.eot b/front_end/fonts/NIMBUSSANSDEE_REGULAR/NIMBUSSANSDEE-REGULAR.eot new file mode 100644 index 0000000..bae61ee Binary files /dev/null and b/front_end/fonts/NIMBUSSANSDEE_REGULAR/NIMBUSSANSDEE-REGULAR.eot differ diff --git a/front_end/fonts/NIMBUSSANSDEE_REGULAR/NIMBUSSANSDEE-REGULAR.svg b/front_end/fonts/NIMBUSSANSDEE_REGULAR/NIMBUSSANSDEE-REGULAR.svg new file mode 100644 index 0000000..8901e0b --- /dev/null +++ b/front_end/fonts/NIMBUSSANSDEE_REGULAR/NIMBUSSANSDEE-REGULAR.svg @@ -0,0 +1,1737 @@ + + + + +Created by FontForge 20090914 at Fri Apr 26 12:19:11 2013 + By www-data +URW Software, Copyright 1993 by URW + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/front_end/fonts/NIMBUSSANSDEE_REGULAR/NIMBUSSANSDEE-REGULAR.ttf b/front_end/fonts/NIMBUSSANSDEE_REGULAR/NIMBUSSANSDEE-REGULAR.ttf new file mode 100644 index 0000000..7bcedb0 Binary files /dev/null and b/front_end/fonts/NIMBUSSANSDEE_REGULAR/NIMBUSSANSDEE-REGULAR.ttf differ diff --git a/front_end/fonts/NIMBUSSANSDEE_REGULAR/NIMBUSSANSDEE-REGULAR.woff b/front_end/fonts/NIMBUSSANSDEE_REGULAR/NIMBUSSANSDEE-REGULAR.woff new file mode 100644 index 0000000..873994b Binary files /dev/null and b/front_end/fonts/NIMBUSSANSDEE_REGULAR/NIMBUSSANSDEE-REGULAR.woff differ diff --git a/front_end/fonts/NIMBUSSANSDEE_REGULAR/stylesheet.css b/front_end/fonts/NIMBUSSANSDEE_REGULAR/stylesheet.css new file mode 100644 index 0000000..7d86e1c --- /dev/null +++ b/front_end/fonts/NIMBUSSANSDEE_REGULAR/stylesheet.css @@ -0,0 +1,8 @@ +@font-face { + font-family: 'NIMBUSSANSDEE REGULAR'; + src: url('NIMBUSSANSDEE-REGULAR.eot'); + src: url('NIMBUSSANSDEE-REGULAR.eot?#iefix') format('embedded-opentype'), + url('NIMBUSSANSDEE-REGULAR.ttf') format('truetype'), + url('NIMBUSSANSDEE-REGULAR.svg') format('svg'), + url('NIMBUSSANSDEE-REGULAR.woff') format('woff'); +} \ No newline at end of file diff --git a/front_end/primere_visuals.js b/front_end/primere_visuals.js index c9d2ea0..d04a596 100644 --- a/front_end/primere_visuals.js +++ b/front_end/primere_visuals.js @@ -577,7 +577,7 @@ async function setup_visual_modal(combo_name, AllModels, ShowHidden, SelectedMod } } - if (nodeHelper['subdir'] == 'checkpoints') { + if (nodeHelper['subdir'] == 'checkpoints' && nodeHelper['sortbuttons'][0].indexOf("Symlink") > -1) { FileLinkResponse = await ReadFileSymlink(nodeHelper['subdir']); } @@ -719,7 +719,8 @@ async function createCardElement(checkpoint, container, SelectedModel, ModelType let pathLastIndex = finalName.lastIndexOf('/'); let ckptName = finalName.substring(pathLastIndex + 1); let versionWidget = ''; - let aesthVidget = ''; + let aesthWidget = ''; + let symlinkWidget = ''; var path_only = checkpoint.substring(0, checkpoint.indexOf("\\")); if (ckptName == 'None') { @@ -764,6 +765,18 @@ async function createCardElement(checkpoint, container, SelectedModel, ModelType $(card).attr('data-date', 0); } + if (FileLinkResponse.hasOwnProperty(ckptName) === true) { + var unetname = FileLinkResponse[ckptName]; + $(card).attr('data-symlink', unetname); + var unetnameShort = unetname; + if (unetname == 'diffusion_models') { unetnameShort = 'DiMo'} + if (unetname == 'diffusers') { unetnameShort = 'Diff'} + symlinkWidget = ''; + card_html += symlinkWidget; + } else { + $(card).attr('data-symlink', ""); + } + if (SelectedModel === checkpoint) { card.classList.add('visual-ckpt-selected'); } @@ -780,8 +793,8 @@ async function createCardElement(checkpoint, container, SelectedModel, ModelType if (aeScorePercentLine > 100) { aeScorePercentLine = 100; } - aesthVidget = '
' + aestAVGValue + ' - ' + aeScorePercentLine + '%
'; - card_html += aesthVidget; + aesthWidget = '
' + aestAVGValue + ' - ' + aeScorePercentLine + '%
'; + card_html += aesthWidget; } else { $(card).attr('data-ascore', 0); }