4 Commits
Author SHA1 Message Date
jason.mei 4092be6a0a refactor(preview_video): simplify video saving and reorder download logic
- Add requests import for direct HTTP video downloads
- Replace complex video object data extraction with direct URL download using requests.get()
- Move file saving logic before download_url_to_video_output call to avoid consuming data stream
- Simplify video data retrieval by downloading directly from URL instead of extracting from video object
- Add timeout parameter (120s) and error handling for HTTP requests
- Improve code clarity by removing conditional checks for different video object attributes
2025-12-30 11:02:47 +08:00
jason.mei 1f493b180e refactor(preview_video): remove unused API client imports
- Remove unused ApiEndpoint, HttpMethod, and SynchronousOperation imports
- Simplify module dependencies by eliminating unnecessary API client references
- Maintain existing functionality with cleaner import structure
2025-12-30 10:49:51 +08:00
jason.mei fafef977a1 refactor(preview_video): migrate to async API and use comfy video types
- Replace requests library with comfy_api_nodes download utility for better integration
- Convert run method to async for non-blocking video download operations
- Update input/output types to use IO enum (IO.STRING, IO.BOOLEAN, IO.VIDEO)
- Change return type from STRING file path to VIDEO object for direct video output
- Simplify video handling by using download_url_to_video_output utility function
- Add support for multiple video data access patterns (video_io, get_bytes, BytesIO)
- Improve video saving logic with proper data extraction from video object
- Remove unused os.path and re imports optimization for cleaner code
- Maintains backward compatibility with save_output parameter for optional file persistence
2025-12-30 10:47:38 +08:00
jason.mei 8715c032ae feat(vidu,wan_ai): refactor video generation to return URLs and add preview node
- Add new ModelversePreviewVideo node for downloading and previewing generated videos
- Change all Vidu video generation nodes (extend, i2v, ref2v, startend2v, t2v) to return video URL and task ID instead of downloaded video objects
- Change all Wan AI video generation nodes (i2v, t2v) to return video URL and task ID instead of downloaded video objects
- Remove duplicate VideoFromFile import fallback logic from all video generation modules
- Simplify video handling by delegating download responsibility to preview node
- Improve separation of concerns between generation and preview workflows
2025-12-30 10:29:46 +08:00