Skip to content

Commit dfec2f2

Browse files
committed
Anime default style and icons
1 parent 3273280 commit dfec2f2

6 files changed

Lines changed: 225 additions & 16 deletions

File tree

ai_diffusion/comfy_client.py

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from collections.abc import Iterable, Sequence
88
from dataclasses import dataclass
99
from enum import Enum
10-
from itertools import chain, product
10+
from itertools import product
1111
from time import time
1212
from typing import Any
1313

@@ -812,20 +812,8 @@ def _find_upscalers(model_list: Sequence[str]):
812812

813813

814814
def _find_loras(model_list: Sequence[str]):
815-
kind = ResourceKind.lora
816-
common_loras = list(product(["hyper", "lcm", "face"], [Arch.sd15, Arch.sdxl]))
817-
sdxl_loras = [("lightning", Arch.sdxl)]
818-
flux_loras = [
819-
("turbo", Arch.flux),
820-
(ControlMode.depth, Arch.flux),
821-
(ControlMode.canny_edge, Arch.flux),
822-
]
823-
flux_k_loras = [("turbo", Arch.flux_k)]
824-
flux2_loras = [(ControlMode.inpaint, Arch.flux2_4b)]
825-
return {
826-
resource_id(kind, arch, name): _find_model(model_list, kind, arch, name)
827-
for name, arch in chain(common_loras, sdxl_loras, flux_loras, flux_k_loras, flux2_loras)
828-
}
815+
loras = (ResourceId.parse(r) for r in resources.search_paths if r.startswith("lora"))
816+
return {id.string: _find_model(model_list, id.kind, id.arch, id.identifier) for id in loras}
829817

830818

831819
def _find_vae_models(model_list: Sequence[str]):
Lines changed: 96 additions & 0 deletions
Loading
Lines changed: 96 additions & 0 deletions
Loading

ai_diffusion/resources.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -777,6 +777,7 @@ def is_required(kind: ResourceKind, arch: Arch, identifier: ControlMode | Upscal
777777
resource_id(ResourceKind.lora, Arch.sdxl, "hyper"): ["Hyper-SDXL-8steps-CFG-lora"],
778778
resource_id(ResourceKind.lora, Arch.flux, "turbo"): ["flux.1-turbo"],
779779
resource_id(ResourceKind.lora, Arch.flux_k, "turbo"): ["flux.1-turbo"],
780+
resource_id(ResourceKind.lora, Arch.anima, "turbo"): ["anima-turbo-lora"],
780781
resource_id(ResourceKind.lora, Arch.sd15, ControlMode.face): ["ip-adapter-faceid-plusv2_sd15_lora", "ip-adapter-faceid-plus_sd15_lora"],
781782
resource_id(ResourceKind.lora, Arch.sdxl, ControlMode.face): ["ip-adapter-faceid-plusv2_sdxl_lora", "ip-adapter-faceid_sdxl_lora"],
782783
resource_id(ResourceKind.lora, Arch.flux, ControlMode.depth): ["flux1-depth"],
@@ -797,7 +798,7 @@ def is_required(kind: ResourceKind, arch: Arch, identifier: ControlMode | Upscal
797798
resource_id(ResourceKind.text_encoder, Arch.all, "qwen"): ["qwen_2.5_vl_7b", "qwen2.5-vl-7b", "qwen_2", "qwen-2", "qwen"],
798799
resource_id(ResourceKind.text_encoder, Arch.all, "qwen_3_4b"): ["qwen_3_4b", "qwen3-4b", "qwen3_4b", "qwen_3", "qwen-3"],
799800
resource_id(ResourceKind.text_encoder, Arch.all, "qwen_3_8b"): ["qwen_3_8b", "qwen3-8b", "qwen3_8b"],
800-
resource_id(ResourceKind.text_encoder, Arch.all, "qwen_3_06b"): ["qwen_3_06b"],
801+
resource_id(ResourceKind.text_encoder, Arch.all, "qwen_3_06b"): ["qwen_3_06b", "qwen3-06b", "qwen3_06b"],
801802
resource_id(ResourceKind.vae, Arch.sd15, "default"): ["vae-ft-mse-840000-ema"],
802803
resource_id(ResourceKind.vae, Arch.sdxl, "default"): ["sdxl_vae"],
803804
resource_id(ResourceKind.vae, Arch.illu, "default"): ["sdxl_vae"],

ai_diffusion/styles/anima.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"name": "Anima",
3+
"version": 2,
4+
"architecture": "auto",
5+
"checkpoints": [
6+
"anima-preview3-base.safetensors",
7+
"anima-preview2.safetensors",
8+
"anima-preview.safetensors"
9+
],
10+
"loras": [],
11+
"style_prompt": "masterpiece, best quality, score_7, highres, safe, {prompt}",
12+
"negative_prompt": "worst quality, low quality, score_1, score_2, score_3, artist name",
13+
"vae": "Checkpoint Default",
14+
"clip_skip": 0,
15+
"v_prediction_zsnr": false,
16+
"rescale_cfg": 0.7,
17+
"self_attention_guidance": false,
18+
"preferred_resolution": 0,
19+
"linked_edit_style": "",
20+
"sampler": "Alternative - Euler A",
21+
"sampler_steps": 30,
22+
"cfg_scale": 4.0,
23+
"live_sampler": "Flux - Turbo",
24+
"live_sampler_steps": 8,
25+
"live_cfg_scale": 1.0
26+
}

ai_diffusion/ui/theme.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ def checkpoint_icon(arch: Arch, format: FileFormat | None = None, client: Client
8181
return icon("sd-version-qwen")
8282
elif arch is Arch.zimage:
8383
return icon("sd-version-z-image")
84+
elif arch is Arch.anima:
85+
return icon("sd-version-anima")
8486
else:
8587
log.warning(f"Unresolved SD version {arch}, cannot fetch icon")
8688
return icon("warning")

0 commit comments

Comments
 (0)