|
import os |
|
import sys |
|
import time |
|
|
|
xxx = "/kaggle/working" |
|
zzz = "/kaggle/working/asd" |
|
|
|
os.system(f"wget -q https://raw.githubusercontent.com/gutris1/segsmaker/main/kaggle/script/pantat88.py -O {xxx}/pantat88.py") |
|
|
|
sys.path.append(xxx) |
|
from pantat88 import pull, say, download |
|
|
|
say("【 {red} Installing Stable Diffusion {d} 】 {red}") |
|
|
|
time.sleep(2) |
|
os.chdir(zzz) |
|
pull(f"https://github.com/gutris1/segsmaker asd {zzz}") |
|
|
|
jalanan = [ |
|
f"https://huggingface.co/pantat88/ui/resolve/main/ass.zip {zzz}", |
|
f"https://huggingface.co/pantat88/ui/resolve/main/embeddings.zip {zzz}", |
|
f"https://civitai.com/api/download/models/150491 {zzz}/embeddings edgQuality.pt", |
|
f"https://huggingface.co/pantat88/ui/resolve/main/4x-UltraSharp.pth {zzz}/models/ESRGAN", |
|
f"https://huggingface.co/pantat88/ui/resolve/main/4x-AnimeSharp.pth {zzz}/models/ESRGAN", |
|
f"https://huggingface.co/pantat88/ui/resolve/main/4x_NMKD-Superscale-SP_178000_G.pth {zzz}/models/ESRGAN", |
|
f"https://huggingface.co/pantat88/ui/resolve/main/4x_RealisticRescaler_100000_G.pth {zzz}/models/ESRGAN", |
|
f"https://huggingface.co/pantat88/ui/resolve/main/8x_RealESRGAN.pth {zzz}/models/ESRGAN", |
|
f"https://huggingface.co/pantat88/ui/resolve/main/4x_foolhardy_Remacri.pth {zzz}/models/ESRGAN", |
|
f"https://huggingface.co/stabilityai/sd-vae-ft-mse-original/resolve/main/vae-ft-mse-840000-ema-pruned.safetensors {zzz}/models/VAE"] |
|
|
|
for janda in jalanan: |
|
download(janda) |
|
|
|
unzip1 = f"unzip -qo {zzz}/ass.zip -d {zzz} && rm {zzz}/ass.zip" |
|
unzip2 = f"unzip -qo {zzz}/embeddings.zip -d {zzz}/embeddings && rm {zzz}/embeddings.zip" |
|
os.system(unzip1) |
|
os.system(unzip2) |
|
|
|
aaaaaaaaaaaa = os.path.join(zzz, "asd", "asd.py") |
|
with open(aaaaaaaaaaaa, 'r') as file: |
|
uuuuuuuuu = file.read() |
|
exec(uuuuuuuuu, globals()) |
|
|
|
susu = os.path.join(xxx, 'nenen88.py') |
|
os.remove(susu) |
|
os.chdir(xxx) |