diff --git a/CHANGELOG.md b/CHANGELOG.md index e36ec2f..32c1851 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,12 @@ aims to follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html) changes grouped into collapsible Added / Changed / Fixed sections. - **Build badge in Settings** — the version line in Settings → Updates now shows whether the running build is the CPU or CUDA (GPU-accelerated) variant. +- **Choose your tagging model** — Settings → AI Workspace now lets you switch the + AI tagger between the WD tagger (anime-focused) and **JoyTag**, which also + handles photographic content and is stronger on NSFW concepts — a better fit + for real-photo libraries. Each model downloads on demand, and tags are + attributed to the model that produced them. JoyTag has no built-in rating, so + its explicitness rating is derived from its tags. ### Changed diff --git a/src-tauri/src/tagger.rs b/src-tauri/src/tagger.rs index 45e5150..4923139 100644 --- a/src-tauri/src/tagger.rs +++ b/src-tauri/src/tagger.rs @@ -987,15 +987,13 @@ fn create_tagger_session(path: &Path, acceleration: TaggerAcceleration) -> Resul let mut builder = match acceleration { TaggerAcceleration::Cpu => { - log::info!( - "WD tagger: using CPU execution provider ({intra_threads} intra-op threads)" - ); + log::info!("Tagger: using CPU execution provider ({intra_threads} intra-op threads)"); builder } TaggerAcceleration::Auto => builder .with_execution_providers([ep::DirectML::default().build().fail_silently()]) .unwrap_or_else(|error| { - log::info!("WD tagger: DirectML unavailable, falling back to CPU"); + log::info!("Tagger: DirectML unavailable, falling back to CPU"); error.recover() }), TaggerAcceleration::Directml => builder diff --git a/src/dev/mockBackend.ts b/src/dev/mockBackend.ts index 2749b7f..872d6e6 100644 --- a/src/dev/mockBackend.ts +++ b/src/dev/mockBackend.ts @@ -344,6 +344,9 @@ export async function handleMockCommand(cmd: string, payload?: unknown): Promise return 12; case "get_tagger_model_status": return { model_id: "SmilingWolf/wd-vit-tagger-v3", model_name: "WD ViT Tagger", local_dir: "mock://models/tagger", ready: true, missing_files: [] }; + case "get_tagger_model": + case "set_tagger_model": + return p.model ?? "wd"; case "get_tagger_acceleration": case "set_tagger_acceleration": return p.acceleration ?? "auto"; diff --git a/src/store.ts b/src/store.ts index 49f08d9..3e92035 100644 --- a/src/store.ts +++ b/src/store.ts @@ -2166,7 +2166,8 @@ export const useGalleryStore = create((set, get) => ({ loadTaggerModel: async () => { try { const taggerModel = await invoke("get_tagger_model"); - set({ taggerModel }); + // Never clobber the valid default with a missing/blank backend response. + if (taggerModel) set({ taggerModel }); } catch (error) { set({ taggerModelError: String(error) }); }