Repository navigation
Don't mark model versions installed when only shared components are present - #1802
Open
deepratna-awale wants to merge 1 commit into
Open
deepratna-awale wants to merge 1 commit into
deepratna-awale wants to merge 1 commit into
Conversation
…present Versions that ship text encoders or VAEs shared with other models showed as installed as soon as one of those components was on disk. A version now counts as installed only when one of its main model files is present, and versions with only supporting components installed get a separate indicator.
deepratna-awale
marked this pull request as ready for review
November 19, 2026 01:17
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1785
Problem
In the CivitAI model browser a version got the installed checkmark as soon as any of its files was in the local model index. Newer multi-file releases (Anima, Qwen Image, etc.) list their text encoder and VAE alongside the diffusion model, and those files are shared by many versions and creators. Installing one shared encoder or VAE made every version that lists it look installed, even though none of their actual models were downloaded.
Changes
CivitFileTypeExtensions.IsSupportingComponent()marks companion file types: VAE, text/vision encoders, CLIPVision, Config, Training Data, Negative, ControlNet, Upscaler, Enhancement LoRA and Workflow.CivitModelVersion.GetInstallState(hashes)returnsNotInstalled,ComponentsOnlyorInstalled:ComponentsOnly.Unknowntype count as main files, so detection keeps working for file types Civitai adds later (the reason the type check was dropped earlier).ModelVersionViewModeluses it forIsInstalledand exposes a newIsComponentsOnlyInstalled.Per-file "Installed" labels are unchanged, and so is the browser card badge, which already only looks at model weights. Since
IsInstalleddrives "Hide installed", components-only versions are no longer hidden by that filter.Not covered here: flagging an installed version whose required external dependency is missing. Civitai doesn't say which components a version actually needs, so that would need a separate design.
Screenshots
The real Anima model page, rendered headless with the same data on main and on this branch. Its
base-v1.0version lists the Qwen 3 text encoder and the Qwen Image VAE next to the diffusion model. Installed:qwen_3_06b_base.safetensors,qwen_image_vae.safetensorsandanima-turbo-v1.1.safetensors, downloaded from CivitAI and hashed locally (the BLAKE3 hashes match CivitAI's).Before.
base-v1.0shows the installed checkmark, though only its shared encoder and VAE are present.After.
base-v1.0shows the components-only icon.turbo-v1.1, whose model file is installed, still shows the checkmark.Testing
CivitModelVersionInstallStateTests: nothing installed, only the shared encoder and VAE installed (components only), one of several main model variants installed, anUnknowntyped file installed, and a version made only of component files.StabilityMatrix.Tests: all passed except theTestLicenseUrl/TestPreviewImageUrichecks, which need outbound network access that my test environment blocks (unrelated to this change).