feat: add mflux library for download tracking#2092
Open
TimPietrusky wants to merge 1 commit into
Open
Conversation
mflux is an MLX port of image generation models (FLUX.1, FLUX.2, Z-Image, etc.) optimized for Apple Silicon. It has 4k+ GitHub stars and is actively maintained. Models tagged with library_name: mflux currently show 0 downloads because mflux is not registered in model-libraries.ts. mflux uses snapshot_download with allow_patterns that includes config.json, so targeting that file for countDownloads accurately reflects real usage. Closes huggingface#2091
Wauplin
reviewed
Apr 10, 2026
Comment on lines
+854
to
+855
| prettyLabel: "mflux", | ||
| repoName: "mflux", |
Contributor
There was a problem hiding this comment.
Suggested change
| prettyLabel: "mflux", | |
| repoName: "mflux", | |
| prettyLabel: "MFLUX", | |
| repoName: "MFLUX", |
(taken from https://github.com/filipstrand/mflux)
| repoName: "mflux", | ||
| repoUrl: "https://github.com/filipstrand/mflux", | ||
| filter: false, | ||
| countDownloads: `path:"config.json"`, |
Contributor
There was a problem hiding this comment.
Suggested change
| countDownloads: `path:"config.json"`, |
This is the default behavior. If your library needs to count downloads by config.json then no need to do anything! Registering the library is still good for linking to github repo but the download count rule is not needed anymore
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.
Summary
model-libraries.tsso that download stats are tracked for models tagged withlibrary_name: mfluxconfig.jsonas thecountDownloadstarget, which mflux explicitly requests viasnapshot_download(allow_patterns=[file_pattern, "config.json"])Context
mflux is a line-by-line MLX port of image generation models (FLUX.1, FLUX.2, Z-Image, etc.) optimized for Apple Silicon. It has 4k+ GitHub stars and is actively maintained.
All models with
library_name: mfluxcurrently show 0 downloads because the library isn't registered. Repos that happen to haveconfig.jsonbut don't setlibrary_name: mfluxget counted via the default fallback, confirming the fix is straightforward.library_nameconfig.jsonmadroid/flux.1-dev-mflux-4bitdhairyashil/FLUX.1-schnell-mflux-4bitfilipstrand/FLUX.1-Krea-dev-mflux-4bitmfluxRunpod/FLUX.2-klein-4B-mflux-4bitmfluxCloses #2091
Note
Low Risk
Low risk: adds a single new
MODEL_LIBRARIES_UI_ELEMENTSentry to improve download counting forlibrary_name: mfluxmodels, with no changes to shared logic or security-sensitive code.Overview
Adds the
mfluxlibrary toMODEL_LIBRARIES_UI_ELEMENTSso models tagged withlibrary_name: mfluxare recognized and have downloads counted.Download counting for
mfluxis configured to usepath:"config.json", and the library is markedfilter: falsewith repo metadata pointing tofilipstrand/mflux.Reviewed by Cursor Bugbot for commit 15918af. Bugbot is set up for automated code reviews on this repo. Configure here.