File picker previously embedded base64 image data in the image_data widget, bloating workflow JSON past the 5MiB localStorage limit (Failed to save workflow draft). Now uploads via POST /upload/image with type=temp and stores a small '<path> [temp]' reference; backend resolves it with get_annotated_filepath. Base64 data URLs from older saves still load via backward-compat path.
Changed return format to:
{'ui': preview['ui'], 'result': (img_tensor,)}
This allows:
- Preview display through save_images()
- IMAGE output for downstream nodes
Now both preview AND output work correctly!
Changed return format from dict to simple tuple (img_tensor,)
OUTPUT_NODE = True should auto-display preview with IMAGE type.
Removed UI dict format that may have been preventing preview.
Changes:
- RETURN_TYPES changed to single IMAGE output only
- Removed separate width/height outputs
- Added UI text display with resolution info
- Returns dict with 'ui' and 'result' keys
- Shows mode, resolution, and filename in UI
This should fix preview display and provide better UX
with resolution info shown as text in the node.
Changes:
- Moved image_data from optional to required (no forceInput)
- image_data is now a multiline STRING widget (auto-filled by file picker)
- Removed alert() and console.log() messages
- Store base64 data in both node.properties and widget.value
This fixes the 'object supporting the buffer API required' error
by ensuring image_data widget exists and can be set by JavaScript.
Changes:
- folder_mode=True: Always use folder_path for random selection
- folder_mode=False: Always use file picker (image_data)
- Auto-switch: File picker automatically sets folder_mode=False
Behavior:
- User clicks 📁 Choose File → auto-switches to Single mode
- folder_mode toggle explicitly controls which input to use
- No more auto-detection ambiguity
- Clear separation between modes
Benefits:
- Predictable behavior based on folder_mode setting
- File picker prioritized by auto-switching to Single mode
- User can maintain folder_path while using file picker
- Cleaner error messages for each mode
Changes:
- Priority 1: If folder_path is valid → use folder random selection
- Priority 2: If image_data is available → use file picker image
- Works regardless of folder_mode setting
Benefits:
- folder_path can be maintained while using the node
- No need to manually toggle folder_mode
- Auto-detects best mode based on available input
- Better error messages explaining what's needed
This allows seamless workflow:
- Keep folder path in field
- Node automatically picks random from folder
- Can still use file picker if folder_path is empty
Breaking changes:
- Single mode: Now uses file picker with direct browser-based image reading
- Folder mode: Uses manual path input only
- Renamed 'image' parameter to 'folder_path' for clarity
- Added 'image_data' optional parameter for base64 image data
Implementation:
- JavaScript: FileReader API to read image as base64
- Python: Decode base64 and convert to tensor (no file system access needed)
- Better UX: No confusing error messages about missing paths
- Clear separation: File picker for single, text input for folder
Benefits:
- Single mode works without file system paths
- No browser security issues
- Cleaner user experience
- Explicit mode separation
Changes:
- Added tooltips to all input parameters explaining their purpose
- Enhanced alert dialog with detailed instructions and examples
- Shows current default path in the alert
- Better formatting for multi-line instructions
- Added dynamicPrompts: false to image input for better UX
Note: Browser security prevents automatic full path detection.
Users need to manually enter the complete file path after using the file picker.
Major changes:
- Changed input parameter from 'path' to 'image' for clarity
- Auto-extract folder path from file selection in folder mode
- Simplified JavaScript widget implementation
- Added OUTPUT_IS_LIST flag for proper output handling
- Improved file selection UI with emoji icons
- Added helpful info widget explaining the modes
Features:
- Single mode: Load selected file directly
- Folder mode: Extract folder from selected file, then pick random image
- Better user feedback with console logging
- More robust path handling (file or directory input)
Features:
- Added OUTPUT_NODE for real-time image preview
- Implemented Browse button with JavaScript widget
- Enhanced path input with placeholder and default value
- Updated README with new feature documentation
Changes:
- random_image_picker.py: Added OUTPUT_NODE, improved INPUT_TYPES
- web/random_image_picker.js: New custom widget for file/folder selection
- README.md: Updated documentation with new features
- .gitignore: Added web directory ignore patterns
- Single image and folder random selection modes
- Subfolder scanning support
- Resolution output (width/height)
- Seed control for reproducible random selection
- Support for PNG, JPEG, WebP, BMP, GIF formats