comfyui-modelmirror 0.1.2
Basename is uppercase README.mdPython JSON parsing or serialization reference
SHA-256bb21e54d5fbd78fe595ff80f19938e9a97c87b467c5f515e6007c6ec0f32f172
Evidence
0# 发布步骤(照着敲,5 分钟)
发布包已经准备好:
```
E:\WorkSpace\_shared\assets\ComfyUI-ModelMirror\
```
## 0. 先把 LICENSE 里的占位���改掉
```powershell
notepad E:\WorkSpace\_shared\assets\ComfyUI-ModelMirror\LICENSE
```
把 `<YOUR NAME>` 换成你的名字或 ID。
## 1. 建仓库
名字建议:`ComfyUI-ModelMirror`(跟目录名一致,ComfyUI 用户一眼看懂)
在 GitHub 上新建一个 **空** 仓库(不要勾 README / .gitignore / LICENSE,我们本地已有)。
## 2. 本���初始化并推���
```powershell
cd E:\WorkSpace\_shared\assets\ComfyUI-ModelMirror
git init
git add .
git commit -m "feat: 缺模型一键镜像补齐(暂停/续���/���发/������性������)"
git branch -M main
git remote add origin https://github.com/<你���用������>/ComfyUI-ModelMirror.git
git push -u origin main
```
## 3. ��������� tag
```powershell
git tag -a v0.1.0 -m "v0.1.0 ������������版本"
git push origin v0.1.0
```
## 4. 发 Release
GitHub 页面 ��� Releases → Draft a new release → 选 `v0.1.0` → 发布���
**资���不用传**,用户 `git clone` 即可。
## 5. 发���社区(可选,但决定有没有人用)
**推荐三个地方:**
```
① ComfyUI 中文社区 / QQ 群 / 微信群
一句话:「缺模型下不动?这��
528�的目录。

---
## One-liner (EN)
**ComfyUI shows "missing models" when you open a shared workflow, and its download button
goes straight to `huggingface.co` — which is unreachable for many users.**
This extension adds a **Mirror Fetch** button next to it: it detects the missing model files,
resolves each to its official HF repo through a configurable mirror, and
7424� ①,改几行 JS 就能修,不需要重启。**
---
## 免责声���
```
⚠️ 本扩展只做一件事:把模型文件从镜像下载到正确的目录。
不绕过任何访问控制,不提
14:10… ����量 HF_MIRROR > ���文件 MIRROR ���认值
15"""
16
17import os
18import time
19import json
20import threading
21import urllib.request
22import urllib.error
23
24try:
25 from server import PromptServer
26 from aiohttp import web
27 import folder_paths
28except Exception as e: # 不在 ComfyUI 里时应静默失败,不拖垮启动
29 print(f"[mirror-fetch] 无法加载 ComfyUI 依赖: {e}")
30 PromptServer = None
31
32VERSION = "0.1.0"
33MIRROR = os.environ.get("HF_MIRROR", "https://hf-mirror.com")
34UA = {"User-Agent": "comfyui-mirror-fetch/" + VERSION}
35
36WEB_DIRECTORY = "./js"
37NODE_CLASS_MAPPINGS = {}
38NODE_DISPLAY_NAME_MAPPINGS = {}
39__all__ = ["WEB_DIRECTORY", "N …
106:44… �"""
107 if not isinstance(url, str):
108 return None
109 for host in ("https://huggingface.co/", "https://hf.co/"):
110 if url.startswith(host):
111 return MIRROR + "/" + url[len(host):]
112 if url.startswith(MIRROR + "/"):
…
No evidence locations were recorded for this file. Raw result