Commit Graph
86 Commits
Author SHA1 Message Date
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 e1dc2eb814 aider: Create test for CreateRepoNode class.
# Context:
USER: please create a tist for `CreateRepoNode`
2023-07-07 02:35:18 -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 d13f184eab aider: Create a new node that creates a new local git repository at a given subdirectory.
# Context:
USER: create a new node that will create a new local git repository at a given subdirectory
2023-07-07 02:32:59 -04:00
Tasha Upchurch dcfeafaebc Added PublicGitRepo and SendCommitNode classes. 2023-07-07 02:32:00 -04:00
Tasha Upchurch c3826dd0a1 aider: Added a new class SendCommitNode that provides the functionality of sending a commit to a public Git repository.
# Context:
USER: create a new node (that means a new class) that will provide the functionality of send_commit
2023-07-07 02:31:15 -04:00
Tasha Upchurch c87b10ad53 aider: Added a new node to provide send_Commit.
# Context:
USER: create a new node that will provide send_Commit
2023-07-07 02:30:19 -04:00
Tasha Upchurch 68b4bac0dc Changed CATEGORY value in PublicGitRepo class to "ETK/git". 2023-07-07 02:30:00 -04:00
Tasha Upchurch 25de52af2a aider: Added functionality to send commits to public repos.
# Context:
USER: what package can we use to be able to send commits to public repos?
2023-07-07 02:28:40 -04:00
Tasha Upchurch e765c77f63 Added a new class PublicGitRepo with a method validate_git_repo_url that parses a git URL using giturlparse. 2023-07-07 02:27:53 -04:00
Tasha Upchurch ad8b0b58c6 aider: Added package dependency for sending commits to public repos.
# Context:
USER: I have changed git.py
USER: what package can we use to be able to send commits to public repos?
2023-07-07 02:26:38 -04:00
Tasha Upchurch 7748b4b142 Added INPUT_TYPES class method to PublicGitRepo class to define required input types for the function, and modified validate_git_repo_url function to accept keyword arguments and return the git_url. 2023-07-07 02:25:43 -04:00
Tasha Upchurch b3510c8c36 aider: Refactored validate_git_repo_url function to accept keyword arguments instead of specific parameters, and updated the example usage accordingly.
# Context:
USER: the paramaters for the function come from the return statement of def `INPUT_TYPES` in this case however please just use kwargs
2023-07-07 02:23:26 -04:00
Tasha Upchurch 1d1bc3797b aider: Renamed the function to "validate_git_repo_url" and added logic to check if the git URL is valid.
# Context:
USER: the function that will be called should verify that the url is a valid git repo, rename the function to something appropriet.
2023-07-07 02:21:15 -04:00
Tasha Upchurch d9c71bba38 aider: Added url and email inputs to the input types.
# Context:
USER: the input types should include only the url, and the email adress of the user
2023-07-07 02:20:11 -04:00
Tasha Upchurch b2ea3a6fa8 aider: Renamed class "PromptTemplate" to "PublicGitRepo" and updated method calls accordingly.
# Context:
USER: Prompt template is a definition for a node that the server will use.. the server will supply information about the node to the front end.
USER: the class should be renamed, "PublicGitRepo"
2023-07-07 02:19:25 -04:00
Tasha Upchurch e2615da287 aider: Added git_url input to the prompt_template_handler function in git.py.
# Context:
USER: please add a node to supply the URL of a git repository.
2023-07-07 02:16:58 -04:00
Tasha Upchurch e6215518e3 Added a commented out class PromptTemplate with a method prompt_template_handler that replaces text in a given string with another text at some key positions.y 2023-07-07 02:16:08 -04:00
Tasha Upchurch 0ecff05fbf aider: Added a basic abstract class for a node in git.py.
# Context:
USER: in git.py add a basic abstract class for a node
2023-07-07 02:07:43 -04:00
Tasha Upchurch 0d6a74636f aider: Add a basic node for this module to provide functions for interacting with Git.
# Context:
USER: add a basic node for this module like there is in image.py
2023-07-07 01:57:06 -04:00
Tasha Upchurch 7aeaf10c52 aider: Added a function to check the git status and print it.
# Context:
USER: status
2023-07-07 01:54:57 -04:00
Tasha Upchurch d1827f184d aider: Added a main function to image.py.
# Context:
USER: add `image.py`
ASSISTANT: Sure, I can help with that. However, I need more information about what you want to include in `image.py`. Could you please provide more details?
USER: I need you to use it so you can understand the framework
ASSISTANT: I understand that you want me to create a new file named `image.py`. However, without specific details about what this file should contain, I can only provide a basic template. Here's a simple Python file structure:

