27 Commits

Author SHA1 Message Date
wenjian
bea0fa06eb docs: add GitHub open source best practices guide 2026-01-16 22:38:28 +08:00
wenjian
fe864f0c9b fix: resolve face detection unpacking error and insightface parameter issue
- Fix FaceLandmarkerResult unpacking error by returning tuple (result, None)
  when no face is detected in detect() and detect_for_video() methods
- Fix insightface FaceAnalysis.get() invalid parameter by setting det_thresh
  via det_model attribute instead of passing it as argument
- Add mesh3d None check to properly trigger insightface fallback detection
2026-01-14 02:19:38 +08:00
root
e4fef86490 feat: add faster DreamID-V pipeline and enhance video processing
- Add 'dreamidv_wan_faster' module for accelerated inference
- Support 'origin' and 'faster' pipeline types in RunningHub_DreamID_V_Loader
- Add 'face_detection_threshold' parameter to control face detection sensitivity
- Improve video sampling with skip-frame handling and FFmpeg-based audio sync
- Enhance face landmark alignment and video data extraction logic
2026-01-14 02:19:38 +08:00
zhangzhu
b5a21a50aa [Add] update for cpu 2026-01-13 01:51:03 +08:00
Your Name
e9db2932ce switch default pipeline to faster one 2026-01-12 08:55:51 +00:00
Your Name
8911d1e041 add faster pipeline 2026-01-12 08:53:09 +00:00
wenjian
07d2117daf Add face_detection_threshold input parameter to control face detection sensitivity 2026-01-10 02:07:13 +08:00
Your Name
e5cda90133 close test node 2026-01-09 10:55:54 +00:00
Your Name
82663807b0 swap to rh custom version 2026-01-09 10:38:51 +00:00
Your Name
03c2a15838 XMerge branch 'rh-develop' of http://10.132.11.31:3000/custom_nodes/ComfyUI_RH_DreamID-V into rh-develop 2026-01-09 10:16:13 +00:00
Your Name
5e9bf5de93 fix no face bug 2026-01-09 10:14:26 +00:00
wenjian
994a23c49b fix: Restore original LMKExtractor behavior to fix quality degradation
Root cause: We modified LMKExtractor to accept custom detection thresholds
(min_detection_confidence=0.3), but original code used MediaPipe defaults.

This change in thresholds caused different detection results, leading to
quality degradation especially with longer videos (241 frames vs 81 frames).

Fix:
- Restore original LMKExtractor with no custom parameters (uses MediaPipe defaults)
- Set use_insightface=False by default to use original detection behavior
- Keep hybrid detector available but not enabled by default
2026-01-09 08:05:19 +08:00
wenjian
5997ab68ff fix: Always use full image for MediaPipe to get correct landmarks
The hybrid detector was cropping face regions before MediaPipe detection,
then attempting to map coordinates back. However, only 2D landmarks (lmks)
were being transformed - lmks3d and trans_mat were not adjusted.

This caused incorrect pose/mask generation leading to face distortion.

Fix: Always run MediaPipe on the FULL image (like original code).
InsightFace is now only used to verify face presence when MediaPipe fails.
2026-01-09 07:51:44 +08:00
wenjian
8961969a4f fix: Remove video re-encoding to preserve original quality
The root cause of video quality degradation was re-encoding:
- prehandle_video was re-encoding the video using imageio.get_writer
- Video re-encoding causes quality loss, especially noticeable with more frames
- 241 frames showed worse degradation than 81 frames due to accumulated encoding artifacts

Fix:
- prehandle_video now only performs face detection, no video re-encoding
- Use original video directly as ref_video_path
- This matches the original project behavior
2026-01-09 07:09:21 +08:00
wenjian
50c5f84ca6 fix: Preserve all video frames with face interpolation instead of skipping
- Changed prehandle_video to keep all frames instead of filtering
- For frames without detected faces, use previous frame's result (interpolation)
- This ensures ref_video, mask, pose all have consistent frame counts
- Fixes video quality degradation issue when frame_num > actual detected faces
- Removed frame insertion logic that was breaking video temporal coherence
2026-01-09 07:05:40 +08:00
wenjian
61b180a4dd fix: Improve InsightFace face selection logic
- Filter out invalid bboxes (negative coords, out of bounds)
- Filter out too small faces (< 30px)
- Sort candidates by score * area for better selection
- Try top 3 candidates instead of just largest
- Fall back gracefully when MediaPipe fails on cropped face
2026-01-09 03:28:37 +08:00
wenjian
7ba6d3e7fc chore: Change default face_detection_threshold from 0.5 to 0.3 2026-01-09 03:18:33 +08:00
wenjian
f09fc0d274 refactor: Always use InsightFace hybrid detection by default
- Remove use_insightface parameter from node inputs
- Set use_insightface=True as default, no user toggle needed
- Simplify user experience with automatic best detection method
2026-01-09 03:16:09 +08:00
wenjian
075a853d00 fix: Use local InsightFace model from ComfyUI models path
- Auto-detect InsightFace models from {ComfyUI}/models/insightface
- Support offline usage without downloading models from GitHub
- Add model_name parameter (default: buffalo_l)
- Check multiple possible paths for model location
2026-01-09 03:10:06 +08:00
wenjian
322c124a7a feat: Add InsightFace + MediaPipe hybrid face detection mode
- Add HybridLMKExtractor that uses InsightFace for robust face detection
  and MediaPipe for detailed landmark extraction
- Add 'use_insightface' boolean parameter to Sampler nodes (default: false)
- InsightFace provides better detection on challenging videos with
  side profiles, motion blur, or occlusion
- Falls back to MediaPipe-only mode if InsightFace is not installed
- Add insightface and onnxruntime as optional dependencies in requirements.txt
2026-01-09 02:51:20 +08:00
wenjian
30ec1435ef fix: improve face detection robustness and add configurable threshold
- Fix FaceLandmarker return type inconsistency (return tuple instead of single object when no face detected)
- Add mesh3d None check in LMKExtractor to handle empty detections
- Add debug logging for face detection failures
- Store face_results in prehandle_video to avoid re-detection inconsistency
- Add face_detection_threshold parameter to Sampler nodes (default 0.5, range 0.1-1.0)
- Lower threshold allows more face detections on challenging videos
- Pass pre-computed face_results to generate_pose_and_mask_videos to ensure frame count consistency
2026-01-09 02:46:33 +08:00
Your Name
75205f4570 fix no face bug 2026-01-08 13:09:40 +00:00
wenjian
f8a8ccc479 feat: Add custom resolution option and VIDEO output
- Add 'custom' option to size selector with custom_width/custom_height inputs
- Add portrait resolution presets (480*832, 720*1280)
- Add VIDEO output type that creates video with audio from source
- Auto-detect and copy audio track from input video using ffmpeg
- Use VideoFromFile for ComfyUI native VIDEO object support
2026-01-08 04:01:47 +08:00
wenjian
a7b06c622f fix: defer CUDA device check to runtime for CPU-only system compatibility
Changed T5EncoderModel.__init__ default device parameter from
torch.cuda.current_device() to None, with runtime resolution.
This allows module import and node registration on systems without
NVIDIA GPU while maintaining full functionality when GPU is available.
2026-01-08 02:13:26 +08:00
wenjian
8e69ea01be Fix model download links to official sources 2026-01-08 01:37:06 +08:00
wenjian
960e617071 Initial release: DreamID-V ComfyUI plugin 2026-01-08 00:45:51 +08:00
Your Name
8e50b6d339 DreamID-V 2026-01-07 08:32:15 +00:00