Downloads · 30 days
0
betairya/sd-utils
sd-utils is a machine learning model from betairya. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Currently has 2 modules: Tag explorer & CFG Scheduler.
Downloads · 30 days
0
Access
Public
Updated Oct 15, 2022
Repo size
1 GB
Likes
0
Public
Click a slice to open those files.
.pt1 GB · 100%
From the Hugging Face model README
Currently has 2 modules: Tag explorer & CFG Scheduler.
This script needs you to put --disable-safe-unpickle argument when starting your webui. Use at your own risk.
(I don't know how to pass the safety check and it always throws global 'torch/DoubleStorage' is forbidden when I try to load the GPT model with safe-unpickle.)
magicprompt_trunc20k_corpus_safe_underscore_160k-final.pt under root of sd web-ui.tag-explorer.py to scripts/.Betairylia's utils under Script section of your webui.A MagicPrompt (GPT-2) model finetuned on Danbooru2021 corpus (comma connected tags, shuffled, tags with underscores; so tags are provided as long_hair etc.) with rating:s and score > 10.
Corpus preview:
cowboy_shot, blunt_bangs, black_shorts, kurokami_(kurokaminohito), dog_tags, cleavage, bangs, black_hair, bracelet, eyebrows_visible_through_hair, head_tilt, thighhighs, short_shorts, collarbone, bare_shoulders, very_long_hair, original, shorts, swimsuit, o-ring_top, brown_eyes, kurono_mika, black_bikini, commentary_request, medium_breasts, floating_hair, sideboob, highleg_bikini, o-ring_bikini, groin, highres, hair_between_eyes, bikini, black_legwear, long_hair, bikini_under_clothes, thigh_strap, choker, open_mouth, jewelry, uneven_legwear, looking_at_viewer, asymmetrical_legwear, highleg, indoors, navel, solo, breasts, 1girl, standing, o-ring
By default it runs on the same device as your sd model. It will take 3~4 GiB vRAM.
You can change device in tag-explorer.py to desired one, e.g., cpu or cuda:1 etc.
Currently supports Cosine / Polynomial scheduling during DDIM sampling.
Other samplers won't work.
Inv means the scheduler will change the CFG scale to max at the beginning and min at the end.
steepness controls the curve of polynomial scheduler; higher = more drastic change near the end and vice versa:
$$\text{CFG}(t) = \text{CFG}\text{min} + (\text{CFG}\text{max} - \text{CFG}_\text{min}) \cdot t^{\text{exp}(\text{steepness})}$$