diff --git a/.gitignore b/.gitignore index ba0430d..d9d5e77 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -__pycache__/ \ No newline at end of file +__pycache__/ +SaveText/ \ No newline at end of file diff --git a/README.md b/README.md index 8d1c8b6..f2a0ee5 100644 --- a/README.md +++ b/README.md @@ -1 +1,131 @@ - +# πŸ”— Comfyui : Bjornulf_custom_nodes v0.2 πŸ”— + +# Dependencies + +- `pip install ollama` (you can also install ollama if you want : https://ollama.com/download) - You don't need to really install it if you don't want to use my ollama node. (BUT you need to run `pip install ollama`) + +# πŸ“ Changelog + +## v0.2 +- **Ollama**: Improve ollama node with system prompt + model selection. + +# πŸ“ Nodes descriptions + +## 1/2 - πŸ‘ + βœ’ Show/Write Text +![Show Text](screenshots/write+show_text.png) + +**Description:** +Two simple nodes to write and show text. +Write node is a textarea where you can write your text. +The show text node will only display the text. (That's why I made it a different color : green, uneditable, display only.) + +## 3 - πŸ”— Combine Texts +![Combine Texts](screenshots/combine_texts.png) + +**Description:** +Combine multiple text inputs into a single output. (can have separation with : comma, space, new line.) + +## 4 - 🎲 Random Text +![Random Text](screenshots/random_text.png) + +**Description:** +Generate and display random text from a predefined list. Great for creating random prompts. + +## 5 - β™» Loop +![Loop](screenshots/loop.png) + +**Description:** +General-purpose loop node. + +## 6 - β™» Loop Texts +![Loop Texts](screenshots/loop_texts.png) + +**Description:** +Cycle through a list of text inputs. Great for creating dynamic text-based presentations. + +## 7 - β™» Loop Integer +![Loop Integer](screenshots/loop_integer.png) +![Loop Int + Show Text](screenshots/loop_int+show_text.png) + +**Description:** +Iterate through a range of integer values, good for `steps` in ksampler, etc... + +❗ Don't forget that you can convert ksampler widgets to input by right-clicking the ksampler node : +![Widget to Input](screenshots/widget-to-input.png) + +## 8 - β™» Loop Float +![Loop Float](screenshots/loop_float.png) +![Loop Float + Show Text](screenshots/loop_float+show_text.png) + +**Description:** +Loop through a range of floating-point numbers, good for `cfg`, `denoise`, etc... + +## 10 - β™» Loop All Samplers +![Loop All Samplers](screenshots/loop_all_samplers.png) + +**Description:** +Iterate over all available samplers to apply them sequentially. Ideal for testing. + +## 11 - β™» Loop All Schedulers +![Loop All Schedulers](screenshots/loop_all_schedulers.png) + +**Description:** +Iterate over all available schedulers to apply them sequentially. Ideal for testing. + +## 12 - β™» Loop Combos +![Loop Combos](screenshots/loop_combos.png) + +**Description:** +Generate a loop from a list of my own custom combinations (scheduler+sampler), or select one combo manually. +Good for testing. + +## 13/14 - πŸ“ + πŸ–Ό Resize and Save Exact name βš οΈπŸ’£ +![Resize and Save Exact](screenshots/resize_save_exact.png) + +**Description:** +Resize an image to exact dimensions. The other node will save the image to the exact path. +βš οΈπŸ’£ Warning : The image will be overwritten if it already exists. + +## 15 - πŸ’Ύ Save Text +![Save Text](screenshots/save_text.png) + +**Description:** +Save the given text input to a file. Useful for logging and storing text data. + +## 16 - πŸ–Ό Save image for API (❗For my custom [lobe-chat](https://github.com/justUmen/lobe-chat)❗) +![Save API](screenshots/save_api.png) + +**Description:** +It will save the image with the name of `api_next_image.txt`, which will be incremented each time you run the node. +The name will start at `api_00001.png`, then `api_00002.png`, etc... +❓ I made that for my custom lobe-chat to send+receive images from Comfyui API : [lobe-chat](https://github.com/justUmen/lobe-chat) + +## 17 - πŸ–Ό Save image as `tmp_api.png` Temporary API βš οΈπŸ’£ +![Save Temporary API](screenshots/save_tmp_api.png) + +**Description:** +Save image for short-term use : ./output/tmp_api.png βš οΈπŸ’£ + +## 18 - πŸ¦™ Ollama +![Show Text](screenshots/ollama.png) + +**Description:** +Will generate detailed text based of what you give it. +I recommend using `mistral-nemo` if you can run it, but it's up to you. (Might have to tweak the system prompt a bit) +⚠️ Warning : Having an ollama node that will run for each generation might be a bit heavy on your VRAM. Think about if you really need it or not. + +**Description:** +Straight forward node to write and show text. + +## 18 - πŸ“Ή Video Ping Pong +![Video Ping Pong](screenshots/video_pingpong.png) + +**Description:** +Create a ping-pong effect from a list of images (from a video) by reversing the playback direction when reaching the last frame. Good for an "infinity loop" effect. + +## 19 - πŸ“Ή Images to Video +![Images to Video](screenshots/imgs2video.png) + +**Description:** +Combine a sequence of images into a video file. +❓ I made this node because it supports transparency with webm format. (Good for rembg) \ No newline at end of file diff --git a/SaveText/SaveText.txt b/SaveText/SaveText.txt deleted file mode 100644 index c67368e..0000000 --- a/SaveText/SaveText.txt +++ /dev/null @@ -1 +0,0 @@ -saluts \ No newline at end of file diff --git a/SaveText/SaveText_001.txt b/SaveText/SaveText_001.txt deleted file mode 100644 index 5688a8f..0000000 --- a/SaveText/SaveText_001.txt +++ /dev/null @@ -1 +0,0 @@ -encule \ No newline at end of file diff --git a/SaveText/SaveText_002.txt b/SaveText/SaveText_002.txt deleted file mode 100644 index d47fd5e..0000000 --- a/SaveText/SaveText_002.txt +++ /dev/null @@ -1 +0,0 @@ -connard \ No newline at end of file diff --git a/SaveText/SaveText_003.txt b/SaveText/SaveText_003.txt deleted file mode 100644 index e69de29..0000000 diff --git a/SaveText/SaveText_004.txt b/SaveText/SaveText_004.txt deleted file mode 100644 index e69de29..0000000 diff --git a/SaveText/SaveText_005.txt b/SaveText/SaveText_005.txt deleted file mode 100644 index e69de29..0000000 diff --git a/__init__.py b/__init__.py index 66e11a3..a69f338 100644 --- a/__init__.py +++ b/__init__.py @@ -64,9 +64,9 @@ NODE_DISPLAY_NAME_MAPPINGS = { "Bjornulf_ShowInt": "πŸ‘ Show (Int)", "Bjornulf_ShowFloat": "πŸ‘ Show (Float)", "Bjornulf_ResizeImage": "πŸ“ Resize Image", - "Bjornulf_SaveImagePath": "πŸ–Ό Save Image (exact path, exact name)", - "Bjornulf_SaveTmpImage": "πŸ–Ό Save Image (tmp_api.png)", - "Bjornulf_SaveApiImage": "πŸ–Ό Save Image (API_IMAGES/00001.png...)", + "Bjornulf_SaveImagePath": "πŸ–Ό Save Image (exact path, exact name) βš οΈπŸ’£", + "Bjornulf_SaveTmpImage": "πŸ–Ό Save Image (tmp_api.png) βš οΈπŸ’£", + "Bjornulf_SaveApiImage": "πŸ–Ό Save Image (./output/api_00001.png...)", "Bjornulf_SaveText": "πŸ’Ύ Save Text", #Make SaveCharacter, SaveLocation, SaveCamera, SaveAction, SaveClothes, SaveEmotion... "Bjornulf_LoadText": "πŸ“₯ Load Text", #Make LoadCharacter, LoadLocation, LoadCamera, LoadAction, LoadClothes, LoadEmotion... "Bjornulf_WriteText": "βœ’ Write Text", diff --git a/combine_texts.py b/combine_texts.py index 0e83a4a..a00f3e5 100644 --- a/combine_texts.py +++ b/combine_texts.py @@ -4,7 +4,7 @@ class CombineTexts: return { "required": { "number_of_inputs": ("INT", {"default": 2, "min": 2, "max": 10, "step": 1}), - "delimiter": (["newline", "comma", "space", "test"], {"default": "newline"}), + "delimiter": (["newline", "comma", "space"], {"default": "newline"}), "text_1": ("STRING", {"forceInput": True}), "text_2": ("STRING", {"forceInput": True}), }, diff --git a/screenshots/combine_texts.png b/screenshots/combine_texts.png new file mode 100644 index 0000000..3334cf2 Binary files /dev/null and b/screenshots/combine_texts.png differ diff --git a/screenshots/imgs2video.png b/screenshots/imgs2video.png new file mode 100644 index 0000000..e6970f4 Binary files /dev/null and b/screenshots/imgs2video.png differ diff --git a/screenshots/loop.png b/screenshots/loop.png new file mode 100644 index 0000000..00ce1b9 Binary files /dev/null and b/screenshots/loop.png differ diff --git a/screenshots/loop_all_samplers.png b/screenshots/loop_all_samplers.png new file mode 100644 index 0000000..19a2ce6 Binary files /dev/null and b/screenshots/loop_all_samplers.png differ diff --git a/screenshots/loop_all_schedulers.png b/screenshots/loop_all_schedulers.png new file mode 100644 index 0000000..7fb6d92 Binary files /dev/null and b/screenshots/loop_all_schedulers.png differ diff --git a/screenshots/loop_combos.png b/screenshots/loop_combos.png new file mode 100644 index 0000000..0a7bea8 Binary files /dev/null and b/screenshots/loop_combos.png differ diff --git a/screenshots/loop_float+show_text.png b/screenshots/loop_float+show_text.png new file mode 100644 index 0000000..5a665cd Binary files /dev/null and b/screenshots/loop_float+show_text.png differ diff --git a/screenshots/loop_float.png b/screenshots/loop_float.png new file mode 100644 index 0000000..9158ce0 Binary files /dev/null and b/screenshots/loop_float.png differ diff --git a/screenshots/loop_int+show_text.png b/screenshots/loop_int+show_text.png new file mode 100644 index 0000000..68f5088 Binary files /dev/null and b/screenshots/loop_int+show_text.png differ diff --git a/screenshots/loop_integer.png b/screenshots/loop_integer.png new file mode 100644 index 0000000..5d2b53c Binary files /dev/null and b/screenshots/loop_integer.png differ diff --git a/screenshots/loop_texts.png b/screenshots/loop_texts.png new file mode 100644 index 0000000..f7b0415 Binary files /dev/null and b/screenshots/loop_texts.png differ diff --git a/screenshots/ollama.png b/screenshots/ollama.png new file mode 100644 index 0000000..c595383 Binary files /dev/null and b/screenshots/ollama.png differ diff --git a/screenshots/random_text.png b/screenshots/random_text.png new file mode 100644 index 0000000..1631e17 Binary files /dev/null and b/screenshots/random_text.png differ diff --git a/screenshots/resize_save_exact.png b/screenshots/resize_save_exact.png new file mode 100644 index 0000000..18747a1 Binary files /dev/null and b/screenshots/resize_save_exact.png differ diff --git a/screenshots/save_api.png b/screenshots/save_api.png new file mode 100644 index 0000000..7f436f6 Binary files /dev/null and b/screenshots/save_api.png differ diff --git a/screenshots/save_text.png b/screenshots/save_text.png new file mode 100644 index 0000000..8091cda Binary files /dev/null and b/screenshots/save_text.png differ diff --git a/screenshots/save_tmp_api.png b/screenshots/save_tmp_api.png new file mode 100644 index 0000000..3e7df0f Binary files /dev/null and b/screenshots/save_tmp_api.png differ diff --git a/screenshots/video_pingpong.png b/screenshots/video_pingpong.png new file mode 100644 index 0000000..14d6fe8 Binary files /dev/null and b/screenshots/video_pingpong.png differ diff --git a/screenshots/widget-to-input.png b/screenshots/widget-to-input.png new file mode 100644 index 0000000..e6d84a3 Binary files /dev/null and b/screenshots/widget-to-input.png differ diff --git a/screenshots/write+show_text.png b/screenshots/write+show_text.png new file mode 100644 index 0000000..25370a7 Binary files /dev/null and b/screenshots/write+show_text.png differ