Commit Graph
24 Commits
Author SHA1 Message Date
Tasha Upchurch d9170f804b New Features: Added nodes for advanced video and audio processing
Key updates:

Added AddFramesToVideoFolder node to add frames to a video folder
Introduced VideoFolderProvider and VideoDefinitionProvider nodes to manage video folders and video definitions
Added FadeToInVideoFolder node for fading between frames in a video folder
Implemented ListedSVDConditioning node for applying SVD conditioning to a list of parameters
Added VideoFolderFFMPEGVideoInterpolate node to interpolate frames in a video folder using FFmpeg
Introduced AudioFolderProvider and AudioDefinitionProvider nodes for managing audio folders and definitions
Added AddAudioToAudioFolder and AddSilenceToAudioFolder nodes for adding audio files and silence to audio folders
Implemented GetAudioFilesLengthsFromAudioFolder node to retrieve lengths of audio files in a folder
Added AudioFolderRenderAudio node to join audio files in an audio folder
Introduced GenerateMusic node for generating music from descriptions using the AudioCraft library
Added XttsNode for text-to-speech conversion using the XTTS library
Implemented AdjustAudioVolumeForFiles node to adjust volume for a list of audio files
The changes also include the addition of LiteLLM nodes for text generation:

Added FuncAnysToText node that runs Python code with multiple input types and outputs a string
Introduced FuncAnysToLatent node for running code that outputs a latent representation
Added FuncAnysToString node for executing code with various inputs and producing a string output
Implemented FuncAnysToList node to run code that takes different input types and returns a list
Added FuncAnysToCond node for running code with multiple inputs and generating a conditioning output

These new nodes expand the capabilities for video and audio processing, allowing more advanced manipulations and generation of video and audio content within the graph.
2024-04-15 13:29:31 -04:00
Tasha Upchurch 447e9403ae Refactoring and Enhancements Across Multiple Modules
This commit introduces a series of refactoring and enhancements across multiple modules, improving code readability, consistency, and adding new functionalities.

Highlights:
1. `tests/test_hf_diffusers_nodes.py`:
   - Removed unnecessary whitespace.
   - Improved variable assignment consistency (e.g., `ret=ret[0]` to `ret = ret[0]`).
   - Added a new test case `test_create_unet2d_model` for Unet2d model creation.

2. `server_endpoints.py`:
   - Cleaned up commented-out code and added more descriptive comments.
   - Refactored the construction of `real_git_path` for better readability and future maintenance.
   - Implemented minor formatting improvements for better code structure.

3. `basic.py`:
   - Introduced a new class `TupleNode` to handle tuple data types.
   - Modified `StrBreakout` to include dynamic typing for list conversion.
   - Enhanced code readability with better variable naming and added comments for clarity.

4. `pytorch_nodes.py`:
   - Added import statements within functions for `torch`.
   - New classes `SaveTorchTensor` and `LoadTorchTensor` added for saving and loading torch tensors.
   - `GridSearchTraining` class updated with minor formatting changes.

5. `image.py`:
   - In `FloodFillNode`, removed a redundant category assignment.
   - Added two new classes: `DecorateHeightMap` and `RandomImageFromFolder`. These classes provide functionalities for decorating height maps with images and selecting random images from a folder, respectively.

6. `hf_diffusers_nodes.py`:
   - Fixed formatting in tensor format options and added a new line for clarity.
   - New class `CreateUnet2dModel` added for creating a UNet2D model with customizable parameters.
   - Introduced `TrainUnet2dModel` for training a UNet2D model with a dataset, including detailed setup for the training process.

7. `config.yaml`:
   - Added a new base path for `gitio` to centralize the configuration.

These changes aim to improve the maintainability of the codebase, streamline testing processes, and expand the functionalities within the modules, particularly related to image processing and model training in PyTorch and diffusers.
2024-01-18 17:28:28 -05:00
Tasha Upchurch d2d16cadfe Enhanced PyTorch Functionalities and Server Endpoints; Introduced Torchvision and Hugging Face Diffusers Integration
This commit introduces significant enhancements and new features across multiple files in the project. Major changes include:

