Closed RayZ3R0 closed 1 year ago
btw I edited the Add models cell since it adds ckpt if there's no safetensors in the model url,
#@markdown ## Add models
#@markdown - You can run this multiple times to add more models to the list
#@markdown - Leave input blank to ignore
#@markdown - No spaces allowed in the name
try:
customModels
except NameError:
customModels = []
else:
pass
#@markdown ### Custom
#@markdown The model URL should be a direct download link or Google Drive URL
#@markdown <br> The modelURL should a DIRECT DOWNLOAD LINK.
#@markdown <br>https://huggingface.co/ShadoWxShinigamI/MidJourney-PaperCut/blob/main/Mdjrny-pprct_step_7000.ckpt
#@markdown <br>is actually supposed to be
#@markdown <br>https://huggingface.co/ShadoWxShinigamI/MidJourney-PaperCut/resolve/main/Mdjrny-pprct_step_7000.ckpt
modelName = "tokisaki.safetensor" #@param {'type': 'string'}
modelURL = "https://civitai.com/api/download/models/8821" #@param ["", "https://huggingface.co/ShadoWxShinigamI/MidJourney-PaperCut/resolve/main/Mdjrny-pprct_step_7000.ckpt", "https://huggingface.co/hesw23168/SD-Elysium-Model/resolve/main/Elysium_V1.ckpt", "https://huggingface.co/acheong08/nutmegmix/resolve/main/nutmegmix.ckpt", "https://huggingface.co/hesw23168/SD-Elysium-Model/resolve/main/Elysium_Anime_V2.ckpt", "https://huggingface.co/Linaqruf/anything-v3.0/resolve/main/Anything-V3.0-pruned.ckpt", "https://huggingface.co/prompthero/linkedin-diffusion/resolve/main/lnkdn.ckpt"] {allow-input: true}
#@markdown ## Defaults
#@markdown SDv2.0 and mdjrny-v4 style has been added
defaultModelURLs = ["" ,"https://huggingface.co/acheong08/secretAI/resolve/main/stableckpt/animefull-final-pruned/model.ckpt", "https://huggingface.co/CompVis/stable-diffusion-v-1-4-original/resolve/main/sd-v1-4.ckpt", "https://huggingface.co/hakurei/waifu-diffusion-v1-3/resolve/main/wd-v1-3-float32.ckpt", "https://huggingface.co/Deltaadams/HentaiDiffusion/resolve/main/HD-16.ckpt", "https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.ckpt", "https://huggingface.co/runwayml/stable-diffusion-inpainting/resolve/main/sd-v1-5-inpainting.ckpt", "https://huggingface.co/acheong08/f222/resolve/main/f222.ckpt", "https://huggingface.co/acheong08/Anything/resolve/main/Anything-V3.0-pruned-fp32.ckpt", "https://huggingface.co/acheong08/r34/resolve/main/r34_e4.ckpt", "https://huggingface.co/hassanblend/HassanBlend1.5.1.2/resolve/main/HassanBlend1.5.1.2-pruned.safetensors", "https://huggingface.co/stabilityai/stable-diffusion-2/resolve/main/768-v-ema.ckpt", "https://huggingface.co/prompthero/openjourney/resolve/main/mdjrny-v4.ckpt"]
defaultModels = ["" ,"NovelAI", "SD1-4", "WaifuDiffusion", "HentaiDiffusion", "SD1-5", "SD-inpainting", "f222-NSFW", "Anything-V3", "Rule34", "HassansBlend", "SDv2-0", "OpenMidjourney"]
defaultModel = "" #@param ["" ,"NovelAI", "SD1-4", "WaifuDiffusion", "HentaiDiffusion", "SD1-5", "SD-inpainting", "f222-NSFW", "Anything-V3", "Rule34", "HassansBlend", "SDv2-0", "OpenMidjourney"]
#@markdown # Parameters
#@markdown Select this if the model is based on SD2.0
SD2 = "None" #@param ["None", "V2-512", "V2-768", "V2-inpainting", "V2-upscaling"]
if modelName == "" or modelURL == "":
pass
else:
if modelURL.endswith("8821"):
modelName = modelName + ".safetensors"
else:
modelName = modelName + ".ckpt"
customModels.append((modelName, modelURL, SD2))
if defaultModel != "":
if defaultModelURLs[defaultModels.index(defaultModel)].endswith("8821"):
defaultModelName = defaultModel + ".safetensors"
else:
defaultModelName = defaultModel + ".ckpt"
# Map model to URL
customModels.append((defaultModelName, defaultModelURLs[defaultModels.index(defaultModel)], SD2))
print(customModels)
from IPython import display
display.HTML("<p>Want faster speed? <a href=\"https://www.youtube.com/watch?v=dQw4w9WgXcQ\">Here</a>'s a better version of this Colab!</p>")
I'm getting an error trying to load a safetensor model from civitai, here's the link https://civitai.com/api/download/models/8821