21 Commits
Author SHA1 Message Date
solidlime 0311225484 Add MIT license and ComfyUI Registry (CNR) publishing setup 2026-08-02 12:38:18 +09:00
solidlime af75d49ab8 Remove .serena dev memory folder from repo 2026-08-02 12:38:18 +09:00
solidlime 21bb26d72f feat: store temp image reference instead of base64 in workflow
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.
v0.1.0-rc.1
2026-08-02 09:02:02 +09:00
solidlime 581b5e8fec Docs: Update repository URL in README 2026-01-07 22:39:13 +09:00
solidlime dedfa1d56d Docs: Update README with complete feature documentation
Updated README to reflect current implementation:
- Clearer feature descriptions
- File picker usage instructions
- Auto mode switching explanation
- Instant preview feature
- Installation methods (manual + future Manager)
- Technical details section
- Troubleshooting guide
- Better examples and formatting

Ready for GitHub publication!
2026-01-07 22:36:44 +09:00
solidlime 3a2c2419c4 UI: Completely hide image_data and add instant preview
Changes:
1. Complete widget hiding:
   - Added .hidden = true
   - Added setTimeout for reliability
   - Added serializeValue to preserve data

2. Instant preview on file load:
   - Create Image object from base64
   - Set node.imgs for preview display
   - Call setSizeForImage() and setDirtyCanvas()
   - Preview shows immediately without execution

Now has clean UI and instant visual feedback!
2026-01-07 22:06:30 +09:00
solidlime 7e05de431b UI: Hide image_data widget for cleaner appearance
Added JavaScript to hide the image_data widget:
- Set type to 'converted-widget'
- Set computeSize to [0, -4] to hide it

The widget still functions (auto-filled by file picker)
but is no longer visible in the UI for cleaner look.
2026-01-07 22:02:43 +09:00
solidlime 3db299a60a Fix: Return both preview and IMAGE tensor
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!
2026-01-07 22:00:38 +09:00
solidlime 6c6dcd5647 Fix: Add __init__ for SaveImage compatibility
Added __init__ method to properly initialize SaveImage parent class.
This should enable preview display through save_images() method.

Settings:
- output_dir: temp directory
- type: temp
- prefix_append: random temp prefix
- compress_level: 4
2026-01-07 21:53:40 +09:00
solidlime 073b1c159b Simplify: Return plain tuple instead of dict for preview
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.
2026-01-07 21:50:14 +09:00
solidlime 2ab824eda1 Fix: Remove duplicate class attributes causing syntax error 2026-01-07 21:46:30 +09:00
solidlime 4844866ce4 Fix: Simplify output and add UI text display
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.
2026-01-07 21:42:37 +09:00
solidlime 12cd33bbc8 Fix: Make image_data a visible widget and remove alert messages
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.
2026-01-07 21:37:33 +09:00
solidlime b5f185447d Refactor: Strict folder_mode-based logic with auto-switch
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
2026-01-07 21:31:15 +09:00
solidlime 4a13a9f827 Fix: Auto-detect mode based on input priority
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
2026-01-07 21:26:21 +09:00
solidlime bd275c4941 Major redesign: Direct file reading for single mode
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
2026-01-07 21:21:19 +09:00
solidlime f453a4fe47 Improve user guidance for file path input
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.
2026-01-07 21:12:14 +09:00
solidlime f7284990ed Fix: Add WEB_DIRECTORY and simplify JavaScript widget
Critical fixes:
- Added WEB_DIRECTORY = './web' to __init__.py (REQUIRED for ComfyUI to load JS)
- Simplified JavaScript implementation based on working custom nodes
- Removed unnecessary imports (ComfyWidgets)
- Cleaner button implementation that actually registers

This should now properly load the JavaScript widget when ComfyUI starts.
2026-01-07 21:04:57 +09:00
solidlime aef43bd2f8 Refactor: Simplify file picker and auto-extract folder path
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)
2026-01-07 20:59:15 +09:00
solidlime a990101377 Add preview and file browser features
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
2026-01-07 20:49:47 +09:00
solidlime 1f3bfe02ef Initial implementation of Random Image Picker node
- 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
2026-01-07 20:09:11 +09:00