1. `pytorch_nodes.py`: Expanded PyTorch node functionalities with additional imports, device compatibility checks, optimizer state updates, and training enhancements. Introduced new methods like `optimizer_to` for transferring optimizer state to a specified device, `reset_optimizer_weights` to clear optimizer states, and `make_image_tensor` for converting outputs to image tensors. Also, improved the training process with device compatibility checks, optimizer updates, and the ability to save and load models during training for efficiency.

2. `server_endpoints.py`: Modified server endpoints for improved git integration and user management. Adjustments include dynamic handling of different git repositories, refined branch and user management in GitIO class, and the integration of user-specific git settings in user management functions.

3. `config.yaml`: Added new configurations for temporary directory and git repositories, providing more flexibility and control over file management and version control integration.

4. `torchvision_nodes.py`: Introduced a new file to integrate torchvision functionalities. It includes classes for transform composition, application of torchvision transforms, and handling of torchvision-specific data structures.

5. `hf_diffusers_nodes.py`: Integrated Hugging Face's diffusers library with new nodes for loading and utilizing DDPMPipelines, handling tensor to image conversions, and managing datasets from the Hugging Face ecosystem.

6. `image.py`, `video.py`, `functional.py`: Refactored and enhanced existing functionalities. Included minor tweaks and bug fixes to improve the overall efficiency and robustness of image and video processing capabilities.

7. `requirements.txt`: Updated dependencies, replacing `fastnoisesimd` with `diffusers` to align with the newly integrated Hugging Face diffusers functionalities.

8. `config.py`: Improved the configuration file loading mechanism with dynamic path handling and the ability to replace placeholders with actual paths, enhancing the flexibility of configuration management.

This comprehensive update significantly enhances the project's capabilities in machine learning, especially in PyTorch and torchvision, and improves server endpoint functionalities for better user and version control management.
2023-12-27 13:22:48 -05:00
Tasha Upchurch 0051e93b5a update_js.py:
This file introduces a Python script for managing JavaScript extension files within a specific directory structure.
It includes an import statement for the os module.
Imports essential variables ETK_PATH and GDE_PATH from the custom_nodes.EternalKernelLiteGraphNodes.local_shared module.
Defines a function called check_for_js_extension(), which:
Verifies the existence of JavaScript extension files.
Compares modification timestamps to determine which file is newer.
Copies files between directories if they are outdated.
Provides user feedback during the copying process.
Calls the check_for_js_extension() function at the end of the script to perform the checks and copying.
2023-11-28 20:06:01 -05:00
Tasha Upchurch 57e514b0b6 Add several new nodes:
- DecodeTranscriptNode to parse transcript text
- YoutubeUploadNode to upload videos to YouTube
- Audio metadata and file list nodes
- Image stack blending and stripping alpha channel
- Sampler dataset creation node
- Utils for deep copying tensors and arrays

Also includes:

- Testing for new utils module
- Git nodes marked with base class
- Renamed nodes.py to avoid conflicts
- Import refactoring to handle naming

Specifics:

- descript.py: New transcript parsing node
- youtube_nodes.py: New YouTube upload node
- audio.py: New audio metadata and file list nodes
- utils.py: Deep copy utility functions
- image.py: New image stack blending and alpha stripping
- tests/test_utils.py: Tests for new utils
- git.py: Marked git nodes with base class
- __init__.py: Refactored imports and mappings
- requirements.txt: Added YouTube dependencies
- functional.py: Minor tweaks
- modules/youtube.py: Helper for upload node
- video.py: Minor cleanup
- tests/test_youtube_nodes.py: Test for YouTube upload
2023-08-05 15:19:21 -04:00
Tasha Upchurch 4b55e7203b - Added initial implementation of Git-related functionality in git.py.
- Introduced widget definitions for Git-related operations in `bases.py`.

These changes lay the foundation for Git-related functionality in the codebase and provide widget definitions for interacting with Git repositories.
2023-07-07 18:44:00 -04:00
Tasha Upchurch df699a302e aider: Fixed import error in test_git.py.
# Context:
USER: I ran this command:

 python E:/git/ComfyUI/custom_nodes/EternalKernelLiteGraphNodes/tests/test_git.py

And got this output:

