Count downloads of the weight files

#1
by yeyingjin - opened
YeyingLab org

Hugging Face counts model downloads through a root-level config.json. This repo has none, so the model page shows "Downloads are not tracked" (or stays at 0). This PR adds a small metadata-only config.json. Weights and code are unchanged; downloads are counted from the merge on.

HF 通过根目录的 config.json 统计模型下载量。这个 PR 只加一个元数据文件,不改权重和代码,合并后开始计数。

YeyingLab org

Updated: the code loads one subfolder (--model-subfolder HNM/main), which never requests a root config.json, so the first version of this PR would still count 0. The PR now sets library_name: diffusion-single-file, whose rule counts .safetensors downloads, and removes config.json. Note: a run that loads model.safetensors and text/control_text.safetensors counts 2.

已更新:代码只加载一个子文件夹(--model-subfolder HNM/main),不会请求根目录的 config.json,原来的改法合并后还是 0。现在改成 library_name: diffusion-single-file(按 .safetensors 的下载计数),并删掉 config.json。注意:一次运行会加载 model.safetensors 和 text/control_text.safetensors,算 2 次。

yeyingjin changed pull request title from Add root config.json so Hugging Face counts downloads to Count downloads of the weight files
INV-WZQ changed pull request status to merged

Sign up or log in to comment