Commit Graph
52 Commits
Author SHA1 Message Date
Vito Sansevero d1a5282ca0 style: fix Black formatting issues
Remove extra blank line in local_image_loader/node.py and wrap long
tuple assertion in test_empty_latent_batch.py.
2026-02-09 16:26:08 -08:00
Vito Sansevero 8773c8f249 feat(latent): add batch_size as 4th output from EmptyLatentBatchNode
Exposes batch_size as an output so downstream nodes can reference it
directly without needing a separate input.
2026-02-09 16:22:03 -08:00
Vito Sansevero 0a1cbe4990 fix(seeds): reduce seed range from 64-bit to 32-bit across all nodes
JS Math.random() only has 53 bits of integer precision, making the
64-bit range produce non-uniform values. 32-bit (0xFFFFFFFF) is the
standard ComfyUI seed range and works correctly in both Python and JS.

Also removes the redundant mode input from SeedHistoryNode, relying on
ComfyUI's built-in control_after_generate widget instead.
2026-02-09 16:21:56 -08:00
Vito Sansevero 20270d9501 test: Add unit tests for KikoWorkflowTimerNode 2025-12-21 06:45:35 -08:00
Vito Sansevero b527635254 test: update return types in test_assertion 2025-12-17 07:02:08 -08:00
Vito Sansevero 6368582e1b feat: Add WidthHeightToVec2Node with tests 2025-12-17 06:59:11 -08:00
Vito Sansevero 5b57d4fc35 test: Add tests for image counter functionality 2025-10-07 07:21:09 -07:00
Vito Sansevero 0a6ee72748 fix: replace LatentBatch import with local implementation for V3 schema compatibility
Refs #43

ComfyUI is converting nodes_latent.py to V3 Schema on October 8th, which will
break direct imports of LatentBatch. This commit replaces the import with a
local implementation copied directly from ComfyUI source code.

Changes:
- Removed: from comfy_extras.nodes_latent import LatentBatch
- Added: Local batch_latents() and reshape_latent_to() functions
- Updated: latentbatch.batch() calls to use batch_latents()
- Added: torch and comfy.utils imports for tensor operations
- Added: Comprehensive unit tests for latent batching functionality

The local implementation is functionally identical to the original and ensures
the node will continue working after the V3 schema migration.

Test Coverage:
- 5 new tests in TestLatentBatchingFunctions class
- All 16 tests passing (11 existing + 5 new)
- Tests cover tensor operations, batch indexing, and reshape logic
2025-10-05 06:08:21 -07:00
Vito Sansevero 27431b3a92 test(model_downloader): add unit tests for model downloader 2025-10-05 05:39:00 -07:00
Vito Sansevero 67ef0a44d7 test(text_input): add unit tests for TextInputNode 2025-10-05 05:38:47 -07:00
Vito Sansevero 4e84588a94 style(tests): improve code formatting consistency 2025-09-23 07:39:27 -07:00
Vito Sansevero 8fd92530ee test: Add tests for embedding autocomplete features 2025-09-23 07:23:41 -07:00
Vito Sansevero 5ae7985bc2 test(batch_prompts): add unit tests for batch prompts 2025-08-27 09:32:09 -07:00
Vito Sansevero d2b30f0a78 feat: Add auto-batching support for large LoRA collections
- Add auto-batching functionality to split large LoRA collections into manageable chunks
- Implement batch_size parameter to control number of LoRAs per batch (default: 25)
- Add batch_index parameter to select which batch to process
- Include batch tracking metadata in LORA_PARAMS for visualization
- Display batch info in plot parameters when available
- Update lora_list output to show batch header when auto-batching is enabled
- Add comprehensive tests for batching functionality
- Update documentation with detailed auto-batching usage instructions

This feature prevents UI disconnection issues when processing large numbers of LoRAs
by allowing users to process them in smaller batches sequentially.
2025-08-16 17:27:59 -07:00
Vito Sansevero db7d0dc86e test: Add line break and spacing adjustments 2025-08-13 07:04:55 -07:00
Vito Sansevero b5e24dbe57 test: Update test categories with emoji prefix 2025-08-13 07:01:21 -07:00
Vito Sansevero eb1e646453 test: Update CATEGORY assertion emoji in test 2025-08-13 07:01:07 -07:00
Vito Sansevero 624ba92723 feat: add Kiko Purge VRAM node for intelligent memory management
- Add comprehensive VRAM management tool with 4 purge modes (soft, aggressive, models_only, cache_only)
- Implement smart memory threshold triggering to avoid unnecessary purges
- Add detailed memory reporting showing before/after stats and freed MB
- Support passthrough design for seamless workflow integration
- Include graceful CPU fallback for non-CUDA environments
- Add comprehensive test suite with 14 tests covering all functionality
- Update documentation with detailed usage examples and parameters
- Create reusable AnyType class for wildcard input matching

