Import Comfy Gallery standalone application #1
Loading…
Reference in a new issue
No description provided.
Delete branch "bugsy/initial-comfy-gallery"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Extract Comfy Gallery from homelab with preserved app history, standalone container build, app tests, and Forgejo image publishing CI.
New page diffing Civitai favorites against what's actually installed on aibench's models directory, for disk-space management: which LoRAs are installed+favorited, favorited-but-not-downloaded ("back pocket", costs no disk space), and installed-but-no-longer-favorited ("orphaned", prune candidates). Also exposes a "sync now" action and, per-LoRA, the wan_stage_manual pin added earlier this session -- lets you fix a one-sided Wan MoE LoRA from the UI instead of SSH. Backend: civitai_lora_bridge.py mirrors librarian_bridge.py's pattern (importlib-load the already-rendered sync_civitai_loras.py from the host, call its functions directly for reads; shell out to it for the actual sync, mirroring /api/generator/run's lock-file+log+poll job pattern). No new Docker mount needed -- the curator container already bind-mounts the whole comfyui base dir. Added a restricted-permission token file (comfyui.base_dir/.civitai_token, 0600) instead of baking the Civitai token into the long-running container's environment, since docker inspect/exec would otherwise expose it for the container's entire lifetime. Frontend: new CivitaiBrowser.tsx page, wired into routing/nav like Library/Recipes. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>Restructures the grouping hierarchy: base model (Illustrious, Wan Video 2.2 T2V-A14B, Flux.1 D, etc.) -> asset type (Checkpoint vs LoRA) -> category (style/situation/outfit/modifier/uncategorized) -> individual Civitai model -> files. Mirrors the alias scheme the sync pipeline already computes ("civitai / {base_model} / {category} / {name}"), so everything tied to one architecture -- checkpoints and every LoRA sub-component -- sits together and can be reviewed or cleared out as a unit. Base-model sections default collapsed (there are 15+ distinct ones) with a file-count/size summary; per-file delete stays as-is rather than adding a bulk-delete action. Also fixes a real latent bug found while wiring up the category lookup: sync_now()'s --lora-categories-file fallback pointed at a path ("/data/user/default/lora-categories.yml") that never existed on this host -- load_lora_categories() silently no-ops on a missing file, so every "sync now" run from the browser was starting from an empty categories dict and never persisting inferred categories. Fixed to the real host path. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>The container runs git as a different uid than owns the bind-mounted checkout, which git refuses to touch by default ("detected dubious ownership") -- and repo_status()/repo_commit() swallowed this silently (bare nonzero exit, not an exception), so the old "Commit changes" button had likely been reporting "Working tree clean" incorrectly this whole time, which explains why it was never actually used to keep the seed templates current. Whitelist the mounted checkout via safe.directory at import time, and make the new auto-commit's status check fail loudly instead of quietly no-op'ing if this ever recurs.Just proved this gap live: a commit made during a prior failed attempt (missing ssh client) sat local-only forever afterward, because the function only checked "is the working tree dirty" to decide whether to proceed -- once the tree was clean again, it never re-checked for commits still sitting unpushed ahead of origin. Now checks @{u}..HEAD separately so a stranded commit gets retried on the next debounce fire regardless of whether anything new changed.The running-sync panel was just a scrolling <pre> of log lines (including raw curl progress-bar noise). _parse_sync_progress() now returns an ordered queue of {model_id, name, status} instead of a status-only dict -- a model only enters the queue once the script's "selected variants" line confirms it wasn't dropped as unselected/blocklisted, so the noise never shows up as a queue entry. The frontend renders this as a real queue panel (active downloads, failed list, live counts) with the raw log tucked into a collapsed <details> for when it's still useful. Verified live on aibench against a real sync run. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>