Traceback (most recent call last):
  File "E:\git\ComfyUI\custom_nodes\EternalKernelLiteGraphNodes\tests\test_git.py", line 6, in <module>
    from custom_nodes.git import CreateRepoNode
ModuleNotFoundError: No module named 'custom_nodes.git'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "E:\git\ComfyUI\custom_nodes\EternalKernelLiteGraphNodes\tests\test_git.py", line 8, in <module>
    from custom_nodes.git import CreateRepoNode
ModuleNotFoundError: No module named 'custom_nodes.git'
2023-07-07 03:00:24 -04:00
Tasha Upchurch 602d5e1ef8 aider: Fixed relative import error in test_git.py.
# Context:
USER: I ran this command:

 python E:/git/ComfyUI/custom_nodes/EternalKernelLiteGraphNodes/tests/test_git.py

And got this output:

Total VRAM 10239 MB, total RAM 98225 MB
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 3080
ETK> Failed to import comfy.samplers, assuming no comfyui skipping SD related nodes
Using sub quadratic optimization for cross attention, if you have memory or speed issues try using: --use-split-cross-attention
Using sub quadratic optimization for cross attention, if you have memory or speed issues try using: --use-split-cross-attention
ETK> advanced clip not found, skipping it
+--------------------- Traceback (most recent call last) ---------------------+
| E:\git\ComfyUI\custom_nodes\EternalKernelLiteGraphNodes\tests\test_git.py:6 |
| in <module>                                                                 |
|                                                                             |
|    3 import os                                                              |
|    4 sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.pat |
|    5 try:                                                                   |
| >  6     from custom_nodes.EternalKernelLiteGraphNodes.git import CreateRep |
|    7 except:                                                                |
|    8     from ..git import CreateRepoNode                                   |
|    9                                                                        |
|                                                                             |
| E:\git\ComfyUI\custom_nodes\EternalKernelLiteGraphNodes\git.py:1 in         |
| <module>                                                                    |
|                                                                             |
| >  1 import giturlparse                                                     |
|    2 import git                                                             |
|    3                                                                        |
|    4                                                                        |
+-----------------------------------------------------------------------------+
ModuleNotFoundError: No module named 'giturlparse'

During handling of the above exception, another exception occurred:

+--------------------- Traceback (most recent call last) ---------------------+
| E:\git\ComfyUI\custom_nodes\EternalKernelLiteGraphNodes\tests\test_git.py:8 |
| in <module>                                                                 |
|                                                                             |
|    5 try:                                                                   |
|    6     from custom_nodes.EternalKernelLiteGraphNodes.git import CreateRep |
|    7 except:                                                                |
| >  8     from ..git import CreateRepoNode                                   |
|    9                                                                        |
|   10                                                                        |
|   11                                                                        |
+-----------------------------------------------------------------------------+
ImportError: attempted relative import with no known parent package
2023-07-07 02:59:59 -04:00
Tasha Upchurch c85cbe38e9 Refactor import statements in test_git.py to handle different module paths. 2023-07-07 02:59:31 -04:00
Tasha Upchurch d406b61db6 aider: Changed the working directory of the run statement to "E:/git/ComfyUI/".
# Context:
USER: somehow we must change the working directory of the run statement
2023-07-07 02:57:43 -04:00
Tasha Upchurch d86a0ea4bd Set working directory to "E:/git/ComfyUI/". 2023-07-07 02:56:57 -04:00
Tasha Upchurch 11fe586b29 aider: Set the working directory to E:\git\ComfyUI\
# Context:
USER: it would work if you would set the working directory to e:\git\ComfyUI\
2023-07-07 02:56:19 -04:00
Tasha Upchurch d195845e0f aider: Changed import statement in test_git.py to import CreateRepoNode from custom_nodes.git instead of custom_nodes.EternalKernelLiteGraphNodes.git.
# Context:
USER: I ran this command:

 python E:/git/ComfyUI/custom_nodes/EternalKernelLiteGraphNodes/tests/test_git.py

And got this output:

Traceback (most recent call last):
  File "E:\git\ComfyUI\custom_nodes\EternalKernelLiteGraphNodes\tests\test_git.py", line 2, in <module>
    from custom_nodes.EternalKernelLiteGraphNodes.git import CreateRepoNode