The node provides essential memory management capabilities for complex workflows,
helping prevent OOM errors and optimize multi-model processing pipelines.
2025-08-10 06:17:42 -07:00
Vito Sansevero f7d007d8c4 style: Fix line break in test assertion 2025-08-08 18:16:08 -07:00
Vito Sansevero 80045954a5 refactor(node): handle missing folder_paths module 2025-08-08 18:07:38 -07:00
Vito Sansevero 6f176e7b78 test: Refactor folder_paths mocking setup 2025-08-08 18:00:35 -07:00
Vito Sansevero 576efbba41 feat: complete embedding autocomplete implementation with all features
- Remove debug code and console.log statements
- Fix test suite to properly mock folder_paths module
- Update test expectations to match actual implementation
- Add comprehensive README documentation with feature list
- Add placeholder images for documentation screenshots
- Include diagnostic scripts for testing embedding paths
- All tests passing (338 passed, 2 skipped)

Features implemented:
- Autocomplete for embeddings, LoRAs, and custom tags
- Custom word list loading from URL (with security validation)
- Configurable triggers and settings
- Auto-insert comma, replace underscores, Tab/Enter selection
- Smart scrolling in suggestion list
- Secure content validation to prevent XSS attacks

Credits to pythongosssss/ComfyUI-Custom-Scripts for inspiration
2025-08-08 17:45:21 -07:00
Vito Sansevero 40b91fc44f feat: enhance embedding autocomplete with interactive test panel
- Add debug/test panel to the node with helpful usage hints
- Display counts of available embeddings and LoRAs
- Show sample items and status information
- Include clear instructions for triggering autocomplete
- Update display name with 🫶 branding
- Make node an OUTPUT_NODE to display information
2025-08-08 13:58:45 -07:00
Vito Sansevero 3e7734bbc3 feat: add KikoEmbeddingAutocomplete with settings registry system
- Implement centralized settings registry for all KikoTools
- Create KikoEmbeddingAutocomplete node with backend API
- Add frontend JavaScript autocomplete widget with ComfyUI integration
- Support for embeddings and LoRAs with smart filtering
- Configurable settings in ComfyUI UI with 🫶 branding
- Include keyboard navigation and real-time suggestions
2025-08-08 13:20:09 -07:00
Vito Sansevero 0f79601065 feat: add KikoFilmGrain node for realistic film grain effects
- Implement film grain effect with customizable parameters (scale, strength, saturation, toe, seed)
- Use pure PyTorch operations for better GPU utilization (no OpenCV dependencies)
- Apply ITU-R BT.709 color space conversion for accurate grain distribution
- Implement screen blend mode for better highlight preservation
- Add channel-specific weighting matching real film characteristics (3x blue, 2x red)
- Preserve alpha channel when present
- Add comprehensive test suite (20 tests covering all functionality)
- Include documentation and example workflow
- Register node under ComfyAssets/image category

Improvements over reference implementation:
- More efficient memory management avoiding numpy/OpenCV conversions
- Better grain mixing algorithm with proper color science
- Improved performance through PyTorch-native operations
2025-08-07 18:42:37 -07:00
Vito Sansevero 5485aa8c19 feat(xyz-helpers): add ComfyUI_essentials nodes adaptation
BREAKING CHANGE: Node categories now use emoji-based organization

Add 6 new xyz-helper nodes adapted from comfyui-essentials-nodes:
- FluxSamplerParams: FLUX-optimized parameter generator with batch support
- LoRAFolderBatch: Batch process multiple LoRAs from folders
- PlotParameters: Visualize parameter effects with graphs
- SamplerSelectHelper: Intelligent sampler selection with recommendations
- SchedulerSelectHelper: Optimal scheduler selection for samplers
- TextEncodeSamplerParams: Combined text encoding and parameter management

Changes:
- Port and enhance nodes from comfyui-essentials (now in maintenance mode)
- Add comprehensive documentation with attribution to original author (cubiq)
- Create example workflows for xyz-helpers tools
- Update all node categories to use emoji-based organization
- Fix all unit tests to pass with new category system
- Update README with xyz-helpers section and attribution

Attribution: xyz-helpers adapted from github.com/cubiq/ComfyUI_essentials

