代码拉取完成,页面将自动刷新
import modules.scripts as scripts
import os
from modules import modelloader, paths, shared, sd_models
from modules.paths import models_path
def get_models():
modellist = sd_models.checkpoint_tiles()
return modellist
def get_upscalers():
# Upscalers are sort of hardcoded as well for Latent, but not for the 2 others. So build it up!
latentlist=["Latent","Latent (antialiased)","Latent (bicubic)","Latent (bicubic antialiased)","Latent (nearest)","Latent (nearest-exact)","Lanczos","Nearest"]
upscalerlistfromwWebUI = [x.name for x in shared.sd_upscalers]
upscalerlist = latentlist + upscalerlistfromwWebUI
return upscalerlist
def get_samplers():
#Samplers are hardcoded in WEBui, so lets do it here as well
samplerlist = ["Euler a", "Euler", "LMS","Heun","DPM2","DPM2 a","DPM++ 2S a","DPM++ 2M","DPM++ SDE","DPM fast","DPM adaptive","LMS Karras","DPM2 Karras","DPM2 a Karras","DPM++ 2S a Karras","DPM++ 2M Karras","DPM++ SDE Karras"]
samplerlist += ["DDIM","UniPC", "PLMS"]
return samplerlist
def get_upscalers_for_img2img():
upscalerlistfromwWebUI = [x.name for x in shared.sd_upscalers]
return upscalerlistfromwWebUI
def get_samplers_for_img2img():
#Samplers are hardcoded in WEBui, so lets do it here as well
samplerlist = ["Euler a", "Euler", "LMS","Heun","DPM2","DPM2 a","DPM++ 2S a","DPM++ 2M","DPM++ SDE","DPM fast","DPM adaptive","LMS Karras","DPM2 Karras","DPM2 a Karras","DPM++ 2S a Karras","DPM++ 2M Karras","DPM++ SDE Karras"]
samplerlist += ["DDIM"] #UniPC and PLMS dont support upscaling apparently
return samplerlist
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。