Remove static asset index
Browse files
app.py
CHANGED
|
@@ -147,39 +147,6 @@ COMFY_KINDS = {"clip": "text_encoders"}
|
|
| 147 |
MODEL_SUFFIXES = (
|
| 148 |
".bin", ".ckpt", ".pkl", ".pt", ".pt2", ".pth", ".safetensors", ".sft",
|
| 149 |
)
|
| 150 |
-
ASSETS = {
|
| 151 |
-
"checkpoint": (
|
| 152 |
-
"52_novaAnimeXL_ilV190.safetensors",
|
| 153 |
-
"checkpoints",
|
| 154 |
-
"checkpoints/52_novaAnimeXL_ilV190.safetensors",
|
| 155 |
-
),
|
| 156 |
-
"bikabaka": (
|
| 157 |
-
"8_bikabaka.safetensors",
|
| 158 |
-
"loras",
|
| 159 |
-
"loras/8_bikabaka.safetensors",
|
| 160 |
-
),
|
| 161 |
-
"5cm": (
|
| 162 |
-
"43_5cm-illustriousXL_v01_V1-CAME-000035.safetensors",
|
| 163 |
-
"loras",
|
| 164 |
-
"loras/43_5cm-illustriousXL_v01_V1-CAME-000035.safetensors",
|
| 165 |
-
),
|
| 166 |
-
"saturation": (
|
| 167 |
-
"5_add_saturation_XL.safetensors",
|
| 168 |
-
"loras",
|
| 169 |
-
"loras/5_add_saturation_XL.safetensors",
|
| 170 |
-
),
|
| 171 |
-
"vae": (
|
| 172 |
-
"3_sdxlVAE_sdxlVAE.safetensors",
|
| 173 |
-
"vae",
|
| 174 |
-
"vae/3_sdxlVAE_sdxlVAE.safetensors",
|
| 175 |
-
),
|
| 176 |
-
"upscale": (
|
| 177 |
-
"3_1x-Archivist_Soft.pth",
|
| 178 |
-
"upscale_models",
|
| 179 |
-
"upscale_models/3_1x-Archivist_Soft.pth",
|
| 180 |
-
),
|
| 181 |
-
}
|
| 182 |
-
|
| 183 |
DEFAULT_NEGATIVE = (
|
| 184 |
"(censored, mosaic censoring, bar censor:1.1), bad quality, worst quality, "
|
| 185 |
"worst detail, bad anatomy, extra fingers, extra toes, extra legs, 4 toes, "
|
|
@@ -190,15 +157,15 @@ DEFAULT_SAMPLER = "euler_ancestral"
|
|
| 190 |
DEFAULT_SCHEDULER = "karras"
|
| 191 |
DEFAULT_CFG = 4
|
| 192 |
DEFAULT_STEPS = 30
|
| 193 |
-
DEFAULT_MODEL =
|
| 194 |
-
DEFAULT_VAE =
|
| 195 |
ANIMA_VAE = "2_qwen_image_vae.safetensors"
|
| 196 |
NON_ANIMA_HEADER = "__non_anima_header__"
|
| 197 |
ANIMA_HEADER = "__anima_header__"
|
| 198 |
MODEL_HEADERS = (NON_ANIMA_HEADER, ANIMA_HEADER)
|
| 199 |
DEFAULT_LORAS = ()
|
| 200 |
DEFAULT_UPSCALE_METHOD = "bislerp"
|
| 201 |
-
DEFAULT_UPSCALE_MODEL =
|
| 202 |
DEFAULT_UPSCALE_SCALE = 1.1
|
| 203 |
DEFAULT_SECOND_SAMPLER = "euler"
|
| 204 |
DEFAULT_SECOND_SCHEDULER = "karras"
|
|
@@ -232,7 +199,7 @@ MATRIX_TYPES = (
|
|
| 232 |
"sampler+scheduler",
|
| 233 |
COMBINED_MATRIX_TYPE,
|
| 234 |
)
|
| 235 |
-
GPU_DURATION =
|
| 236 |
GPU_ATTEMPTS = 3
|
| 237 |
GPU_RETRY_ERRORS = (
|
| 238 |
"gpu task aborted",
|
|
@@ -330,10 +297,6 @@ def download_asset(remote, target):
|
|
| 330 |
|
| 331 |
def index_bucket_models():
|
| 332 |
models = {kind: {} for kind in MODEL_KINDS}
|
| 333 |
-
for name, kind, remote in ASSETS.values():
|
| 334 |
-
if kind in models:
|
| 335 |
-
models[kind][name] = remote
|
| 336 |
-
|
| 337 |
for item in list_bucket_tree(BUCKET_ID, recursive=True, token=False):
|
| 338 |
if item.type != "file" or Path(item.path).suffix.casefold() not in MODEL_SUFFIXES:
|
| 339 |
continue
|
|
|
|
| 147 |
MODEL_SUFFIXES = (
|
| 148 |
".bin", ".ckpt", ".pkl", ".pt", ".pt2", ".pth", ".safetensors", ".sft",
|
| 149 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 150 |
DEFAULT_NEGATIVE = (
|
| 151 |
"(censored, mosaic censoring, bar censor:1.1), bad quality, worst quality, "
|
| 152 |
"worst detail, bad anatomy, extra fingers, extra toes, extra legs, 4 toes, "
|
|
|
|
| 157 |
DEFAULT_SCHEDULER = "karras"
|
| 158 |
DEFAULT_CFG = 4
|
| 159 |
DEFAULT_STEPS = 30
|
| 160 |
+
DEFAULT_MODEL = "52_novaAnimeXL_ilV190.safetensors"
|
| 161 |
+
DEFAULT_VAE = "3_sdxlVAE_sdxlVAE.safetensors"
|
| 162 |
ANIMA_VAE = "2_qwen_image_vae.safetensors"
|
| 163 |
NON_ANIMA_HEADER = "__non_anima_header__"
|
| 164 |
ANIMA_HEADER = "__anima_header__"
|
| 165 |
MODEL_HEADERS = (NON_ANIMA_HEADER, ANIMA_HEADER)
|
| 166 |
DEFAULT_LORAS = ()
|
| 167 |
DEFAULT_UPSCALE_METHOD = "bislerp"
|
| 168 |
+
DEFAULT_UPSCALE_MODEL = "3_1x-Archivist_Soft.pth"
|
| 169 |
DEFAULT_UPSCALE_SCALE = 1.1
|
| 170 |
DEFAULT_SECOND_SAMPLER = "euler"
|
| 171 |
DEFAULT_SECOND_SCHEDULER = "karras"
|
|
|
|
| 199 |
"sampler+scheduler",
|
| 200 |
COMBINED_MATRIX_TYPE,
|
| 201 |
)
|
| 202 |
+
GPU_DURATION = 13
|
| 203 |
GPU_ATTEMPTS = 3
|
| 204 |
GPU_RETRY_ERRORS = (
|
| 205 |
"gpu task aborted",
|
|
|
|
| 297 |
|
| 298 |
def index_bucket_models():
|
| 299 |
models = {kind: {} for kind in MODEL_KINDS}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 300 |
for item in list_bucket_tree(BUCKET_ID, recursive=True, token=False):
|
| 301 |
if item.type != "file" or Path(item.path).suffix.casefold() not in MODEL_SUFFIXES:
|
| 302 |
continue
|