Add mascot auto-detect nodes
This commit is contained in:
@@ -20,6 +20,11 @@ Additionally, the Openpose Editor node from [toyxyz/ComfyUI-ultimate-openpose-ed
|
||||
- **pose_keypoint resize**: Resizes `POSE_KEYPOINT` to a target size (pads then scales to avoid stretching when aspect differs)
|
||||
- **pose_keypoint input**: Converts JSON text to KeyPoints
|
||||
- **pose_keypoint preview**: Converts KeyPoints to JSON
|
||||
- **(Down)Load Mascot DWPose Model**: Downloads and loads a mascot DWPose ONNX model from HuggingFace
|
||||
- **(Down)Load Mascot BBox Model**: Downloads and loads a mascot bbox ONNX model from HuggingFace
|
||||
- **Mascot DWPose Detector**: Detects mascot body pose as `POSE_KEYPOINT`
|
||||
- **Mascot BBox Detector**: Detects mascot part bounding boxes as `BOUNDING_BOX`
|
||||
- **pose_keypoint to dw_poses**: Converts 25-point `POSE_KEYPOINT` to SCAIL-Pose `DWPOSES`
|
||||
|
||||
## Installation
|
||||
### Install via ComfyUI Manager
|
||||
@@ -64,6 +69,10 @@ Please refer to example_workflows.
|
||||
2. **Incorrect body proportions after transformation with reference image**: The `pose_keypoint` and `reference_pose_keypoint` aspect ratios (canvas width/height) may not match. **ProportionChanger Reference** has `auto_resize_reference` (default ON) to automatically align the reference to the pose canvas size. If needed, use **pose_keypoint resize** to explicitly align `width`/`height`. Fine-tune individual body parts using the "ProportionChanger Params" node.
|
||||
3. **Nothing displays after transformation with reference image**: The reference image's pose estimation by DWPose has failed. Use OpenposeEditor or similar tools to input parameter values manually.
|
||||
|
||||
### Mascot OpenPose Models
|
||||
|
||||
Mascot OpenPose nodes download model artifacts from `grmchn/mascot-openpose-detect-test` on HuggingFace into `ComfyUI/models/mascot_body_detect`. The current test model package is CC-BY-NC 4.0 because it includes the ViTPose-L variant derived from a non-commercial pretrained backbone. The node code remains part of this repository, but use of the downloaded test models is subject to that model license.
|
||||
|
||||
## Attribution and Credits
|
||||
### Special Thanks
|
||||
- **[kijai/ComfyUI-WanVideoWrapper](https://github.com/kijai/ComfyUI-WanVideoWrapper)**
|
||||
|
||||
@@ -20,6 +20,11 @@
|
||||
- **pose_keypoint resize**: `POSE_KEYPOINT`を指定サイズにリサイズ(アスペクト比が違う場合はパディング→スケールで歪みを防ぐ)
|
||||
- **pose_keypoint input**: JSONテキストからKeyPointに変換する
|
||||
- **pose_keypoint preview**: KeyPointからJSONに変換する
|
||||
- **(Down)Load Mascot DWPose Model**: HuggingFaceからマスコット用DWPose ONNXモデルをダウンロードして読み込む
|
||||
- **(Down)Load Mascot BBox Model**: HuggingFaceからマスコット用bbox ONNXモデルをダウンロードして読み込む
|
||||
- **Mascot DWPose Detector**: マスコットの姿勢を`POSE_KEYPOINT`として検出する
|
||||
- **Mascot BBox Detector**: マスコットのパーツbboxを`BOUNDING_BOX`として検出する
|
||||
- **pose_keypoint to dw_poses**: 25点`POSE_KEYPOINT`をSCAIL-Pose用`DWPOSES`に変換する
|
||||
|
||||
## インストール
|
||||
### ComfyUI Managerでインストール
|
||||
@@ -65,6 +70,10 @@ example_workflowsを参照してください。
|
||||
2. **リファレンス画像ありでプロポーション変換した後の体型がおかしい**: `pose_keypoint`と`reference_pose_keypoint`の縦横比(canvas幅/高さ)が一致していない可能性があります。**ProportionChanger Reference**の`auto_resize_reference`(デフォルトON)でリファレンス側を自動で揃えます。必要に応じて**pose_keypoint resize**ノードで明示的に`width`/`height`を揃えてください。体の各パーツの微調整は「ProportionChanger Params」ノードで行ってください。
|
||||
3. **リファレンス画像ありでプロポーション変換した後に何も表示されない**:リファレンス画像のDWPoseによる姿勢推定が失敗しています。OpenposeEditorなどを利用してパラメータの数値を入力してください。
|
||||
|
||||
### Mascot OpenPoseモデル
|
||||
|
||||
Mascot OpenPoseノードは、HuggingFaceの`grmchn/mascot-openpose-detect-test`から`ComfyUI/models/mascot_body_detect`へモデルをダウンロードします。現在のtestモデルパッケージは、非商用のpretrained backboneに由来するViTPose-L variantを含むため、CC-BY-NC 4.0です。ノードコードはこのリポジトリの一部ですが、ダウンロードされたtestモデルの利用はモデル側のライセンスに従います。
|
||||
|
||||
## 帰属とクレジット
|
||||
### Special Thanks
|
||||
- **[kijai/ComfyUI-WanVideoWrapper](https://github.com/kijai/ComfyUI-WanVideoWrapper)**
|
||||
|
||||
@@ -5,6 +5,16 @@ Backward compatibility maintained for existing workflows
|
||||
|
||||
from .utils import log
|
||||
import json
|
||||
import os
|
||||
|
||||
try:
|
||||
import folder_paths
|
||||
folder_paths.add_model_folder_path(
|
||||
"mascot_body_detect",
|
||||
os.path.join(folder_paths.models_dir, "mascot_body_detect"),
|
||||
)
|
||||
except ImportError:
|
||||
folder_paths = None
|
||||
|
||||
# Import all nodes from our organized structure
|
||||
from .proportion_changer import (
|
||||
@@ -15,6 +25,11 @@ from .proportion_changer import (
|
||||
ProportionChangerInterpolator,
|
||||
PoseDataToPoseKeypoint,
|
||||
PoseKeypointResize,
|
||||
DownloadAndLoadMascotDWPoseModel,
|
||||
DownloadAndLoadMascotBBoxModel,
|
||||
MascotDWPoseDetector,
|
||||
MascotBBoxDetector,
|
||||
ConvertToSCAILPose,
|
||||
# TODO: Re-enable after fixing Kalman filter issues
|
||||
# ProportionChangerKeypointDenoiser,
|
||||
# ProportionChangerKeypointDenoiserAdvanced
|
||||
@@ -208,6 +223,13 @@ NODE_CLASS_MAPPINGS = {
|
||||
"PoseKeypointResize": PoseKeypointResize,
|
||||
"PoseJSONToPoseKeypoint": PoseJSONToPoseKeypoint,
|
||||
"PoseKeypointPreview": PoseKeypointPreview,
|
||||
|
||||
# Mascot OpenPose nodes
|
||||
"DownloadAndLoadMascotDWPoseModel": DownloadAndLoadMascotDWPoseModel,
|
||||
"DownloadAndLoadMascotBBoxModel": DownloadAndLoadMascotBBoxModel,
|
||||
"MascotDWPoseDetector": MascotDWPoseDetector,
|
||||
"MascotBBoxDetector": MascotBBoxDetector,
|
||||
"ConvertToSCAILPose": ConvertToSCAILPose,
|
||||
}
|
||||
|
||||
NODE_DISPLAY_NAME_MAPPINGS = {
|
||||
@@ -227,4 +249,11 @@ NODE_DISPLAY_NAME_MAPPINGS = {
|
||||
"PoseKeypointResize": "pose_keypoint resize",
|
||||
"PoseJSONToPoseKeypoint": "pose_keypoint input",
|
||||
"PoseKeypointPreview": "pose_keypoint preview",
|
||||
|
||||
# Mascot OpenPose nodes
|
||||
"DownloadAndLoadMascotDWPoseModel": "(Down)Load Mascot DWPose Model",
|
||||
"DownloadAndLoadMascotBBoxModel": "(Down)Load Mascot BBox Model",
|
||||
"MascotDWPoseDetector": "Mascot DWPose Detector",
|
||||
"MascotBBoxDetector": "Mascot BBox Detector",
|
||||
"ConvertToSCAILPose": "pose_keypoint to dw_poses",
|
||||
}
|
||||
|
||||
@@ -34,6 +34,15 @@ from .converter_nodes import (
|
||||
PoseKeypointResize,
|
||||
)
|
||||
|
||||
# Mascot OpenPose nodes
|
||||
from .mascot_nodes import (
|
||||
DownloadAndLoadMascotDWPoseModel,
|
||||
DownloadAndLoadMascotBBoxModel,
|
||||
MascotDWPoseDetector,
|
||||
MascotBBoxDetector,
|
||||
ConvertToSCAILPose,
|
||||
)
|
||||
|
||||
# Import keypoint denoiser node classes
|
||||
from .keypoint_denoiser_node import (
|
||||
ProportionChangerKeypointDenoiser,
|
||||
@@ -59,6 +68,13 @@ __all__ = [
|
||||
# Converter nodes
|
||||
"PoseDataToPoseKeypoint",
|
||||
"PoseKeypointResize",
|
||||
|
||||
# Mascot OpenPose nodes
|
||||
"DownloadAndLoadMascotDWPoseModel",
|
||||
"DownloadAndLoadMascotBBoxModel",
|
||||
"MascotDWPoseDetector",
|
||||
"MascotBBoxDetector",
|
||||
"ConvertToSCAILPose",
|
||||
|
||||
# KeyPoint Denoiser nodes
|
||||
"ProportionChangerKeypointDenoiser",
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+4
-2
@@ -7,6 +7,8 @@ opencv-python
|
||||
|
||||
# Progress bars and utilities
|
||||
tqdm
|
||||
huggingface_hub
|
||||
|
||||
# Optional: ONNX Runtime (for ONNX-based pose detection - currently not used in active nodes)
|
||||
# onnxruntime
|
||||
# ONNX Runtime for Mascot OpenPose nodes. Install onnxruntime-gpu instead if
|
||||
# your ComfyUI environment manages CUDA providers separately.
|
||||
onnxruntime
|
||||
|
||||
Reference in New Issue
Block a user