From fd38007727effc5db973c4b33dad900ca220b01b Mon Sep 17 00:00:00 2001 From: steveyourcreativepeople Date: Thu, 22 Feb 2024 11:18:29 -0500 Subject: [PATCH] Added filter to private_logger for model and wildprompt --- modules/private_logger.py | 106 +++++++++++++++++++++++++++------- wildprompts/civit-clothes.txt | 10 ++-- 2 files changed, 89 insertions(+), 27 deletions(-) diff --git a/modules/private_logger.py b/modules/private_logger.py index 38c1942c..65072b43 100644 --- a/modules/private_logger.py +++ b/modules/private_logger.py @@ -42,28 +42,82 @@ def log(img, dic, wildprompt=''): ) js = ( - """""" + textArea.select() + document.execCommand('copy') + document.body.removeChild(textArea) + } + alert('Copied to Clipboard!\\nPaste to prompt area to load parameters.\\nCurrent clipboard content is:\\n\\n' + txt); + } + + // Extracting distinct data-model and data-wildprompts values + var modelSet = new Set(); + var wildpromptsSet = new Set(); + + document.querySelectorAll('.image-container').forEach(function(container) { + var model = container.getAttribute('data-model'); + var wildprompts = container.getAttribute('data-wildprompts'); + + modelSet.add(model); + wildpromptsSet.add(wildprompts); + }); + + // Creating checkboxes for data-model values + var modelCheckboxList = document.createElement('div'); + modelCheckboxList.innerHTML = '

Data Model

'; + modelSet.forEach(function(model) { + var checkbox = document.createElement('input'); + checkbox.type = 'checkbox'; + checkbox.value = model; + checkbox.id = 'model_' + model; + + var label = document.createElement('label'); + label.htmlFor = 'model_' + model; + label.appendChild(document.createTextNode(model)); + + modelCheckboxList.appendChild(checkbox); + modelCheckboxList.appendChild(label); + modelCheckboxList.appendChild(document.createElement('br')); + }); + + // Creating checkboxes for data-wildprompts values + var wildpromptsCheckboxList = document.createElement('div'); + wildpromptsCheckboxList.innerHTML = '

Data Wildprompts

'; + wildpromptsSet.forEach(function(wildprompt) { + var checkbox = document.createElement('input'); + checkbox.type = 'checkbox'; + checkbox.value = wildprompt; + checkbox.id = 'wildprompt_' + wildprompt; + + var label = document.createElement('label'); + label.htmlFor = 'wildprompt_' + wildprompt; + label.appendChild(document.createTextNode(wildprompt)); + + wildpromptsCheckboxList.appendChild(checkbox); + wildpromptsCheckboxList.appendChild(label); + wildpromptsCheckboxList.appendChild(document.createElement('br')); + }); + + // Appending checkbox lists to the DOM + document.body.appendChild(modelCheckboxList); + document.body.appendChild(wildpromptsCheckboxList); + + """ ) begin_part = f"Fooocus Log {date_string}{css_styles}{js}

Fooocus Log {date_string} (private)

\n

All images are clean, without any hidden data/meta, and safe to share with others.

\n\n" @@ -80,7 +134,15 @@ def log(img, dic, wildprompt=''): middle_part = existing_split[0] div_name = only_name.replace('.', '_') - item = f"

\n" + for key, value in dic: + if key == 'Base Model': + base_model = value + break + for key, value in dic: + if key == 'Wildprompts': + wildprompts = value + break + item = f"