All tests passing (318 pass, 2 skip)
2025-08-07 05:41:23 -07:00
Vito Sansevero 972c487dd4 Add image_scale_down_by tool and display_any.js
- Add new image_scale_down_by tool for downscaling images/latents
- Add display_any.js web component for node display
- Include comprehensive unit tests for the new tool
2025-08-04 07:17:55 -07:00
Vito Sansevero 3ecab5ac08 fix: implement proper AnyType class for wildcard input matching
- Add AnyType class that inherits from str and overrides __ne__ to always return False
- This matches ComfyUI's type checking system for wildcard inputs
- Based on implementation from ComfyUI_essentials
- Add comprehensive tests for AnyType behavior
- Fixes type mismatch errors when connecting any node type
2025-08-01 10:47:20 -07:00
Vito Sansevero 70592114f9 fix: correct wildcard input type syntax for DisplayAny node
- Change from ('*', {}) to ('*') for proper ComfyUI wildcard type
- Update test to match the corrected syntax
- Fixes 'Return type mismatch' error when connecting nodes
2025-08-01 10:47:20 -07:00
Vito Sansevero 407fc4ca7b feat: add DisplayAny node for debugging and inspection
- Universal input acceptance for any data type
- Two display modes: raw value and tensor shape
- Extracts tensor shapes from nested structures
- Comprehensive unit tests with 100% coverage
- Full documentation with usage examples
- OUTPUT_NODE for UI display functionality
2025-08-01 10:47:20 -07:00
Vito 9829fc001d Merge pull request #14 from ComfyAssets/fix/black-config-main
fix: update black line-length to 88 and reformat codebase
2025-08-01 09:50:10 -07:00
Vito Sansevero e84ec6721c fix: update black line-length to 88 and reformat codebase
- Update pyproject.toml to use black's default line-length of 88
- This matches what the CI workflow expects (black --check without args)
- Reformat all Python files to comply with the new line length
- This will prevent CI failures due to formatting discrepancies
2025-08-01 09:45:43 -07:00
Vito Sansevero efc079a95b fix: reformat with black default settings (88 char) to match CI 2025-08-01 09:41:21 -07:00
Vito Sansevero bbd239cbd6 fix: apply black formatting with line-length 127 for CI compliance 2025-08-01 09:41:21 -07:00
Vito Sansevero ca504d5f74 fix: code formatting for Gemini prompt node
- Fix missing newlines at end of files
- Apply black formatting
- Remaining non-critical warnings for long lines in prompts
2025-08-01 09:41:21 -07:00
Vito Sansevero f559fe220e feat: add Gemini Prompt Engineer node
- Add GeminiPromptNode for AI-powered prompt engineering
- Integrates with Google's Gemini API for prompt generation
- Includes various prompt templates and generation modes
- Add comprehensive tests and documentation
- Register node in ComfyAssets category
2025-08-01 09:41:21 -07:00
Vito 932e30ade0 Merge pull request #13 from ComfyAssets/feature/image-to-multiple-of
Feature/image to multiple of
2025-08-01 09:34:25 -07:00
Vito Sansevero 005c3bdf65 fix: code formatting for Image to Multiple Of node
- Apply black formatting
- Remove unused torch import from logic.py
- All critical linting issues resolved
2025-08-01 09:01:39 -07:00
Vito Sansevero ab23992c29 chore: project housekeeping and configuration updates
- Add code quality tools: flake8, mypy, black, pre-commit
- Add .gitattributes for line ending consistency
- Add .secrets.baseline for secret scanning
- Update GitHub workflows for better CI/CD
- Update documentation formatting and examples
- Add CLAUDE.md for AI assistant guidance
- Add scripts directory for automation tools
- Update project configuration in pyproject.toml
- Improve type hints and code formatting across all modules
- Update test configurations and fixtures
2025-08-01 08:35:08 -07:00
Vito Sansevero 9007b10d42 feat: add Image to Multiple Of node
- Add ImageToMultipleOfNode for image dimension adjustment
- Ensures image dimensions are multiples of specified values
- Supports both padding and cropping modes
- Useful for model-specific dimension requirements
- Add tests and documentation
- Register node in ComfyAssets category
2025-08-01 08:28:10 -07:00
Vito Sansevero 22f62bf7b4 test: Update test assertions for sampler combo node 2025-07-23 13:56:45 -07:00
Vito Sansevero 0c4e59c4e9 test: Remove unused imports from test file 2025-06-28 09:14:45 -07:00
Vito Sansevero e17fdddcd7 refactor(tests/ui): Remove 'subfolder' support 2025-06-28 08:55:25 -07:00
Vito Sansevero 1233cf693e test(kiko_save_image): add unit tests for save image tool 2025-06-27 21:05:52 -07:00
Vito Sansevero 85af1b38f9 test: Add unit tests for EmptyLatentBatch features 2025-06-19 10:21:45 -07:00
Vito Sansevero be0c70eab1 style(test_width_height_selector): format code for readability 2025-06-15 08:54:47 -07:00
Vito Sansevero 2d6fef8fb4 test: Add tests for formatted preset metadata handling 2025-06-15 08:38:33 -07:00
Vito Sansevero 214851f2ef style: Clean up unused imports in test files 2025-06-14 15:25:55 -07:00
Vito Sansevero da26d40d98 test: Add unit tests for Sampler Combo functionality 2025-06-14 13:41:58 -07:00
Vito Sansevero ddc847a16d test(seed_history): add tests for Seed History tool 2025-06-14 11:29:03 -07:00