genmodelfit 0.2.0__tar.gz → 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/CHANGELOG.md +21 -1
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/PKG-INFO +92 -2
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/README.md +91 -1
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/docs/schema.md +75 -1
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/src/genmodelfit/__init__.py +36 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/src/genmodelfit/_version.py +1 -1
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/src/genmodelfit/cli.py +283 -0
- genmodelfit-0.3.0/src/genmodelfit/downloader.py +1167 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/test_cli_casual.py +3 -1
- genmodelfit-0.3.0/tests/test_download.py +1063 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/test_privacy_pc.py +36 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/.gitignore +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/CONTRIBUTING.md +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/LICENSE +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/THIRD_PARTY_NOTICES +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/docs/accuracy.md +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/docs/gate.md +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/docs/hardware.md +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/docs/license_requests.md +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/docs/release.md +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/docs/sources.md +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/pyproject.toml +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/src/genmodelfit/__main__.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/src/genmodelfit/bench.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/src/genmodelfit/calibrate.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/src/genmodelfit/data/__init__.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/src/genmodelfit/data/calibration.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/src/genmodelfit/data/db.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/src/genmodelfit/data/measurements.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/src/genmodelfit/data/signing_keys/2026-10.pub +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/src/genmodelfit/db.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/src/genmodelfit/estimate.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/src/genmodelfit/families.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/src/genmodelfit/fetch.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/src/genmodelfit/gate.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/src/genmodelfit/groups.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/src/genmodelfit/hardware.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/src/genmodelfit/headers.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/src/genmodelfit/hf.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/src/genmodelfit/license_sources.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/src/genmodelfit/models.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/src/genmodelfit/py.typed +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/src/genmodelfit/recommend.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/src/genmodelfit/remote.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/src/genmodelfit/repo_precision.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/src/genmodelfit/safety.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/src/genmodelfit/signing.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/src/genmodelfit/status.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/src/genmodelfit/table.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/src/genmodelfit/tasks.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/src/genmodelfit/update.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/src/genmodelfit/workflow.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/clihelp.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/conftest.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/3d_hunyuan3d_image_to_model.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/audio_ace_step_1_5_checkpoint.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/hardware/lspci_amd_nvidia.txt +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/hardware/nvsmi_garbage.txt +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/hardware/nvsmi_multi.csv +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/hardware/nvsmi_na.csv +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/hardware/nvsmi_no_devices.txt +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/hardware/nvsmi_no_driver.txt +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/hardware/nvsmi_old_error.txt +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/hardware/nvsmi_old_kepler.csv +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/hardware/nvsmi_old_maxwell.csv +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/hardware/nvsmi_rtx3070_win.csv +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/hardware/registry_amd_stale.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/hardware/registry_this_pc.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/hardware/wmi_amd_single.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/hardware/wmi_basic_nvidia.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/hardware/wmi_intel_nvidia.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/hardware/wmi_this_pc.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/image_sdxl_simple.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/image_z_image_turbo_int8.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/object_info_subset.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/text_to_video_wan.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/update/hf/ACE-Step__Ace-Step1.5.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/update/hf/AtomicChat__Qwen-Image-2.1-Turbo-Uncensored-GGUF.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/update/hf/Comfy-Org__Wan_2.1_ComfyUI_repackaged.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/update/hf/Comfy-Org__ace_step_1.5_ComfyUI_files.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/update/hf/Comfy-Org__hunyuan3D_2.0_repackaged.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/update/hf/Comfy-Org__stable-audio-open-1.0_repackaged.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/update/hf/Comfy-Org__z_image_turbo.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/update/hf/ComfyUI-Wiki__t5-base.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/update/hf/MeiGen-AI__InfiniteTalk.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/update/hf/Noctaluna__Noct-Q-Uncensored-Qwen-Image-2.1.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/update/hf/Qwen__Qwen-Image-2.1.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/update/hf/Qwen__Qwen3-VL-8B-Instruct.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/update/hf/Tongyi-MAI__Z-Image-Turbo.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/update/hf/Wan-AI__Wan2.1-FLF2V-14B-720P.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/update/hf/Wan-AI__Wan2.1-I2V-14B-480P.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/update/hf/Wan-AI__Wan2.1-I2V-14B-720P.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/update/hf/Wan-AI__Wan2.1-T2V-1.3B.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/update/hf/Wan-AI__Wan2.1-T2V-14B.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/update/hf/Wan-AI__Wan2.1-VACE-1.3B.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/update/hf/Wan-AI__Wan2.1-VACE-14B.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/update/hf/alibaba-pai__Wan2.1-Fun-V1.1-1.3B-Control-Camera.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/update/hf/alibaba-pai__Wan2.1-Fun-V1.1-1.3B-Control.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/update/hf/alibaba-pai__Wan2.1-Fun-V1.1-1.3B-InP.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/update/hf/alibaba-pai__Wan2.1-Fun-V1.1-14B-Control-Camera.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/update/hf/example-org__plain-nsfw-xl.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/update/hf/hexgrad__Kokoro-82M.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/update/hf/htdong__Wan-Alpha.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/update/hf/stabilityai__stable-audio-open-1.0.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/update/hf/tencent__Hunyuan3D-2.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/update/hf/tencent__Hunyuan3D-2mv.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/update/hf/yl4579__StyleTTS2-LJSpeech.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/update/hf_readme/AtomicChat__Qwen-Image-2.1-Turbo-Uncensored-GGUF.md +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/update/hf_readme/Noctaluna__Noct-Q-Uncensored-Qwen-Image-2.1.md +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/update/hf_readme/example-org__plain-nsfw-xl.md +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/update/hf_readme/hexgrad__Kokoro-82M.md +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/update/hf_search/direction_-1_filter_not-for-all-audiences_limit_100_pipeline_tag_text-to-image_sort_downloads.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/update/hf_search/direction_-1_limit_100_pipeline_tag_text-to-image_search_uncensored_sort_downloads.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/update/hf_search/direction_-1_limit_100_pipeline_tag_text-to-speech_sort_downloads.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/update/hf_search/direction_-1_limit_100_pipeline_tag_text-to-speech_sort_trendingScore.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/update/templates/3d_hunyuan3d_image_to_model.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/update/templates/audio_ace_step_1_5_checkpoint.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/update/templates/audio_stable_audio_example.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/update/templates/image_z_image_turbo.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/update/templates/image_z_image_turbo_int8.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/update/templates/index.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/update/templates/templates-wan2_1_infinitetalk_music.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/fixtures/video_wan2_2_14B_i2v.json +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/test_bench.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/test_bench_rtx3070.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/test_cli_json.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/test_core.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/test_embedding.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/test_estimate.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/test_families.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/test_gate.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/test_gate_real.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/test_groups.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/test_hardware.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/test_invariants.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/test_issue_28.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/test_issue_30.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/test_license_sources.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/test_licenses.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/test_privacy.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/test_release.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/test_review_14.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/test_review_fixes.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/test_status.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/test_table.py +0 -0
- {genmodelfit-0.2.0 → genmodelfit-0.3.0}/tests/test_update.py +0 -0
|
@@ -7,7 +7,27 @@ All notable changes to this project are documented here. The format is based on
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
-
## [0.
|
|
10
|
+
## [0.3.0] - 2026-10-21
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- `genmodelfit download <model>` and `gmf.plan_download()` / `gmf.download()` (Issue #31): download all files of a
|
|
15
|
+
model's workflow, with the precision chosen like `recommend` (`--precision`, `--budget GB`), into a ComfyUI folder by
|
|
16
|
+
each file's template folder (`--comfyui-dir`) or the same layout elsewhere (`--output-dir`). `--list` shows the plan
|
|
17
|
+
without any network access. Before downloading it shows every file's license and URL, the total size and the free
|
|
18
|
+
disk and asks for consent (`--yes` to skip). sha256 is checked while writing (a mismatch deletes the file),
|
|
19
|
+
`.part` files resume with HTTP Range, files already there are skipped, and it needs the download + 1 GB free.
|
|
20
|
+
Gated files, uncensored models (unless `--content all|uncensored`) and unknown licenses (unless
|
|
21
|
+
`--include-unknown-license`) are refused; only https URLs on Hugging Face / GitHub hosts are followed (each
|
|
22
|
+
redirect is checked, and URLs that urlsplit and urllib3 would read as different hosts are refused before
|
|
23
|
+
connecting); nothing is written outside the destination. Existing files are hashed again right before they
|
|
24
|
+
are skipped, restarts against servers that ignore Range are capped, and a `.lock` file stops two downloads of
|
|
25
|
+
the same file. URL paths may contain spaces (they are percent-encoded as requests does); spaces, `%` and `@` are
|
|
26
|
+
refused only in the scheme and host, and refusals say whether the URL is malformed or the host is not allowed.
|
|
27
|
+
JSON: docs/schema.md "download".
|
|
28
|
+
モデルを落とす `download` を足した(同意・sha256・続きから・ComfyUI のフォルダ)。
|
|
29
|
+
|
|
30
|
+
## [0.2.0] - 2026-10-20
|
|
11
31
|
|
|
12
32
|
Fewer unknowns in the table and a clear meaning for `?` and `-` (Issue #30). The JSON output changes in a way that
|
|
13
33
|
can break apps (below), so this is a minor release under 0.x semver (owner's decision).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: genmodelfit
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: Right-size image / video / audio / 3D generation models to your PC (inspired by llmfit).
|
|
5
5
|
Project-URL: Homepage, https://github.com/laxshmate/genmodelfit
|
|
6
6
|
Project-URL: Issues, https://github.com/laxshmate/genmodelfit/issues
|
|
@@ -189,6 +189,7 @@ Python 3.10+. Windows and Linux. GPUs: NVIDIA (CUDA) in v0.1; other PCs are judg
|
|
|
189
189
|
| `genmodelfit gate` | how many models can be auto-recommended, and why the rest are held / 自動でおすすめに出せる数と保留の理由 |
|
|
190
190
|
| `genmodelfit update` | rebuild the model list from upstream / 一覧を上流から作り直す |
|
|
191
191
|
| `genmodelfit update --from-release` | fetch the signed model list published by this project / 署名付きの配布の一覧を取り込む |
|
|
192
|
+
| `genmodelfit download <model> [--comfyui-dir DIR] [--list]` | download all files of the model for this PC (precision chosen like `recommend`), after showing licenses, sizes and free disk and asking you; sha256-checked, resumable ([below](#download--モデルを落とす)) / この PC に合う精度でモデルのファイルを落とす(ライセンス・大きさ・空きを見せて同意を取る。sha256 で確かめ、続きから再開できる) |
|
|
192
193
|
| `genmodelfit bench <template> --url URL` | measure VRAM / RAM / time on a running ComfyUI / 動いている ComfyUI で実測 |
|
|
193
194
|
|
|
194
195
|
Common options / 共通の指定:
|
|
@@ -275,6 +276,91 @@ if st.expired: # HEAD checks older than 30 days → auto-recommendations drop /
|
|
|
275
276
|
print("run: genmodelfit update --from-release", st.expires_at, st.auto_count)
|
|
276
277
|
```
|
|
277
278
|
|
|
279
|
+
## Download / モデルを落とす
|
|
280
|
+
|
|
281
|
+
```
|
|
282
|
+
genmodelfit download "Z-Image-Turbo" --list # what would be downloaded (no network, writes nothing)
|
|
283
|
+
genmodelfit download "Z-Image-Turbo" --comfyui-dir C:\ComfyUI
|
|
284
|
+
genmodelfit download image_z_image_turbo_int8 --output-dir D:\models --budget 15 --yes
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
- **Which files**: all files of one workflow. A model name (as in the tables) picks the workflow and precision like
|
|
288
|
+
`recommend`: the highest precision that runs on this PC without offloading. A workflow id is used as is.
|
|
289
|
+
`--precision int8` picks a precision; `--budget 15` (GB) caps the download (files already there are not counted).
|
|
290
|
+
- **Where**: `--comfyui-dir` puts each file in the ComfyUI folder the template names
|
|
291
|
+
(`models/diffusion_models`, `text_encoders`, `vae`, `loras`, `checkpoints`, …; subfolders in the file name are kept).
|
|
292
|
+
`--output-dir` (default: genmodelfit's user data folder, `models`) uses the same layout, so it can be added to
|
|
293
|
+
ComfyUI's `extra_model_paths.yaml`.
|
|
294
|
+
- **Consent first**: before anything is downloaded you see every file with its license and the license URL, licenses
|
|
295
|
+
that are not on the allowlist (commercial use without use restrictions; [docs/gate.md](https://github.com/laxshmate/genmodelfit/blob/main/docs/gate.md))
|
|
296
|
+
are marked, then the total size and the free disk, and you are asked `[y/N]`. `--yes` skips the question
|
|
297
|
+
(required with `--json`). Read the terms of each file before you use the model.
|
|
298
|
+
- **Not downloaded**: gated files (genmodelfit never handles logins or tokens; request access on the model page and
|
|
299
|
+
download them yourself), uncensored models unless you pass `--content all` (or `uncensored`), files whose license is
|
|
300
|
+
unknown unless you pass `--include-unknown-license`, files without a sha256 or size in the list, hosts other than
|
|
301
|
+
Hugging Face / GitHub.
|
|
302
|
+
- **Safety**: every file is checked with the sha256 in the list while it is written; a mismatch deletes it and fails.
|
|
303
|
+
A download goes to `<file>.part` first; after Ctrl-C or a network error run the same command again and it resumes
|
|
304
|
+
with an HTTP Range request (if the server ignores Range it starts over, at most 3 times). Files already there are
|
|
305
|
+
hashed again right before they are skipped; a different file with the same name is never overwritten. A
|
|
306
|
+
`<file>.lock` next to it stops two downloads of the same file at once (a lock left by a process that is gone is
|
|
307
|
+
cleaned up). It does not start unless the free disk is
|
|
308
|
+
the download + 1 GB. Nothing is written outside the destination: names with `..`, absolute paths, drive letters,
|
|
309
|
+
`\`, reserved Windows names (also as folder names), control / bidi characters, and symbolic links / junctions
|
|
310
|
+
that lead outside are refused.
|
|
311
|
+
- **Network**: only the URLs in the list (checked anonymously with HEAD), https only. Every redirect must stay on
|
|
312
|
+
the hosts below; a URL that could be read as two different hosts (`\`, spaces, control characters, `%` or `@`
|
|
313
|
+
in the host, non-ASCII hosts) is refused before any connection, and the host is read the way requests / urllib3
|
|
314
|
+
read it. Allowed:
|
|
315
|
+
`huggingface.co` / `*.hf.co` (CDN, Xet) / `github.com` / `objects.githubusercontent.com` /
|
|
316
|
+
`release-assets.githubusercontent.com`. No `~/.netrc` credentials, no tokens, nothing about this PC (User-Agent and
|
|
317
|
+
Range only). Waits for `Retry-After` on 429 / 503.
|
|
318
|
+
|
|
319
|
+
- **落とすもの**: 1 つのワークフローの全部のファイル。モデル名(表の Model)なら、`recommend` と同じく、この PC で
|
|
320
|
+
逃がさずに載る中で一番精度の高いワークフローを選びます。ID を指定すればそのまま。`--precision` で精度を、
|
|
321
|
+
`--budget`(GB)で落とす量の上限を決められます(既にあるファイルは数えません)。
|
|
322
|
+
- **置き場所**: `--comfyui-dir` なら、テンプレートの置き場所(`models/diffusion_models`・`text_encoders`・`vae`・`loras`・
|
|
323
|
+
`checkpoints` など)に置きます。`--output-dir`(既定は genmodelfit のデータのフォルダの `models`)も同じ並びです。
|
|
324
|
+
- **先に同意**: 落とす前に、ファイルごとのライセンスと原文の URL(許可リストに無いものは印付き)・合計の大きさ・空きを
|
|
325
|
+
出して `[y/N]` で尋ねます。`--yes` で省けます(`--json` で落とすときは必須)。使う前に各ファイルの条件を読んでください。
|
|
326
|
+
- **落とさないもの**: gated(ログインや利用申請が要る。genmodelfit はログイン情報を扱いません)、無検閲のモデル
|
|
327
|
+
(`--content all` か `uncensored` を明示したときだけ)、ライセンス不明(`--include-unknown-license` のときだけ)、
|
|
328
|
+
一覧に sha256・大きさの無いもの、Hugging Face・GitHub 以外の取得先。
|
|
329
|
+
- **安全**: 書きながら sha256 を計り、合わなければ消して失敗にします。途中は `<名前>.part` に書き、Ctrl-C や通信の失敗の
|
|
330
|
+
あとで同じコマンドを実行すると HTTP Range で続きから落とします(相手が Range に応じなければ最初から。3 回まで)。
|
|
331
|
+
既にあるファイルは飛ばす直前に sha256 を計り直し、同じ名前の別のファイルは上書きしません。同じファイルを
|
|
332
|
+
2 つの download が同時に書かないよう `<名前>.lock` を置きます(止まったプロセスの残りは片付けます)。空きが「落とす量 + 1 GB」に足りなければ
|
|
333
|
+
始めません。置き場所の外には書きません(`..`・絶対パス・ドライブ名・`\`・Windows の予約名・外へ出るリンクを拒みます)。
|
|
334
|
+
- **通信**: 一覧の URL(匿名の HEAD で確かめたもの)だけを https で使い、転送先は Hugging Face(CDN・Xet を含む)と
|
|
335
|
+
GitHub の決めたホストだけ。2 通りのホストに読める URL(`\`・空白・制御文字・ホストの中の `%` や `@`・ASCII でない
|
|
336
|
+
ホスト)は、つなぐ前に拒みます。`~/.netrc` もトークンも使わず、PC の情報も送りません。
|
|
337
|
+
|
|
338
|
+
Python:
|
|
339
|
+
|
|
340
|
+
```python
|
|
341
|
+
import genmodelfit as gmf
|
|
342
|
+
|
|
343
|
+
plan = gmf.plan_download("Z-Image-Turbo", comfyui_dir=r"C:\ComfyUI") # no network, writes nothing
|
|
344
|
+
for f in plan.files: # status: download / resume / present / conflict / unavailable
|
|
345
|
+
print(f.relpath, f.size_bytes, f.license, f.license_url, f.status)
|
|
346
|
+
print(plan.blocked, plan.warnings, plan.download_bytes, plan.disk_free_bytes)
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
def ask(plan) -> bool: # show licenses, URLs, total and free disk; True to go on
|
|
350
|
+
...
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
def show(p): # gmf.DownloadProgress
|
|
354
|
+
print(p.phase, p.name, p.done_bytes, p.total_bytes)
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
result = gmf.download(plan, confirm=ask, progress=show)
|
|
358
|
+
# or gmf.download("Z-Image-Turbo", yes=True, comfyui_dir=...) when the app already asked
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
The library prints nothing. `gmf.download` raises `gmf.DownloadRefused` (blocked, no consent), `gmf.DownloadError`
|
|
362
|
+
(network, sha256 mismatch, disk) and lets `KeyboardInterrupt` through, keeping the `.part` file for the next call.
|
|
363
|
+
|
|
278
364
|
## Hardware / ハードウェアの検出
|
|
279
365
|
|
|
280
366
|
- Only NVIDIA GPUs confirmed by `nvidia-smi` are used for judging (v0.1). A GPU is judged as **CPU** when no PyTorch
|
|
@@ -366,13 +452,15 @@ and held. See [docs/gate.md](https://github.com/laxshmate/genmodelfit/blob/main/
|
|
|
366
452
|
main weight files to read their header — dtype and tensor shapes; no weights are downloaded).
|
|
367
453
|
- `genmodelfit bench` talks only to the ComfyUI URL you give with `--url` (plus the official template files on
|
|
368
454
|
GitHub when ComfyUI does not have them).
|
|
455
|
+
- `genmodelfit download` (and `gmf.download()`) only GETs the model URLs in the list, over https, following
|
|
456
|
+
redirects only to Hugging Face / GitHub hosts; `--list` and `gmf.plan_download()` make no network access.
|
|
369
457
|
- Hardware information (GPU name, VRAM, RAM, CPU, disk) is read locally with `nvidia-smi` and psutil and is
|
|
370
458
|
**never sent**. Measurements from `bench` are saved only on your PC; they are shared only if you open a pull
|
|
371
459
|
request yourself ([CONTRIBUTING.md](https://github.com/laxshmate/genmodelfit/blob/main/CONTRIBUTING.md)).
|
|
372
460
|
Saved measurements hold no host name, user name, paths or GPU UUID.
|
|
373
461
|
- No telemetry. No hardware information, measurements, prompts or other user content is ever sent anywhere.
|
|
374
462
|
Tests replace the PC's details with marker strings and check that no request URL, header or body of `update`,
|
|
375
|
-
`update --from-release` or `
|
|
463
|
+
`update --from-release`, `bench` or `download` contains them.
|
|
376
464
|
Requests carry the User-Agent `genmodelfit/<version> (+https://github.com/laxshmate/genmodelfit)`, and never the
|
|
377
465
|
credentials in your `~/.netrc` (proxy and certificate settings such as `HTTPS_PROXY` are still honored).
|
|
378
466
|
|
|
@@ -382,6 +470,8 @@ and held. See [docs/gate.md](https://github.com/laxshmate/genmodelfit/blob/main/
|
|
|
382
470
|
- `update` は公開の情報を読むだけです(GitHub の ComfyUI テンプレート、Hugging Face Hub の API、モデルの URL への HEAD と、
|
|
383
471
|
本体のファイルの先頭の見出し(dtype・テンソルの形)だけの Range 要求。モデル本体は落としません)。
|
|
384
472
|
- `bench` は `--url` で指定した ComfyUI とだけ話します(ComfyUI に無い公式テンプレートは GitHub から取ります)。
|
|
473
|
+
- `download` は一覧のモデルの URL へ https の GET を送るだけです(転送先は Hugging Face・GitHub の決めたホストだけ)。
|
|
474
|
+
`--list` と `gmf.plan_download()` は通信しません。
|
|
385
475
|
- PC の情報(GPU の名前・VRAM・メモリ・CPU・空き)は `nvidia-smi` と psutil で手元で読むだけで、**送りません**。
|
|
386
476
|
`bench` の実測は手元に保存するだけで、利用者が自分で Pull Request を出したときだけ共有されます
|
|
387
477
|
(保存する実測に PC の名前・ユーザー名・パス・GPU の UUID は入りません)。
|
|
@@ -149,6 +149,7 @@ Python 3.10+. Windows and Linux. GPUs: NVIDIA (CUDA) in v0.1; other PCs are judg
|
|
|
149
149
|
| `genmodelfit gate` | how many models can be auto-recommended, and why the rest are held / 自動でおすすめに出せる数と保留の理由 |
|
|
150
150
|
| `genmodelfit update` | rebuild the model list from upstream / 一覧を上流から作り直す |
|
|
151
151
|
| `genmodelfit update --from-release` | fetch the signed model list published by this project / 署名付きの配布の一覧を取り込む |
|
|
152
|
+
| `genmodelfit download <model> [--comfyui-dir DIR] [--list]` | download all files of the model for this PC (precision chosen like `recommend`), after showing licenses, sizes and free disk and asking you; sha256-checked, resumable ([below](#download--モデルを落とす)) / この PC に合う精度でモデルのファイルを落とす(ライセンス・大きさ・空きを見せて同意を取る。sha256 で確かめ、続きから再開できる) |
|
|
152
153
|
| `genmodelfit bench <template> --url URL` | measure VRAM / RAM / time on a running ComfyUI / 動いている ComfyUI で実測 |
|
|
153
154
|
|
|
154
155
|
Common options / 共通の指定:
|
|
@@ -235,6 +236,91 @@ if st.expired: # HEAD checks older than 30 days → auto-recommendations drop /
|
|
|
235
236
|
print("run: genmodelfit update --from-release", st.expires_at, st.auto_count)
|
|
236
237
|
```
|
|
237
238
|
|
|
239
|
+
## Download / モデルを落とす
|
|
240
|
+
|
|
241
|
+
```
|
|
242
|
+
genmodelfit download "Z-Image-Turbo" --list # what would be downloaded (no network, writes nothing)
|
|
243
|
+
genmodelfit download "Z-Image-Turbo" --comfyui-dir C:\ComfyUI
|
|
244
|
+
genmodelfit download image_z_image_turbo_int8 --output-dir D:\models --budget 15 --yes
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
- **Which files**: all files of one workflow. A model name (as in the tables) picks the workflow and precision like
|
|
248
|
+
`recommend`: the highest precision that runs on this PC without offloading. A workflow id is used as is.
|
|
249
|
+
`--precision int8` picks a precision; `--budget 15` (GB) caps the download (files already there are not counted).
|
|
250
|
+
- **Where**: `--comfyui-dir` puts each file in the ComfyUI folder the template names
|
|
251
|
+
(`models/diffusion_models`, `text_encoders`, `vae`, `loras`, `checkpoints`, …; subfolders in the file name are kept).
|
|
252
|
+
`--output-dir` (default: genmodelfit's user data folder, `models`) uses the same layout, so it can be added to
|
|
253
|
+
ComfyUI's `extra_model_paths.yaml`.
|
|
254
|
+
- **Consent first**: before anything is downloaded you see every file with its license and the license URL, licenses
|
|
255
|
+
that are not on the allowlist (commercial use without use restrictions; [docs/gate.md](https://github.com/laxshmate/genmodelfit/blob/main/docs/gate.md))
|
|
256
|
+
are marked, then the total size and the free disk, and you are asked `[y/N]`. `--yes` skips the question
|
|
257
|
+
(required with `--json`). Read the terms of each file before you use the model.
|
|
258
|
+
- **Not downloaded**: gated files (genmodelfit never handles logins or tokens; request access on the model page and
|
|
259
|
+
download them yourself), uncensored models unless you pass `--content all` (or `uncensored`), files whose license is
|
|
260
|
+
unknown unless you pass `--include-unknown-license`, files without a sha256 or size in the list, hosts other than
|
|
261
|
+
Hugging Face / GitHub.
|
|
262
|
+
- **Safety**: every file is checked with the sha256 in the list while it is written; a mismatch deletes it and fails.
|
|
263
|
+
A download goes to `<file>.part` first; after Ctrl-C or a network error run the same command again and it resumes
|
|
264
|
+
with an HTTP Range request (if the server ignores Range it starts over, at most 3 times). Files already there are
|
|
265
|
+
hashed again right before they are skipped; a different file with the same name is never overwritten. A
|
|
266
|
+
`<file>.lock` next to it stops two downloads of the same file at once (a lock left by a process that is gone is
|
|
267
|
+
cleaned up). It does not start unless the free disk is
|
|
268
|
+
the download + 1 GB. Nothing is written outside the destination: names with `..`, absolute paths, drive letters,
|
|
269
|
+
`\`, reserved Windows names (also as folder names), control / bidi characters, and symbolic links / junctions
|
|
270
|
+
that lead outside are refused.
|
|
271
|
+
- **Network**: only the URLs in the list (checked anonymously with HEAD), https only. Every redirect must stay on
|
|
272
|
+
the hosts below; a URL that could be read as two different hosts (`\`, spaces, control characters, `%` or `@`
|
|
273
|
+
in the host, non-ASCII hosts) is refused before any connection, and the host is read the way requests / urllib3
|
|
274
|
+
read it. Allowed:
|
|
275
|
+
`huggingface.co` / `*.hf.co` (CDN, Xet) / `github.com` / `objects.githubusercontent.com` /
|
|
276
|
+
`release-assets.githubusercontent.com`. No `~/.netrc` credentials, no tokens, nothing about this PC (User-Agent and
|
|
277
|
+
Range only). Waits for `Retry-After` on 429 / 503.
|
|
278
|
+
|
|
279
|
+
- **落とすもの**: 1 つのワークフローの全部のファイル。モデル名(表の Model)なら、`recommend` と同じく、この PC で
|
|
280
|
+
逃がさずに載る中で一番精度の高いワークフローを選びます。ID を指定すればそのまま。`--precision` で精度を、
|
|
281
|
+
`--budget`(GB)で落とす量の上限を決められます(既にあるファイルは数えません)。
|
|
282
|
+
- **置き場所**: `--comfyui-dir` なら、テンプレートの置き場所(`models/diffusion_models`・`text_encoders`・`vae`・`loras`・
|
|
283
|
+
`checkpoints` など)に置きます。`--output-dir`(既定は genmodelfit のデータのフォルダの `models`)も同じ並びです。
|
|
284
|
+
- **先に同意**: 落とす前に、ファイルごとのライセンスと原文の URL(許可リストに無いものは印付き)・合計の大きさ・空きを
|
|
285
|
+
出して `[y/N]` で尋ねます。`--yes` で省けます(`--json` で落とすときは必須)。使う前に各ファイルの条件を読んでください。
|
|
286
|
+
- **落とさないもの**: gated(ログインや利用申請が要る。genmodelfit はログイン情報を扱いません)、無検閲のモデル
|
|
287
|
+
(`--content all` か `uncensored` を明示したときだけ)、ライセンス不明(`--include-unknown-license` のときだけ)、
|
|
288
|
+
一覧に sha256・大きさの無いもの、Hugging Face・GitHub 以外の取得先。
|
|
289
|
+
- **安全**: 書きながら sha256 を計り、合わなければ消して失敗にします。途中は `<名前>.part` に書き、Ctrl-C や通信の失敗の
|
|
290
|
+
あとで同じコマンドを実行すると HTTP Range で続きから落とします(相手が Range に応じなければ最初から。3 回まで)。
|
|
291
|
+
既にあるファイルは飛ばす直前に sha256 を計り直し、同じ名前の別のファイルは上書きしません。同じファイルを
|
|
292
|
+
2 つの download が同時に書かないよう `<名前>.lock` を置きます(止まったプロセスの残りは片付けます)。空きが「落とす量 + 1 GB」に足りなければ
|
|
293
|
+
始めません。置き場所の外には書きません(`..`・絶対パス・ドライブ名・`\`・Windows の予約名・外へ出るリンクを拒みます)。
|
|
294
|
+
- **通信**: 一覧の URL(匿名の HEAD で確かめたもの)だけを https で使い、転送先は Hugging Face(CDN・Xet を含む)と
|
|
295
|
+
GitHub の決めたホストだけ。2 通りのホストに読める URL(`\`・空白・制御文字・ホストの中の `%` や `@`・ASCII でない
|
|
296
|
+
ホスト)は、つなぐ前に拒みます。`~/.netrc` もトークンも使わず、PC の情報も送りません。
|
|
297
|
+
|
|
298
|
+
Python:
|
|
299
|
+
|
|
300
|
+
```python
|
|
301
|
+
import genmodelfit as gmf
|
|
302
|
+
|
|
303
|
+
plan = gmf.plan_download("Z-Image-Turbo", comfyui_dir=r"C:\ComfyUI") # no network, writes nothing
|
|
304
|
+
for f in plan.files: # status: download / resume / present / conflict / unavailable
|
|
305
|
+
print(f.relpath, f.size_bytes, f.license, f.license_url, f.status)
|
|
306
|
+
print(plan.blocked, plan.warnings, plan.download_bytes, plan.disk_free_bytes)
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
def ask(plan) -> bool: # show licenses, URLs, total and free disk; True to go on
|
|
310
|
+
...
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
def show(p): # gmf.DownloadProgress
|
|
314
|
+
print(p.phase, p.name, p.done_bytes, p.total_bytes)
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
result = gmf.download(plan, confirm=ask, progress=show)
|
|
318
|
+
# or gmf.download("Z-Image-Turbo", yes=True, comfyui_dir=...) when the app already asked
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
The library prints nothing. `gmf.download` raises `gmf.DownloadRefused` (blocked, no consent), `gmf.DownloadError`
|
|
322
|
+
(network, sha256 mismatch, disk) and lets `KeyboardInterrupt` through, keeping the `.part` file for the next call.
|
|
323
|
+
|
|
238
324
|
## Hardware / ハードウェアの検出
|
|
239
325
|
|
|
240
326
|
- Only NVIDIA GPUs confirmed by `nvidia-smi` are used for judging (v0.1). A GPU is judged as **CPU** when no PyTorch
|
|
@@ -326,13 +412,15 @@ and held. See [docs/gate.md](https://github.com/laxshmate/genmodelfit/blob/main/
|
|
|
326
412
|
main weight files to read their header — dtype and tensor shapes; no weights are downloaded).
|
|
327
413
|
- `genmodelfit bench` talks only to the ComfyUI URL you give with `--url` (plus the official template files on
|
|
328
414
|
GitHub when ComfyUI does not have them).
|
|
415
|
+
- `genmodelfit download` (and `gmf.download()`) only GETs the model URLs in the list, over https, following
|
|
416
|
+
redirects only to Hugging Face / GitHub hosts; `--list` and `gmf.plan_download()` make no network access.
|
|
329
417
|
- Hardware information (GPU name, VRAM, RAM, CPU, disk) is read locally with `nvidia-smi` and psutil and is
|
|
330
418
|
**never sent**. Measurements from `bench` are saved only on your PC; they are shared only if you open a pull
|
|
331
419
|
request yourself ([CONTRIBUTING.md](https://github.com/laxshmate/genmodelfit/blob/main/CONTRIBUTING.md)).
|
|
332
420
|
Saved measurements hold no host name, user name, paths or GPU UUID.
|
|
333
421
|
- No telemetry. No hardware information, measurements, prompts or other user content is ever sent anywhere.
|
|
334
422
|
Tests replace the PC's details with marker strings and check that no request URL, header or body of `update`,
|
|
335
|
-
`update --from-release` or `
|
|
423
|
+
`update --from-release`, `bench` or `download` contains them.
|
|
336
424
|
Requests carry the User-Agent `genmodelfit/<version> (+https://github.com/laxshmate/genmodelfit)`, and never the
|
|
337
425
|
credentials in your `~/.netrc` (proxy and certificate settings such as `HTTPS_PROXY` are still honored).
|
|
338
426
|
|
|
@@ -342,6 +430,8 @@ and held. See [docs/gate.md](https://github.com/laxshmate/genmodelfit/blob/main/
|
|
|
342
430
|
- `update` は公開の情報を読むだけです(GitHub の ComfyUI テンプレート、Hugging Face Hub の API、モデルの URL への HEAD と、
|
|
343
431
|
本体のファイルの先頭の見出し(dtype・テンソルの形)だけの Range 要求。モデル本体は落としません)。
|
|
344
432
|
- `bench` は `--url` で指定した ComfyUI とだけ話します(ComfyUI に無い公式テンプレートは GitHub から取ります)。
|
|
433
|
+
- `download` は一覧のモデルの URL へ https の GET を送るだけです(転送先は Hugging Face・GitHub の決めたホストだけ)。
|
|
434
|
+
`--list` と `gmf.plan_download()` は通信しません。
|
|
345
435
|
- PC の情報(GPU の名前・VRAM・メモリ・CPU・空き)は `nvidia-smi` と psutil で手元で読むだけで、**送りません**。
|
|
346
436
|
`bench` の実測は手元に保存するだけで、利用者が自分で Pull Request を出したときだけ共有されます
|
|
347
437
|
(保存する実測に PC の名前・ユーザー名・パス・GPU の UUID は入りません)。
|
|
@@ -14,7 +14,7 @@ Every command with `--json` prints one object:
|
|
|
14
14
|
| key | type | meaning |
|
|
15
15
|
|---|---|---|
|
|
16
16
|
| `genmodelfit` | str | tool version |
|
|
17
|
-
| `command` | str | `system` / `recommend` / `fit` / `search` / `types` / `info` / `update` / `bench` / `gate` |
|
|
17
|
+
| `command` | str | `system` / `recommend` / `fit` / `search` / `types` / `info` / `update` / `bench` / `gate` / `download` |
|
|
18
18
|
| `system` | System | the PC that was judged (after `--vram` / `--ram` overrides). Not in `gate` / `update` / `bench` |
|
|
19
19
|
| `database` | object | `origin` (`bundled` / `cache` / `path`), `generated_at`, `models`, `measurements` (counts). In `system` also `status` (DataStatus, below). Not in `bench` / `update --from-release` |
|
|
20
20
|
| `error` | str | only on failure (exit code 1) |
|
|
@@ -31,6 +31,7 @@ The same as the SIDE EFFECTS of each command's `--help` and README "Privacy":
|
|
|
31
31
|
| `update --inspect-only` | ranged GET of the headers of the main weight files on Hugging Face, GET of the ComfyUI template JSONs; nothing with `--offline` | the cache `db.json` (or `--output`), `file_headers.json` in the cache |
|
|
32
32
|
| `update --from-release` | GET `db.json` and `db.json.sig` from this project's `data-latest` release | the cache `db.json` (or `--output`), `release_state.json` |
|
|
33
33
|
| `bench` | only the ComfyUI `--url` (+ official template files on GitHub if ComfyUI lacks them) | a measurement JSON in the cache (or `--output`) |
|
|
34
|
+
| `download` | GET of the model URLs in the list (https; redirects only to Hugging Face / GitHub hosts); none with `--list` | the files under the destination (`<file>.part` while downloading); nothing with `--list` |
|
|
34
35
|
|
|
35
36
|
No telemetry; nothing about the PC or the user is sent. HTTP uses `fetch.make_session()`: User-Agent
|
|
36
37
|
`genmodelfit/<version> (+https://github.com/laxshmate/genmodelfit)`, proxy / CA environment variables honored, `~/.netrc`
|
|
@@ -609,6 +610,79 @@ How bench fills Measurement / 測り方:
|
|
|
609
610
|
- `--set` values: only numbers are written to `note`; for other values only the input name is kept.
|
|
610
611
|
- The saved file is `{"measurements": [Measurement]}` and holds no paths, user names or prompts.
|
|
611
612
|
|
|
613
|
+
## download
|
|
614
|
+
|
|
615
|
+
`genmodelfit download <model> --json` prints the envelope (with `system` and `database`) plus the keys below.
|
|
616
|
+
`--list --json` prints the plan only (`listed: true`, `result: null`; no network access, nothing written, exit 0 even
|
|
617
|
+
when `plan.ok` is false). Downloading with `--json` needs `--yes`. On failure (exit 1, or 130 after Ctrl-C) `error` is
|
|
618
|
+
set, `result` is null and `plan` is the plan (when it was made). A model that is not found or matches several
|
|
619
|
+
models gives `error` (and `candidates`) without `plan`.
|
|
620
|
+
Python: `gmf.plan_download(...)` returns `DownloadPlan` (`.to_dict()` is `plan`), `gmf.download(...)` returns
|
|
621
|
+
`DownloadResult` (`.to_dict()` is `result`).
|
|
622
|
+
|
|
623
|
+
| key | type | meaning |
|
|
624
|
+
|---|---|---|
|
|
625
|
+
| `listed` | bool | true for `--list` (nothing downloaded) |
|
|
626
|
+
| `plan` | DownloadPlan | what is (or would be) downloaded |
|
|
627
|
+
| `result` | DownloadResult \| null | what happened; null for `--list` and on failure |
|
|
628
|
+
|
|
629
|
+
DownloadPlan:
|
|
630
|
+
|
|
631
|
+
| key | type | meaning |
|
|
632
|
+
|---|---|---|
|
|
633
|
+
| `model_id`, `name` | str | the workflow (list entry) chosen |
|
|
634
|
+
| `model_name` | str | the model name shown in the tables |
|
|
635
|
+
| `modality`, `content`, `precision` | str / str / str \| null | as in ModelEntry |
|
|
636
|
+
| `fit_level`, `run_mode_label`, `auto` | str / str / bool | the judgement on this PC (as in `recommend`) |
|
|
637
|
+
| `chosen` | str | why this workflow was chosen (Japanese) |
|
|
638
|
+
| `layout` | str | `comfyui` (`--comfyui-dir`: `root` is `<dir>/models`) / `output` (`--output-dir` or the default; same layout) |
|
|
639
|
+
| `root` | str | absolute path of the folder files go into (`<root>/<directory>/<name>`) |
|
|
640
|
+
| `files` | PlannedFile[] | one per file of the workflow |
|
|
641
|
+
| `total_bytes` | int | sum of the file sizes |
|
|
642
|
+
| `download_bytes` | int | still to download (minus files already there and `.part` bytes) |
|
|
643
|
+
| `present_bytes` | int | files already there with the right sha256 |
|
|
644
|
+
| `disk_free_bytes` | int \| null | free space at `root` (or its nearest existing parent) |
|
|
645
|
+
| `disk_needed_bytes` | int | `download_bytes` + `margin_bytes` (0 when nothing to download) |
|
|
646
|
+
| `margin_bytes` | int | 1 GiB |
|
|
647
|
+
| `budget_bytes` | int \| null | `--budget` in bytes |
|
|
648
|
+
| `blocked` | str[] | why it will not download (Japanese). Empty = can download |
|
|
649
|
+
| `warnings` | str[] | things to know (licenses not on the allowlist, will not run on this PC, layout hint) |
|
|
650
|
+
| `alternatives` | object[] | the other workflows considered: `id`, `precision`, `use`, `fit_level`, `memory_required_gb`, `size_bytes`, `auto` |
|
|
651
|
+
| `license_url` | str \| null | the model's license page |
|
|
652
|
+
| `ok` | bool | `blocked` is empty |
|
|
653
|
+
|
|
654
|
+
PlannedFile:
|
|
655
|
+
|
|
656
|
+
| key | type | meaning |
|
|
657
|
+
|---|---|---|
|
|
658
|
+
| `name` | str | file name in the list (may contain ComfyUI subfolders, `/`) |
|
|
659
|
+
| `relpath` | str | path under `root` (`<directory>/<name>`; `other/<name>` when the list has no directory); "" when refused |
|
|
660
|
+
| `dest` | str | absolute destination path; "" when refused |
|
|
661
|
+
| `url`, `sha256`, `size_bytes`, `directory`, `role` | | from ModelFile |
|
|
662
|
+
| `license`, `license_name` | str \| null | the license used for the check (gate's conservative reading; null = unknown) |
|
|
663
|
+
| `license_url` | str \| null | where the license text is |
|
|
664
|
+
| `license_note` | str \| null | why the license differs from the list's value, or why it could not be confirmed |
|
|
665
|
+
| `license_allowed` | bool | on the license allowlist (gate default or `--license-allowlist`) |
|
|
666
|
+
| `gated` | bool \| null | access request needed (also when the upstream of a component asks for it) |
|
|
667
|
+
| `status` | str | `download` / `resume` (a `.part` exists) / `present` (already there, sha256 matches) / `conflict` (a different file has the name; never overwritten) / `unavailable` (see `reason`) |
|
|
668
|
+
| `part_bytes` | int | size of the existing `.part` |
|
|
669
|
+
| `remaining_bytes` | int | bytes still to download for this file |
|
|
670
|
+
| `reason` | str \| null | why `conflict` / `unavailable` (Japanese) |
|
|
671
|
+
| `verified` | bool | for `present`: the sha256 was measured while planning (false with `verify_existing=False`: size only). `download` always measures existing files again before skipping them |
|
|
672
|
+
|
|
673
|
+
DownloadResult:
|
|
674
|
+
|
|
675
|
+
| key | type | meaning |
|
|
676
|
+
|---|---|---|
|
|
677
|
+
| `model_id`, `root` | str | as in the plan |
|
|
678
|
+
| `downloaded` | str[] | `relpath` of the files downloaded (sha256 checked) |
|
|
679
|
+
| `resumed` | str[] | of those, continued from a `.part` with HTTP Range |
|
|
680
|
+
| `restarted` | str[] | of those, started over because the server ignored Range |
|
|
681
|
+
| `skipped` | str[] | already there; the sha256 was measured in this run and matched |
|
|
682
|
+
| `bytes_downloaded` | int | bytes received in this run |
|
|
683
|
+
| `seconds` | float | wall time |
|
|
684
|
+
| `files` | object[] | `relpath`, `dest`, `sha256` of every file |
|
|
685
|
+
|
|
612
686
|
## Database file (`db.json`)
|
|
613
687
|
|
|
614
688
|
```json
|
|
@@ -12,6 +12,8 @@ Python から:
|
|
|
12
12
|
fit.to_dict() # `recommend --json` の models の 1 件と同じ形
|
|
13
13
|
if gmf.data_status().expired: # 同梱・取り込んだ一覧の HEAD の確認が古い(30 日)
|
|
14
14
|
...
|
|
15
|
+
plan = gmf.plan_download("Z-Image-Turbo", comfyui_dir="C:/ComfyUI") # 落とさずに計画だけ(通信しない)
|
|
16
|
+
gmf.download(plan, confirm=ask_user, progress=show) # 同意を取ってから落とす(sha256 で確かめる)
|
|
15
17
|
"""
|
|
16
18
|
|
|
17
19
|
from __future__ import annotations
|
|
@@ -23,6 +25,14 @@ from datetime import datetime
|
|
|
23
25
|
from ._version import __version__
|
|
24
26
|
from .db import Database
|
|
25
27
|
from .db import load as load_db
|
|
28
|
+
from .downloader import (
|
|
29
|
+
DownloadError,
|
|
30
|
+
DownloadPlan,
|
|
31
|
+
DownloadProgress,
|
|
32
|
+
DownloadRefused,
|
|
33
|
+
DownloadResult,
|
|
34
|
+
plan_download,
|
|
35
|
+
)
|
|
26
36
|
from .estimate import estimate
|
|
27
37
|
from .hardware import detect
|
|
28
38
|
from .models import (
|
|
@@ -228,12 +238,36 @@ def info(model_id: str, *, db: Database | None = None) -> ModelEntry | None:
|
|
|
228
238
|
return (db or load_db()).get(model_id)
|
|
229
239
|
|
|
230
240
|
|
|
241
|
+
def download(
|
|
242
|
+
plan_or_model, *, progress=None, confirm=None, yes: bool = False, **plan_kwargs
|
|
243
|
+
) -> DownloadResult:
|
|
244
|
+
"""モデルを落とす(CLI の `download`)。何も表示しない。
|
|
245
|
+
|
|
246
|
+
plan_or_model: plan_download() の計画、またはモデルの名前・ID
|
|
247
|
+
(そのときは plan_kwargs を plan_download に渡す。
|
|
248
|
+
precision / budget_gb / output_dir / comfyui_dir / content / include_unknown_license など)。
|
|
249
|
+
confirm(plan) -> bool で利用者の同意を取る(ライセンス・利用条件の URL・大きさ・空きを見せる)。
|
|
250
|
+
confirm を渡さないときは yes=True で同意済みを示す(どちらも無ければ DownloadRefused)。
|
|
251
|
+
progress(DownloadProgress) で進み具合を受け取る。止める理由(gated・無検閲・ライセンス不明・空き不足・
|
|
252
|
+
置き場所の外・許していない取得先)は DownloadRefused / DownloadError(.plan に計画)。
|
|
253
|
+
中断(KeyboardInterrupt)は .part を残すので、もう一度呼ぶと続きから落とす。
|
|
254
|
+
"""
|
|
255
|
+
from .downloader import download as _download
|
|
256
|
+
|
|
257
|
+
return _download(plan_or_model, progress=progress, confirm=confirm, yes=yes, **plan_kwargs)
|
|
258
|
+
|
|
259
|
+
|
|
231
260
|
__all__ = [
|
|
232
261
|
"CONTENT_LEVELS",
|
|
233
262
|
"FIT_LEVELS",
|
|
234
263
|
"MODALITIES",
|
|
235
264
|
"DataStatus",
|
|
236
265
|
"Database",
|
|
266
|
+
"DownloadError",
|
|
267
|
+
"DownloadPlan",
|
|
268
|
+
"DownloadProgress",
|
|
269
|
+
"DownloadRefused",
|
|
270
|
+
"DownloadResult",
|
|
237
271
|
"Estimate",
|
|
238
272
|
"Fit",
|
|
239
273
|
"Measurement",
|
|
@@ -244,11 +278,13 @@ __all__ = [
|
|
|
244
278
|
"__version__",
|
|
245
279
|
"data_status",
|
|
246
280
|
"detect",
|
|
281
|
+
"download",
|
|
247
282
|
"estimate",
|
|
248
283
|
"evaluate",
|
|
249
284
|
"fit_list",
|
|
250
285
|
"info",
|
|
251
286
|
"load_db",
|
|
287
|
+
"plan_download",
|
|
252
288
|
"recommend",
|
|
253
289
|
"search",
|
|
254
290
|
"system",
|