```python
image.py
<<<<<<< ORIGINAL

=======
# This is a new file named image.py

def main():
    pass

if __name__ == "__main__":
    main()
>>>>>>> UPDATED
```

Please provide more details if you need specific functions or classes in this file.
2023-07-07 01:53:27 -04:00
Tasha Upchurch 6f72f7ab60 Added new files to the git repo: git.py 2023-07-07 01:50:58 -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 8e57955410 Commit message:
"Added GetFirstCodeBlock class to functional.py"

Commit details:
- Added a new class called GetFirstCodeBlock to the functional.py file.
- The GetFirstCodeBlock class is used to find and return the first code block in the input text. It checks for code blocks surrounded by "```" or "```python" tags, or "<code>" tags.
- Returns an empty string if no code block is found.
- Added a new function called func to the GetFirstCodeBlock class, which takes the input text as an argument and returns the first code block.
- Updated the functional.py file with the new class and function.
- The new class is categorized under "ETK/func" and has a return type of "STRING".
- The commit message and details were created using the IDEA additional info of the patch, with the charset set to UTF-8.
2023-07-03 22:05:45 -04:00
Tasha Upchurch 117d5e9a99 1. Added a new class FuncStrToList in functional.py
2. This class has a method func that takes a string and code as input and executes the code.
3. The executed code is expected to convert the input string into a list which is then returned.
4. Also, defined INPUT_TYPES, CATEGORY, RETURN_TYPES, and FUNCTION for the class.
2023-07-01 02:52:59 -04:00
Tasha Upchurch ae3305385d 1. custom_nodes/SWAIN/text.py:
- Added a new function handler called "LoadJson" that loads a JSON object from a file and returns it as a dictionary or list.
   - Updated the RETURN_TYPES and RETURN_NAMES for the "LoadJson" function.

2. custom_nodes/SWAIN/llm.py:
   - Updated the "get_openai_embedding" function to include additional keyword arguments.
   - Added exception handling for API connection errors and API errors in the "get_openai_embedding" function.
   - Modified the "get_k_nearest_vectors" function to handle tuples as input.
   - Removed unnecessary import statements in the LLMEmbedding class.
   - Added a new function handler called "FuncStrToStr" that runs the 'eval' function on the given text with a string as input and returns a string.
   - Updated the INPUT_TYPES and RETURN_TYPES for the "FuncStrToStr" function.

3. custom_nodes/SWAIN/tests/test_llm.py:
   - Added new unit tests for the "get_openai_embedding" and "get_k_nearest_vectors" functions.
   - Fixed import statements in the test file.

4. custom_nodes/EternalKernelLiteGraphNodes/functional.py:
   - Added a new function handler called "FuncStrToStr" that runs 'eval' on the given text with a string as input and returns a string.
   - Updated the INPUT_TYPES for the "FuncStrToStr" function.

5. custom_nodes/SWAIN/bases.py:
   - Added a new widget generator for the "number" parameter type.

These changes introduce new functionality and improve the error handling and testing in the project.
2023-06-28 21:37:27 -04:00
Tasha Upchurch d2ed980b6d - Added a new class called FuncListToList to the functional.py file.
- Modified the `func` method in the `FuncRender` class in `functional.py` to return a tuple.
- Modified the `video_folders` function in `video.py` to include a return statement.
- Modified the `video_files` function in `video.py` to include a return statement.
- Added a new parameter `func` with a default value of `None` to the `optional` dictionary in the `ImageStackToVideoFile` class in `video.py`.
- Updated the `handler` method in the `ImageStackToVideoFile` class in `video.py` to include a check for the `optional` parameter `func`.
2023-06-26 17:49:06 -04:00
Tasha Upchurch 87792fe33d Import classes directly from file instead of using importlib
fix for bug that was allowing importlib to find addons from other installations.
2023-06-26 17:47:53 -04:00
Tasha Upchurch 5692f0fe45 Merge remote-tracking branch 'origin/main' 2023-06-21 17:25:32 -04:00
Tasha Upchurch 1885329c7a Remove unused class "Prompt Template" in __init__.py
Details:
- Removed the unused class "Prompt Template" in the __init__.py file.
- This class was not being used and was causing clutter in the codebase.
- The removal improves code readability and maintainability.
2023-06-21 17:25:07 -04:00
Timothy Eakin e2d0dfbf2e Moved PromptTemplate back to image.py. 2023-06-19 18:12:43 -04:00
Timothy Eakin 513a5118cd Moved PromptTemplate to text.py. 2023-06-19 15:10:20 -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 59d03a3f4a Commit Message:
- Updated video.py
- Added new classes for converting image stack to video frames and video file.
- Fixed input and output directories for video files.
2023-06-18 20:32:18 -04:00