ModuleNotFoundError: No module named 'custom_nodes.EternalKernelLiteGraphNodes'
2023-07-07 02:55:34 -04:00
Tasha Upchurch ff061ef760 aider: Changed import statement in test_git.py to import CreateRepoNode from the correct module location.
# Context:
USER: I ran this command:

 python E:/git/ComfyUI/custom_nodes/EternalKernelLiteGraphNodes/tests/test_git.py

And got this output:

Traceback (most recent call last):
  File "E:\git\ComfyUI\custom_nodes\EternalKernelLiteGraphNodes\tests\test_git.py", line 2, in <module>
    from custom_nodes.git import CreateRepoNode
ModuleNotFoundError: No module named 'custom_nodes.git'
2023-07-07 02:55:23 -04:00
Tasha Upchurch 53dd939f77 aider: Changed import statement in test_git.py to import CreateRepoNode from custom_nodes.git instead of custom_nodes.EternalKernelLiteGraphNodes.git.
# Context:
USER: I ran this command:

 python E:/git/ComfyUI/custom_nodes/EternalKernelLiteGraphNodes/tests/test_git.py

And got this output:

Traceback (most recent call last):
  File "E:\git\ComfyUI\custom_nodes\EternalKernelLiteGraphNodes\tests\test_git.py", line 2, in <module>
    from custom_nodes.EternalKernelLiteGraphNodes.git import CreateRepoNode
ModuleNotFoundError: No module named 'custom_nodes.EternalKernelLiteGraphNodes'
2023-07-07 02:55:13 -04:00
Tasha Upchurch 611fce2b2f aider: Fixed relative import error in test_git.py.
# Context:
USER: I ran this command:

 python E:/git/ComfyUI/custom_nodes/EternalKernelLiteGraphNodes/tests/test_git.py

And got this output:

Traceback (most recent call last):
  File "E:\git\ComfyUI\custom_nodes\EternalKernelLiteGraphNodes\tests\test_git.py", line 3, in <module>
    from custom_nodes.EternalKernelLiteGraphNodes.git import CreateRepoNode
ModuleNotFoundError: No module named 'custom_nodes.EternalKernelLiteGraphNodes'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "E:\git\ComfyUI\custom_nodes\EternalKernelLiteGraphNodes\tests\test_git.py", line 5, in <module>
    from ..git import CreateRepoNode
ImportError: attempted relative import with no known parent package
2023-07-07 02:53:53 -04:00
Tasha Upchurch cf3d581add Fix import error in test_git.py. 2023-07-07 02:53:17 -04:00
Tasha Upchurch e633aefeed Added a new test case for CreateRepoNode. 2023-07-07 02:37:31 -04:00
Tasha Upchurch 74d394cc8d Refactored import statement in test_git.py to use the CreateRepoNode from the custom_nodes.EternalKernelLiteGraphNodes.git module. 2023-07-07 02:36:55 -04:00
Tasha Upchurch 5557eac524 Add test case for creating a repository. 2023-07-07 02:36:20 -04:00
Tasha Upchurch f210c8c7af aider: Created and added tests\test_git.py to git. 2023-07-07 02:33:50 -04:00
Tasha Upchurch e18961e639 - Added a new test TestTemporalSpatialSmoothing in tests/test_video.py
- This test validates the functionality of the `TemporalSpatialSmoothing` handler, which smooths image stacks in both temporal and spatial dimensions.
  - The test uses random frames of noise and verifies the correctness of the handler.
- Made minor changes in `image.py`
  - Updated code formatting for improved readability and consistency.
  - Added error handling for cases when creating a PIL image from a numpy array.
- No significant changes were made in `video.py`.

These changes primarily focus on adding test coverage and maintaining code quality.
2023-07-07 01:50:19 -04:00
Tasha Upchurch 906fec459e - Added test_descript.py to test the DecodeTranscriptNode class.
- Added test_video.py to test the ImageStackToVideoFile class.
- Both tests ensure the functionality and correctness of the respective classes.
2023-06-18 20:33:31 -04:00
Tasha Upchurch 07cc1278f9 memory leak somewhere WIP 2023-06-02 21:50:56 -04:00