\n" item += f"" item += "
{only_name}
" for key, value in dic: diff --git a/wildprompts/civit-clothes.txt b/wildprompts/civit-clothes.txt index 7bf47869..08a0fb3a 100644 --- a/wildprompts/civit-clothes.txt +++ b/wildprompts/civit-clothes.txt @@ -1,5 +1,5 @@ -corset and bra, under bust corset, Burlesque lingerie, Couture burlesque costume, Burlesque lace bolero jacket, jewel necklace, feather boa, sequins burlesque long tail Frill Skirt, burlesque stocking, garter strap and garter belt, head wearing Burlesque Headpiece Top Hat -A tightly laced red corset with lace and sequin detailing accentuates the waist, paired with a layered black skirt featuring ruffles and lace overlays. Sheer stockings with lace garters adorn the legs, complemented by high-heeled black boots embellished with metallic accents. Opera-length gloves reach to the upper arms, while a jeweled choker graces the neck -Japanese Lolita dress showcases a fitted bodice adorned with intricate lace, delicate ribbons, and bows, reminiscent of Victorian corsets. The skirt billows out in a voluminous silhouette, layered with ruffles and petticoats to create a charming bell-like shape. Delicate lace trims and printed motifs of roses and lace add a touch of whimsy and romance to the ensemble. Completing the look are lace stockings, dainty gloves, and a matching headpiece adorned with bows and flowers, evoking the nostalgic elegance of Victorian and Rococo fashion. -Gothic Lolita, black dress with a fitted bodice adorned with intricate lace detailing, delicate ribbons, and ruffles, Victorian fashion. The skirt is voluminous and layered, crafted from satin, and embellished with lace trimmings and gothic motifs such as bats or crosses. Accessorized with lace gloves, a lace choker, and cameo jewelry platform boot -futuristic dress is crafted from sleek, metallic materials, featuring a form-fitting silhouette that accentuates the body's curves. Vibrant panels of iridescent fabric in shades of neon green, electric blue, and magenta adorn the dress, creating a striking contrast against the metallic base. The dress incorporates innovative design elements such as asymmetrical cutouts, geometric patterns, and holographic accents, adding depth and dimension to the futuristic aesthetic. Completing the look are sleek accessories like metallic cuffs and statement earrings, enhancing the avant-garde appeal of the ensemble. \ No newline at end of file +corset and bra, under bust corset, Burlesque lingerie, Couture burlesque costume, Burlesque lace bolero jacket, jewel necklace, feather boa, sequins burlesque long tail Frill __color__ Skirt, burlesque stocking, garter strap and garter belt, head wearing Burlesque Headpiece Top Hat +A tightly laced __color__ corset with lace and sequin detailing accentuates the waist, paired with a layered black skirt featuring ruffles and lace overlays. Sheer stockings with lace garters adorn the legs, complemented by high-heeled black boots embellished with metallic accents. Opera-length gloves reach to the upper arms, while a jeweled choker graces the neck +Japanese Lolita dress in pastel __color__ showcases a fitted bodice adorned with intricate lace, delicate ribbons, and bows, reminiscent of Victorian corsets. The skirt billows out in a voluminous silhouette, layered with ruffles and petticoats to create a charming bell-like shape. Delicate lace trims and printed motifs of roses and lace add a touch of whimsy and romance to the ensemble. Completing the look are lace stockings, dainty gloves, and a matching headpiece adorned with bows and flowers, evoking the nostalgic elegance of Victorian and Rococo fashion. +Gothic Lolita, dark __color__ dress with a fitted bodice adorned with intricate lace detailing, delicate ribbons, and ruffles, Victorian fashion. The skirt is voluminous and layered, crafted from satin, and embellished with lace trimmings and gothic motifs such as bats or crosses. Accessorized with lace gloves, a lace choker, and cameo jewelry platform boot +futuristic dress is crafted from sleek, metallic materials, featuring a form-fitting silhouette that accentuates the body's curves. Vibrant panels of iridescent fabric in shades of neon __color__, electric __color__, and __color__ adorn the dress, creating a striking contrast against the metallic base. The dress incorporates innovative design elements such as asymmetrical cutouts, geometric patterns, and holographic accents, adding depth and dimension to the futuristic aesthetic. Completing the look are sleek accessories like metallic cuffs and statement earrings, enhancing the avant-garde appeal of the ensemble. \ No newline at end of file