feat: 新增 K3 动作控制节点,移除启动更新弹框通知

- 新增 K3MotionControl / K3MotionVideoCheck 节点并注册
- K3_video: 生成音频参数改为 metadata.sound
- r2_uploader: 新增 upload_image 工具函数
- 移除启动时更新检查弹框
This commit is contained in:
Jony
2026-04-26 13:34:46 +08:00
parent caec23b5cc
commit 35333b296b
5 changed files with 412 additions and 12 deletions
+17
View File
@@ -47,6 +47,23 @@ async def _put_upload(upload_url: str, data: bytes, content_type: str):
raise RuntimeError(f"文件上传失败 ({resp.status}): {text}")
async def upload_image(pil_image) -> str:
"""
接受 PIL Image 对象,编码为 PNG 上传到 R2,返回公网 URL。
"""
import io as _io
buf = _io.BytesIO()
pil_image.save(buf, format="PNG")
data = buf.getvalue()
filename = f"{uuid.uuid4()}.png"
upload_url, public_url = await _presign(filename, "image/png")
await _put_upload(upload_url, data, "image/png")
print(f"[R2] 图片已上传: {public_url}")
return public_url
async def upload_video(video) -> str:
"""
接受 ComfyUI VIDEO 对象,上传到 R2,返回公网 URL。