Commit Graph
37 Commits
Author SHA1 Message Date
MariusKM 0e63c43ebb added Wan Video Outpaint Frame Calc Node + some Ultils 2025-11-12 23:41:32 +01:00
MariusKM 696ff93aa0 Fix masking to use binary masks instead of gradients for WAN compatibility
CRITICAL FIX: WAN models require binary masks (0.0 or 1.0), not gradient masks

- Replace gradient mask logic with binary masks throughout
- mask=0.0: Use provided keyframe image (inpainting guidance)
- mask=1.0: Generate freely (no guidance)
- Context window pyramid fusion handles smooth blending automatically
- Gradient masks were causing ghosting, blurriness, and artifacts

Technical details:
- Start keyframe: mask=0.0 for first frame_blend_width frames
- Middle keyframe: mask=0.0 for frame_blend_width region centered at middle_frame_position
- End keyframe: mask=0.0 for last frame_blend_width frames
- All other regions: mask=1.0 (fully generated)
- Context windows with pyramid fusion create smooth transitions at overlaps

Fixes tensor dimension error and improves visual quality
Bump version to 1.2.1
2025-10-14 17:39:07 +02:00
MariusKM 1222f3f122 Implement gradient mask blending for smooth keyframe transitions
- Replace hard mask edges with smooth gradient transitions
- Start frame: mask gradient from 0.0 (preserve) to 1.0 (generate)
- Middle frame: V-shaped mask (1.0 → 0.0 at center → 1.0)
- End frame: mask gradient from 1.0 (generate) to 0.0 (preserve)
- This creates natural blending between keyframes and generated content
- Prevents hard cuts and improves visual coherence
- Example: with frame_blend_width=22
  - Frame 0: 100% keyframe preserved
  - Frame 11: 50/50 blend of keyframe and generation
  - Frame 21: 100% AI generated content
2025-10-14 16:04:14 +02:00
MariusKM 02c8214e73 Fix keyframe repetition to properly use frame_blend_width parameter
- Keyframes are now repeated across the entire blend_width region
- Previously only unmasked as many frames as provided in input images
- Now single-frame keyframes are extended to fill the blend region
- Start frame: repeated from frame 0 to frame_blend_width
- Middle frame: repeated across frame_blend_width region centered at middle_frame_position
- End frame: repeated across last frame_blend_width frames
- This provides much stronger anchoring and reduces blurry inpainted regions
- Fixes issue where most of video was masked with single-frame keyframes
2025-10-14 16:01:00 +02:00
MariusKM f53a3c0c7c Fix critical masking bug causing gray frames in middle of video
- Fix middle frame mask to only unmask regions with actual image data
- Fix end frame mask to match actual copied frame length
- Previously was unmasking much larger regions filled with gray (0.5)
- This was causing the model to preserve gray as 'real' data instead of inpainting
- Now only unmasks middle_img_len and end_img_len frames with +3 buffer for latent encoding
- Resolves issue where middle section of generated video turns gray
2025-10-14 15:12:13 +02:00
MariusKM 2f1fd56f5a Add WAN Three Frame To Video node with context window support
- Implement WanThreeFrameToVideo node for generating videos from 3 keyframes (start, middle, end)
- Add adjustable middle frame positioning (0.0-1.0 for flexible timing)
- Add configurable frame blend width for smooth keyframe transitions
- Support CLIP vision output concatenation for enhanced conditioning
- Include monkey patch to fix context window bug in ComfyUI for WAN models
  - Fixes tensor subsetting in model_conds dictionary (concat_latent_image, concat_mask)
  - Enables proper context window support for all WAN nodes
