39 Commits
Author SHA1 Message Date
bowtiedbluefin e0eeff8552 Temporarily disable video UI display to test freezing issue
- Removed UI video display return to isolate the freezing cause
- Node now just returns filepath without attempting UI video display
2025-11-09 21:12:53 -05:00
bowtiedbluefin 0ee3b24ff8 Fix Video Preview node to prevent UI freezing
- Replace file copying with symlinks for large video files
- Change video format from 'video/h264-mp4' to 'video/mp4'
- Avoid copying large files that cause UI to freeze during video generation
2025-11-09 13:05:46 -05:00
bowtiedbluefin 9f4bcb862b Remove ShowText node and fix Preview Video node
- Delete ShowTextNode class and mappings from utility_nodes.py (was causing issues)
- Update VideoPreviewNode to accept filepath input instead of video_url
- Node now works with saved video files from Save Video node
- Properly handles videos in output directory or copies them for preview
- Maintains ComfyUI video display format for UI integration
2025-11-09 12:59:17 -05:00
bowtiedbluefin 4f78444fab Fix extension loading with direct imports
- Replace importlib approach with direct relative imports
- Should fix extension loading issues in ComfyUI
- Simplify ShowTextNode to return just tuple (no UI dict)
2025-11-09 12:41:48 -05:00
bowtiedbluefin 8456b4ec0b Fix UI freeze by correcting node return formats
- ShowTextNode: Changed from OUTPUT_NODE to regular node returning UI dict format
- VideoPreviewNode: Fixed error returns to proper tuple format instead of malformed dicts
- Should prevent UI freezing on error conditions
2025-11-09 12:36:26 -05:00
bowtiedbluefin ad96418dc3 Fix UI freeze on empty/error inputs
- ShowTextNode now handles empty strings gracefully, displays '(empty)' instead of blank
- VideoPreviewNode returns proper result format on error/empty URL
- Prevents UI freezing when workflows encounter errors
2025-11-09 12:32:28 -05:00
bowtiedbluefin cdbca11efa Fix UI display issues and improve node functionality
- Fix ShowTextNode to properly display text in ComfyUI UI
- Fix VideoPreviewNode to prevent UI crashes and use correct video format
- Fix import errors in __init__.py
- Update README with actual GitHub repository URL
- Add proper error handling and UI return formats
2025-11-09 12:27:04 -05:00
bowtiedbluefin d383864baa Fix Save Video error handling too 2025-11-09 12:15:21 -05:00
bowtiedbluefin 504d1670a7 Fix error handling to prevent UI freezing
- Video generation now returns empty string for URL on error (not error message)
- Preview Video checks if URL is valid HTTP/HTTPS before downloading
- Save Video checks if URL is valid HTTP/HTTPS before downloading
- Both nodes return gracefully instead of trying to download error messages
- All error messages print to console but don't break workflow

This fixes the freezing when errors occur in the workflow.
2025-11-09 12:15:11 -05:00
bowtiedbluefin 12eb600301 Remove ALL ui returns to fix browser freezing
- Removed all ui text returns from video nodes
- Removed ui text return from show text node
- All status messages now only print to console
- This should completely fix the freezing issue

All nodes now use simple tuple returns without ui data.
2025-11-09 12:08:48 -05:00
bowtiedbluefin d0061c5104 Remove JavaScript extension that was freezing ComfyUI
- Removed web/showtext.js that was causing browser freeze
- Simplified ShowTextNode back to basic implementation
- Removed WEB_DIRECTORY from __init__.py
- Text will display in terminal but UI won't freeze

The complex JS widget was causing infinite loops. Using simpler approach.
2025-11-09 12:04:33 -05:00
bowtiedbluefin c5c1d0e7c9 Fix Show Text node with proper ComfyUI implementation
- Copied exact implementation from fairy-root/ComfyUI-Show-Text
- Added INPUT_IS_LIST and OUTPUT_IS_LIST flags
- Added hidden parameters for unique_id and extra_pnginfo
- Created JavaScript extension in web/showtext.js to display text widgets
- Added WEB_DIRECTORY to __init__.py for JS loading
- Fixed all video node status displays to use correct format

