Commit Graph
35 Commits
Author SHA1 Message Date
Tasha Upchurch b04efb02c7 formatting corrections 2023-10-28 13:31:05 -04:00
Tasha Upchurch a8b1cad208 added 1/2 of ImageStackAndMatch 2023-10-22 23:33:42 -04:00
Tasha Upchurch 2329ed6144 Commit message: "Optimize and Extend Image Processing Features"
Shared model instances across TinyTxtToImg objects for efficiency
Added option to unload models from memory
Improved CUDA and CPU memory handling
Introduced ScaleLatentChannelwise for latent scaling
Added TextInImage and DetectTextLines for OCR capabilities
Removed unnecessary comments and adjusted code formatting
2023-10-01 00:47:08 -04:00
Tasha Upchurch 587a134705 Fix for refactoring mistake involving nodes_examples vs nodes 2023-09-20 17:18:02 -04:00
Timothy Eakin f9a628d189 Setup Debug
updated openai and openai_function_calling using:

pip install --upgrade {package name}

found a missing RETURN_TYPES = ("IMAGE",) in ETKLGN/image.PreviewImageTest
2023-09-20 15:05:42 -04:00
Tasha Upchurch 35b3ec4f66 Add nodes for flexible typing and conversion to Any
This commit adds several new nodes to enable flexible typing and conversion between types:

- ValueToAny - Converts primitive values like ints, floats, strings, bools to Any type
- IterableToAny - Converts iterable values like lists, dicts to Any
- CallableToAny - Converts callables like functions to Any
- ObjectToAny - Converts tensor objects like images, latents etc to Any

The motivation is to allow passing different types flexibly into functions using Any typing. This enables writing functions in a more generic way by accepting Any instead of specific types.

The nodes convert the input values to Any and return debug info on what was converted. This allows tracing what types entered a function even if the function uses generic Any types.

No breaking changes, new nodes added:
- ValueToAny
- IterableToAny
- CallableToAny
- ObjectToAny

These provide building blocks for more flexible typing, opening up possibilities like:

- Writing utility and processing functions accepting Any instead of specific types
- Calling functions dynamically with values of different types
- Tracing and logging what types passed through a function

Next steps could include AnyToValue nodes, more specialized Any converters, and exploring uses for generic functions.
2023-09-18 17:18:35 -04:00
Tasha Upchurch aed1618bf7 added whisper-openai to requirements as well as moviepy
started creating whisper transcription node

modified how imports are handled to avoid importing the same moduels twice under different name spaces.

added basic.py to house simple functions that work on primitives.

NOTE: this update relies on change to /web/extensions that are not included in this commit, a future commit will include an install process for these changes.
2023-09-07 22:02:39 -04:00
Tasha Upchurch 5c3e49c1f0 Enhanced image processing and memory management in image.py
This commit refactors the handling of the 'steps' attribute, making it configurable via arguments, and adds memory cleanup logic within the 'stackme' method. Additionally, conditional cloning of images ensures that operations are performed only if the images are not None. Commented-out code provides a placeholder for potential future modifications.
2023-08-20 13:46:37 -04: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 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 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
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 aca7f50a4b Fixed exception handling in image.py and updated FUNC assignment in line 274. 2023-06-18 20:31:38 -04:00
Tasha Upchurch 4f9c3ed310 better functional integration 2023-06-14 16:00:50 -04:00
Tasha Upchurch 77535a77f1 bug fixs for various issues around module structure. 2023-06-12 23:24:02 -04:00
Timothy Eakin f9aaedc0f2 moved Code Execution widget to ETL/func and functional.py 2023-06-10 15:03:55 -04:00
Timothy Eakin c3b5a7dd0f renamed and refactored Eval widget to Code Exec(ution) Widget 2023-06-07 14:19:04 -04:00
Timothy Eakin d4ea966ef2 better place for this 2023-06-06 16:22:29 -04:00
Tasha Upchurch ce78538c82 changes to how exec widget works, still trying to find its best self! 2023-06-05 11:42:47 -04:00
Tasha Upchurch 7e314b0ffb updates to eval widget, now a bit easier to understand usage. also more to come! 2023-06-04 14:38:54 -04:00
Tasha Upchurch 5d9d5abadd formatting 2023-06-04 13:49:25 -04:00
Tasha Upchurch a963ca550b first working ide node for python code 2023-06-04 00:55:46 -04:00
Tasha Upchurch 3862c3e34a changes to help with tests 2023-06-04 00:55:06 -04:00
Tasha Upchurch 07cc1278f9 memory leak somewhere WIP 2023-06-02 21:50:56 -04:00
Tasha Upchurch f4d51c07a8 added the ability to render text in any found font to an image 2023-06-01 23:59:26 -04:00
Tasha Upchurch 5bf9151fdb quick check for tinytxt2img caching th model 2023-06-01 12:10:15 -04:00
Tasha Upchurch f6d1f495c5 update to latest comfy 2023-05-30 15:04:02 -04:00
Tasha Upchurch dacbed79c2 changes to exec node and the ability to return TinyTextToImage as a function 2023-05-29 22:38:37 -04:00
Tasha Upchurch 5539ec6cb2 bugfix 2023-05-28 01:30:33 -04:00
Tasha Upchurch 71f971cd0f removed necessary import 2023-05-27 12:45:09 -04:00
Tasha Upchurch 6a21fffe63 bug fixs and node labeling 2023-05-26 17:10:49 -04:00
Tasha Upchurch d778d0d85d more changes to streamline for our alternate use case 2023-05-26 10:51:32 -04:00
Tasha Upchurch d70859a5da restructure and rename to be more generic 2023-05-25 14:41:25 -04:00
Tasha Upchurch 9807e12198 initial commit
variety of nodes to support many things including a start on alpha channel support for comfyui
2023-05-25 12:55:40 -04:00