- Integrate node into existing custom node pack structure
- Update README and pyproject.toml with new node documentation
- Bump version to 1.2.0
2025-10-14 14:30:37 +02:00
MariusKM b568bc710f updated pyproject.toml 2025-10-14 13:37:16 +02:00
MariusKM 7f99e1fdb0 fixed import error in BadmanWanNodes.py 2025-10-14 13:36:47 +02:00
MariusKM 88ebfb4322 updated pyproject.toml 2025-10-14 13:28:30 +02:00
MariusKM 9fcb00830f Add WAN Three Frame To Video nodeImplement video generation from 3 keyframes with adjustable positioning,configurable blend width, and CLIP vision support. Includes proper maskingfor smooth transitions between start, middle, and end frames. 2025-10-14 13:19:20 +02:00
MariusKM 03a7d68ee8 Fix SyntaxWarning: escape invalid escape sequences in BadmanStrings.py
Fixed invalid escape sequences in path strings by properly escaping backslashes.
Changed single backslashes to double backslashes in:
- imagesOutPath
- videoOutPath
- imagesUpresOutPath
- videoUpresOutPath

This resolves Python SyntaxWarnings about invalid escape sequences \I and \V.
2025-10-13 22:30:50 +02:00
MariusKM 63bac7d562 added InjectLatentNoiseMasked to BadmanLatentNoiseMask.py 2025-10-13 22:23:57 +02:00
MariusKM dcfdeb109f added new Color transfer with histogram matching 2024-12-30 16:36:03 +01:00
MariusKM cfd59e3e5d added new image and mask functions 2024-11-06 19:01:50 +01:00
MariusKM 2425585f7f fixed file path in wildcardprocessor 2024-11-06 14:56:13 +01:00
MariusKM db07dfaa13 addec category to wildcard processor 2024-11-06 14:41:44 +01:00
MariusKM d300360ff0 fixed class error 2024-11-06 14:39:55 +01:00
MariusKM 9fe4fc38f7 added wildcard processor & updated requirements.txt 2024-11-06 14:34:48 +01:00
MariusKM f60cddf286 fixed display error on LAB Transfer node 2024-11-06 11:08:47 +01:00
MariusKM 1e02a8d730 updated requirements.txt 2024-11-05 17:20:26 +01:00
MariusKM a9ed09d28b updated requirements.txt 2024-11-05 17:11:12 +01:00
MariusKM 0101efd1e1 corrected brightness error 2024-11-05 17:09:54 +01:00
MariusKM 71b3c5a91b added Brightness to image utils 2024-11-05 17:03:12 +01:00
MariusKM 2d3fec33ae added requirements .txt 2024-11-05 16:56:12 +01:00
MariusKM 443ad33a20 updated init.py 2024-11-05 16:46:45 +01:00
MariusKM e7fc2a4b7d added Color Transfer + image utils 2024-11-05 16:34:19 +01:00
MariusKM d080e7e214 retriggering publish action 2024-06-21 17:20:20 +02:00
MariusKM 1eecd920e2 upadted pyproject.toml + minor String update 2024-06-21 16:47:47 +02:00
32bit_badman 6cd08c23f8 Merge pull request #2 from ComfyNodePRs/publish
Add Github Action for Publishing to Comfy Registry
2024-06-21 10:23:00 +02:00
32bit_badman 1503107822 Merge pull request #1 from ComfyNodePRs/pyproject
Add pyproject.toml for Custom Node Registry
2024-06-21 10:17:48 +02:00
32bit_badman 11c8697fc5 Update README.md 2024-06-21 10:16:49 +02:00
MariusKM 334bd4b5f9 Removed __pycache__ 2024-06-21 10:14:43 +02:00
MariusKM 8f96b916af added Readme + some updates 2024-06-21 10:13:26 +02:00
snomiao 27d0214ea5 chore(publish): Add Github Action for Publishing to Comfy Registry 2024-06-14 12:01:20 +00:00
snomiao d53e648a3d chore(pyproject): Add pyproject.toml for Custom Node Registry 2024-06-14 12:01:20 +00:00
MariusKM d3ed002cf1 Initial commit 2024-05-31 12:15:30 +02:00
32bit_badman b970a9a8eb Initial commit 2024-05-31 12:11:23 +02:00