The Show Text node now works exactly like fairy-root's implementation.
2025-11-09 03:11:02 -05:00
bowtiedbluefin fc9501ba6f Fix UI display for text and video nodes
- Fix ShowTextNode to properly display text in ComfyUI UI (tuple instead of list)
- Fix VideoPreviewNode to show videos inline with proper format and metadata
- Add status updates display in VideoGenerationNode during polling
- Add status display in VideoRetrieveNode with emoji indicators
- All OUTPUT_NODEs now properly return ui data for browser display

Resolves issues where text and video previews weren't showing in the UI
2025-11-09 02:44:55 -05:00
bowtiedbluefin c959dc01d3 Simplify: Remove mode selector and backwards compatibility
SIMPLIFIED CHANGES:
1. Removed backwards compatibility aliases (no more duplicates!)
2. Removed file upload mode (too complex, doesn't work properly)
3. Back to simple URL-only nodes

Load Image (AI CustomURL):
- Just URL input (simple and works!)
- For file uploads: Use ComfyUI's built-in 'Load Image' node

Load Video (AI CustomURL):
- Just URL input (simple and works!)
- For file uploads: Use ComfyUI's built-in video nodes

Show Text (AI CustomURL):
- Displays text in UI (via ui dict)
- Also outputs text for chaining (optional)
- Connect any STRING output to see it displayed!

RATIONALE:
- File upload widget requires complex JavaScript integration
- ComfyUI already has excellent file upload nodes
- Our nodes focus on URL loading (API-generated content)
- Simpler = better UX

After restart, you'll see:
- ONE Load Image node (not two!)
- ONE Load Video node
- Clean, simple, working nodes
2025-11-09 02:27:04 -05:00
bowtiedbluefin 8e948f649d Create unified Load Image/Video nodes with mode selector
FIXED: Single unified nodes instead of multiple confusing ones

Load Image (AI CustomURL):
- Mode dropdown: 'url' or 'file'
- URL mode: Enter URL in 'url' field
- File mode: Enter filename in 'upload' field (or use upload button)
- Automatically detects which mode to use

Load Video (AI CustomURL):
- Same mode selector: 'url' or 'file'
- URL mode: Downloads from URL
- File mode: Loads from ComfyUI input folder
- Converts video to image frames

Benefits:
- ONE node for each type (Image/Video)
- Clear mode selector at the top
- No naming conflicts with built-in nodes
- Backwards compatible with old workflows
- File upload support built-in

Usage:
1. Add node
2. Select mode (url or file)
3. Enter URL or upload file
4. Done!

Note: You MUST restart ComfyUI to see the updated nodes!
2025-11-09 02:10:40 -05:00
bowtiedbluefin eacd1bbac4 Fix node naming conflicts and improve status display
ISSUE #1: Node Naming Conflict
- Renamed to 'Load Image from URL (AI CustomURL)' to avoid conflict with ComfyUI's built-in 'Load Image'
- Same for Video Loader
- Now clearly distinguishable in node list

ISSUE #2: Show Text Node Not Displaying
- Fixed Show Text to properly display UI output
- Added pass-through output so it can chain
- Shows text in node and console
- Use this to display: video_id, status, text generation results, etc.

ISSUE #3: No Live Status Updates
- ComfyUI doesn't support streaming updates within single execution
- Console WILL show updates every 5 seconds as polling happens
- Added 'status' output to Generate Video node
- Possible values: 'completed', 'processing', 'timeout', 'failed', 'error'
- Connect 'status' to Show Text node to see final status in UI

ISSUE #4: Video Preview
- Preview shows text info with file path
- Video preview widget requires custom JavaScript (not implemented)
- Video IS downloaded and can be opened from temp path shown
- Use Save Video node for permanent storage

CLARIFICATION:
- For file uploads, use ComfyUI's built-in Load Image node (has upload button)
- Our nodes are specifically for URL loading (API-generated content)
2025-11-09 01:56:41 -05:00
bowtiedbluefin 738c829646 Fix node compatibility and add Show Text node
FIXES:
- Added backwards compatibility for old node names (ImageURLLoader, VideoURLLoader)
- Old workflows will continue to work without errors
- Simplified Load Image/Video nodes back to URL-only (cleaner, no mode confusion)
- Users can use ComfyUI's built-in LoadImage/LoadVideo nodes for file uploads

NEW FEATURE:
- Show Text node - simple text display node
- forceInput=true means it only shows when connected to an output
- Perfect for displaying generation results, status messages, etc.

SIMPLIFIED:
- Load Image: Just URL input (removed confusing mode selector)
- Load Video: Just URL input (removed confusing mode selector)
- For file uploads, use ComfyUI's native nodes (better integration)

This resolves the 'Frontend only node' error and makes the package simpler to use.
2025-11-09 01:43:40 -05:00
bowtiedbluefin 3109977943 Major UX improvements based on user feedback
ISSUE #1 & #2: Preview Video Duplicate Files
- Preview now saves to temp directory instead of output folder
- No more duplicate videos in output/videos
- Shows text info instead of trying to embed video (ComfyUI limitation)

ISSUE #3: Text Generation Simplified
- Moved system_prompt to optional section
- Now only shows 1 main prompt box by default
- system_prompt defaults to 'You are a helpful assistant'
- Advanced users can still customize system prompt if needed

ISSUE #4: Load Image Node Enhanced
- Renamed from 'Load Image from URL' to 'Load Image'
- Added mode selector: 'url' or 'file'
- File mode shows 'Choose file' button for uploads
- Works with ComfyUI's input folder system

ISSUE #5: Load Video Node Enhanced
- Renamed from 'Load Video from URL' to 'Load Video'
- Added mode selector: 'url' or 'file'
- File mode shows 'Choose file' button for uploads
- Properly handles cleanup (only deletes temp files for URLs)

All nodes now more intuitive and user-friendly!
2025-11-09 01:37:51 -05:00
bowtiedbluefin b1c1cfcbe6 Fix video preview to display in ComfyUI UI
Changed Preview Video node to use ComfyUI's proper output format:
- Save videos to ComfyUI's output/videos directory
- Use folder_paths module to find correct output location
- Return proper format: {filename, subfolder, type}
- Generate unique filenames from URL hash to avoid conflicts
- Videos now properly display in ComfyUI interface

The preview node now:
- Downloads video with authentication
- Saves to output/videos/preview_{hash}.mp4
- Returns format ComfyUI understands for UI display
- Shows video player in ComfyUI interface
2025-11-09 01:25:18 -05:00
bowtiedbluefin 868b3e5251 Fix OpenAI video download and add preview node
CRITICAL FIX: OpenAI doesn't return video URLs in status response
- Video must be downloaded from /videos/{id}/content endpoint
- Generate Video node now constructs correct download URL
- Added api_key output to pass authentication to download nodes

NEW FEATURES:
1. Video Preview Node
   - Display videos directly in ComfyUI interface
   - Supports authenticated downloads (OpenAI)
   - Downloads to temp and shows in UI

2. Enhanced Save Video Node
   - Added optional api_key input for authenticated downloads
   - Automatically adds Authorization header for OpenAI URLs
   - No manual API key copying needed!

WORKFLOW:
Generate Video → video_url + api_key → Preview Video (UI preview)
                                     → Save Video (disk save)

All connections work automatically - just wire up the nodes!

Updated QUICKSTART with complete workflow diagram and examples.
2025-11-09 01:11:21 -05:00
bowtiedbluefin f6fbcf1840 Update polling defaults: 5s interval, 20min max wait time
Changed defaults to user's preferences:
- poll_interval: 10s → 5s (faster checking)
- max_wait_time: 600s (10min) → 1200s (20min)
- max_wait_time limit: 3600s → 7200s (allow up to 2 hours if needed)
- poll_interval can now be set as low as 1s

Updated QUICKSTART documentation to reflect new defaults.
2025-11-09 00:57:10 -05:00
bowtiedbluefin 0534e0c454 Add automatic polling and direct video_id output for seamless workflow
This update enables the exact workflow the user requested:
1. Generate video → automatically polls until complete
2. Output video_id for manual retrieval if needed
3. Direct connection: Generate → Save Video (no manual copying!)

New Features:
- Auto-polling enabled by default (configurable)
- poll_interval: Check every X seconds (default 10s)
- max_wait_time: Give up after X seconds (default 600s = 10 min)
- New output: video_id (in addition to video_url and response_json)
- Console shows real-time progress updates
- Handles both async (OpenAI) and sync (other) APIs
- Graceful timeout handling with helpful messages

Benefits:
- No more manual video ID copying
- No more manual status checking
- Just connect nodes: Generate → Save/Preview
- Workflow runs end-to-end automatically

Updated QUICKSTART with clear examples and workflow diagrams.
2025-11-09 00:50:21 -05:00
bowtiedbluefin 52eb27a231 Add async video workflow support and video retrieval node
OpenAI's video API is asynchronous - videos don't generate instantly.

New features:
- Enhanced logging to show full API response with video ID and status
- Created 'Retrieve Video Status' node to check/poll video generation
- Handles both sync and async video generation APIs
- Detects video ID, status (processing/completed), and extracts URLs
- Auto-extracts video ID from 'processing:' messages

Workflow:
1. Generate Video → returns video ID with 'processing' status
2. Use Retrieve Video Status node to poll until 'completed'
3. Get video URL from completed response
4. Download with Save Video node

Updated QUICKSTART with async workflow explanation and console debugging tips.
2025-11-09 00:37:01 -05:00
bowtiedbluefin 6ac4b3b486 Fix: Use OpenAI's exact supported video sizes
OpenAI's video API only supports 4 specific sizes:
- '1280x720' (landscape 16:9)
- '720x1280' (portrait 9:16)
- '1792x1024' (wide landscape)
- '1024x1792' (tall portrait)

Changes:
- Updated size_mapping to use OpenAI's exact supported sizes
- Map user selections to closest supported size
- Added info logging to show size conversions
- Keep original size mapping for non-OpenAI APIs
- Updated documentation with actual supported sizes

This fixes the 'invalid_value' error for the size parameter.
2025-11-08 02:41:53 -05:00
bowtiedbluefin a6a1cb5050 Fix: OpenAI video API requires seconds as string from allowed values
OpenAI's video API is very specific about the 'seconds' parameter:
- Must be a STRING (not integer)
- Must be one of: "4", "8", or "12"

Changes:
- Convert duration to nearest valid value (4, 8, or 12 seconds)
- Send as string to match OpenAI's requirements
- Added info message when duration is auto-converted
- Updated default model to 'sora-2'
- Updated default duration to 4 (valid value)
- Updated documentation with OpenAI's duration constraints
- Keep flexible duration for non-OpenAI APIs

This fixes the 'invalid_type' error for the seconds parameter.
2025-11-08 02:38:25 -05:00
bowtiedbluefin 5986b4598d Fix: OpenAI video API expects JSON, not multipart/form-data
The error 'failed to parse JSON value' revealed that despite curl examples
using -F flags, OpenAI's video API actually expects JSON POST requests.

- Changed back to JSON format using _request() method
- Simplified code by removing multipart/form-data handling
- Kept debug logging for troubleshooting
- Updated documentation to remove multipart/form-data mention

This should resolve the 400 Bad Request error.
2025-11-08 02:34:08 -05:00
bowtiedbluefin 8e996fab73 Add debug logging and improve error handling for video generation
- Added detailed debug output showing URL, model, prompt, and parameters
- Improved error handling to show full API response in error messages
- Fixed form data handling to preserve integer types properly
- Added empty string check before adding parameters

This will help diagnose the 400 Bad Request error
2025-11-08 02:23:18 -05:00
bowtiedbluefin 88fb7142c4 Fix OpenAI video API to use correct endpoint and multipart/form-data
BREAKING FIX: Corrected to match official OpenAI API documentation
- Changed endpoint to /v1/videos (was incorrectly /v1/videos/generations)
- Changed from JSON POST to multipart/form-data POST (OpenAI requirement)
- Fixed image-to-video parameter: 'image' (was incorrectly 'input_reference')
- Updated API client to use requests 'files' parameter for form fields
- Removed incorrect Content-Type header to allow proper boundary setting

Reference: https://platform.openai.com/docs/api-reference/videos/create
2025-11-08 02:12:21 -05:00
bowtiedbluefin 0708554221 Fix OpenAI video API endpoint and parameter format
- Changed endpoint from /videos/create to /videos/generations (correct OpenAI endpoint)
- Changed 'seconds' parameter from string '5s' to integer 5 (as per OpenAI spec)
- Updated documentation to reflect correct parameter types
2025-11-08 02:03:18 -05:00
bowtiedbluefin 9dd2d82195 Fix OpenAI video API compatibility and add video save node
- Fixed video generation parameters to match OpenAI's API format
  - Convert resolution + aspect_ratio to 'size' parameter (e.g., '1920x1080')
  - Convert duration to 'seconds' string format (e.g., '5s')
  - Filter out fps parameter for OpenAI (not supported)
  - Use 'input_reference' instead of 'image_url' for image-to-video
- Added SaveVideoNode to download and save videos locally
  - Supports timestamp placeholders in filenames
  - Auto-creates output directories
  - Shows file size after download
- Updated QUICKSTART guide with video generation examples
- Updated API client documentation with correct parameter formats
2025-11-08 01:55:01 -05:00
bowtiedbluefin dac442b6d9 Add QUICKSTART guide and update README for simplified approach 2025-11-08 01:05:37 -05:00
bowtiedbluefin a099dbfa84 Update README to reflect simplified model selection 2025-11-08 01:03:13 -05:00
bowtiedbluefin e441927ca9 Remove all automatic model discovery features
- Deleted js/ directory (no JavaScript needed)
- Deleted utils/model_manager.py (no model caching)
- Deleted data/ directory (no cache storage)
- Removed WEB_DIRECTORY from __init__.py
- Simplified main.py (removed all server routes)
- Users manually enter model names as STRING fields
- Cleaner, simpler implementation
2025-11-08 01:02:08 -05:00
bowtiedbluefin a47f9977bb Fix category names to match Venice API format
- Changed all categories from 'AI CustomURL/Text' to 'ai_customurl'
- Removes slashes and spaces that may prevent nodes from appearing
- Matches Venice API's simple category pattern (venice.ai)
- All 10 nodes now use the same category for easier discovery
2025-11-08 00:48:55 -05:00
bowtiedbluefin 5ae0ce3ba9 Add debugging to __init__.py to diagnose node loading issues 2025-11-08 00:34:20 -05:00
bowtiedbluefin eff7b715a2 Convert all nodes to traditional ComfyUI format for compatibility
- Converted all 10 nodes from comfy_api.latest to traditional INPUT_TYPES format
- Removed dependency on modern ComfyUI API
- Now compatible with ComfyUI v0.3.68 and similar versions
- Matches Venice API node structure for proven compatibility
- Updated __init__.py to properly import all node mappings
- All nodes now use instance methods instead of classmethods
- Returns tuples instead of io.NodeOutput objects

This ensures the nodes will appear in ComfyUI's Add Node menu.
2025-11-08 00:25:06 -05:00
bowtiedbluefin b49a10e4aa Fix all imports to use relative imports to avoid conflicts with ComfyUI core 2025-11-08 00:08:51 -05:00
bowtiedbluefin bfcaa3358b Add __init__.py for backward compatibility with older ComfyUI versions 2025-11-08 00:04:02 -05:00
bowtiedbluefin fdb6595ccd Initial commit: ComfyUI AI CustomURL Extension
- Full OpenAI-compatible API integration for ComfyUI
- Support for Text, Image, Video, and Speech generation
- Works with OpenAI, Venice.ai, OpenRouter, Together.ai, Ollama, and any OpenAI-compatible API
- Modern comfy_api.latest node format
- 10 nodes: 4 basic + 4 advanced + 2 utility
- Complete documentation and examples
- Model discovery and caching system
- Server routes for API management
2025-11-07 23:55:04 -05:00