Skip to content

Instantly share code, notes, and snippets.

{
"TUNNEL": "ngrok",
"NGROK_API_TOKEN": "ngrok_토큰"
}
# pip install Pillow
from PIL import Image
tags = "1girl, solo, pink hair, blue eyes, short hair, looking at viewer, long sleeves, closed mouth, bangs, hair between eyes, breasts, jacket, shirt, looking back, black shirt, medium breasts"
formatted_tags = tags.replace(", ", ";")
image = Image.open("1.png")
exif = image.getexif()
exif[0x9C9E] = formatted_tags.encode("utf-16")
# @title ## **1.2. Download SDXL**
import os
import re
import json
import glob
import gdown
import requests
import subprocess
from IPython.utils import capture
from urllib.parse import urlparse, unquote
import os
import glob
from collections import Counter
files_path = "./tags2"
save_path = "./tags2/fixed"
ext = "txt"
len_ext = len(ext) + 1
remove_list = ["emataso1"]
add_list = ["iom", "virtual youtuber", "dress"]
iom, blonde hair, long hair, dress, virtual youtuber, bangs, blue eyes, looking at viewer, bare shoulders, choker, halterneck, gloves, blue dress, multicolored hair, gradient hair, jewelry, smile, breasts, black gloves, criss-cross halter, earrings, blush, collarbone, hair ornament, halter dress, lace choker, black choker, frills, bow, blue hair, very long hair, flower, closed mouth, hair flower, black bow, lace trim, lace, upper body, medium breasts, open mouth, hairclip, frilled dress, fishnets, sleeveless, thighhighs, fishnet thighhighs, single thighhigh, thigh strap, black dress, hand up, sleeveless dress, large breasts, cowboy shot, cleavage, holding, parted lips, :d, green hair, blunt bangs, sitting, watson amelia, indoors, official alternate costume, petals, from side, skirt, armpits, outdoors, teeth, plaid, hair flaps, lying, sky, waist bow, black footwear, black thighhighs, on back, floating hair, bare arms, blurry, hands up, plaid skirt, hand on own chest
iom : 178
blonde hair : 178
long hair : 17
@pekochan069
pekochan069 / forge_dynamic_thresholding.py
Created March 19, 2024 17:04
sd-webui-forge dynamic thresholding xyz implementation (not fully tested)
from functools import partial
from random import choice
from typing import Any
import sys
import traceback
import gradio as gr
from modules import scripts, script_callbacks
from lib_dynamic_thresholding.dynthres_core import DynThresh
from lib_dynamic_thresholding.dynthres import DynamicThresholdingNode
@pekochan069
pekochan069 / qlock.py
Last active June 18, 2024 12:57
qlock python bad implementation
from time import sleep
from datetime import datetime as d
def C(c,a):return a+c+"\x1b[0m"
a=open(__file__).read().replace(":\n",":").replace("\n",";").replace(" ","")
while 1:
c=d.now().strftime("%H:%M:%S")
for i in range(len(a)//64):
for j in range(64):
e=int((j/2)%4)
print(C(a[i*64+j],"\x1b[40;37;1m"if i>4 or e==3 or~[31599,19812,14479,31207,23524,29411,29679,30866,31727,31719,1040][10 if c[j//8]==":"else int(c[j//8])]>>(12-i*3+e)&1 else"\x1b[47;30;1m"), end="")
@pekochan069
pekochan069 / createDirectoryRecursively.cpp
Created January 3, 2025 09:03 — forked from danzek/createDirectoryRecursively.cpp
Create Directory Recursively with Windows API
/* From http://blog.nuclex-games.com/2012/06/how-to-create-directories-recursively-with-win32/
* Retrieved April 12, 2017
* Posted by user Cygon (http://blog.nuclex-games.com/author/cygon/)
*
* This code is free for the taking and you can use it however you want.
*
* THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
* LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
@pekochan069
pekochan069 / mitsunoki_jill_v1.json
Created January 31, 2025 14:04
mitsunoki_jill_v1.json
{
"LoRA_type": "Standard",
"LyCORIS_preset": "full",
"adaptive_noise_scale": 0,
"additional_parameters": "--lr_scheduler_type \"CosineAnnealingLR\" --lr_scheduler_args \"T_max=30\" --network_train_unet_only",
"ae": "",
"apply_t5_attn_mask": false,
"async_upload": false,
"block_alphas": "",
"block_dims": "",