From a65d78f1b7d9595ee9415c8795ba3398d714ca99 Mon Sep 17 00:00:00 2001 From: justumen Date: Thu, 12 Sep 2024 12:57:49 +0200 Subject: [PATCH] add requirements.txt --- README.md | 16 ++++++++++++++++ __init__.py | 7 +++++-- free_vram_hack.py | 4 ++-- pyproject.toml | 2 +- 4 files changed, 24 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 976d8b3..2dc3358 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,21 @@ # πŸ”— Comfyui : Bjornulf_custom_nodes v0.21 πŸ”— +# ☁ Usage in cloud : + +If you want to use my nodes and comfyui in the cloud, I'm managing an optimized template on runpod : +Template name : `bjornulf-comfyui-allin-workspace`, can be operational in ~3 minutes. (Depending on your pod) +⚠️ You need to open a terminal in browser (After clicking on `connect` from your pod) and use this to launch ComfyUI : `cd /workspace/ComfyUI && python main.py --listen 0.0.0.0 --port 3000` (Much better to control it with a terminal, check logs, etc...) +After that you can just click on the `Connect to port 3000` button. +If you have any issues with it, please let me know. +You need to create and select a network volume, size is up to you, i have 50Gb Storage because i use cloud only for Flux or lora training on a 4090. (~0.7$/hour) +It will manage everything in Runpod network storage (`/workspace/ComfyUI`), so you can stop and start the cloud GPU without losing anything, change GPU or whatever. +Zone : I recommend `EU-RO-1`, but up to you. +Top-up your Runpod account with minimum 10$ to start. +⚠️ Warning, you will pay by the minute, so not recommended for testing or learning comfyui. Do that locally !!! +Run cloud GPU only when you already have your workflow ready to run. +Advice : take a cheap GPU for testing, downloading models or so one. + + # 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`) diff --git a/__init__.py b/__init__.py index a67643e..1772760 100644 --- a/__init__.py +++ b/__init__.py @@ -39,7 +39,8 @@ from .image_mask_cutter import ImageMaskCutter from .character_description import CharacterDescriptionGenerator from .text_to_speech import TextToSpeech from .loop_combine_texts_by_lines import CombineTextsByLines -from .free_vram_hack import FreeVRAMNode +from .free_vram_hack import FreeVRAM +# from .pause_resume import PauseResume # from .check_black_image import CheckBlackImage # from .clear_vram import ClearVRAM @@ -48,7 +49,8 @@ from .free_vram_hack import FreeVRAMNode NODE_CLASS_MAPPINGS = { # "Bjornulf_CustomStringType": CustomStringType, "Bjornulf_ollamaLoader": ollamaLoader, - "Bjornulf_FreeVRAM": FreeVRAMNode, + # "Bjornulf_PauseResume": PauseResume, + "Bjornulf_FreeVRAM": FreeVRAM, "Bjornulf_CombineTextsByLines": CombineTextsByLines, "Bjornulf_TextToSpeech": TextToSpeech, "Bjornulf_CharacterDescriptionGenerator": CharacterDescriptionGenerator, @@ -96,6 +98,7 @@ NODE_CLASS_MAPPINGS = { NODE_DISPLAY_NAME_MAPPINGS = { # "Bjornulf_CustomStringType": "!!! CUSTOM STRING TYPE !!!", "Bjornulf_ollamaLoader": "πŸ¦™ Ollama (Description)", + # "Bjornulf_PauseResume": "⏸️ Pause/Resume", "Bjornulf_FreeVRAM": "🧹 Free VRAM hack", "Bjornulf_CombineTextsByLines": "β™» Loop (All Lines from input πŸ”— combine by lines)", "Bjornulf_TextToSpeech": "πŸ”Š TTS - Text to Speech", diff --git a/free_vram_hack.py b/free_vram_hack.py index 0307667..c277070 100644 --- a/free_vram_hack.py +++ b/free_vram_hack.py @@ -3,14 +3,14 @@ import gc import requests import json -class FreeVRAMNode: +class FreeVRAM: @classmethod def INPUT_TYPES(s): return {"required": {"image": ("IMAGE",)}} RETURN_TYPES = ("IMAGE",) FUNCTION = "free_vram" - CATEGORY = "memory_management" + CATEGORY = "Bjornulf" def free_vram(self, image): print("Attempting to free VRAM...") diff --git a/pyproject.toml b/pyproject.toml index ed40524..f4f2b30 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "bjornulf_custom_nodes" -description = "Nodes: Ollama, Text to Speech, Save image for Bjornulf LobeChat, Text with random Seed, Random line from input, Combine images (Background+Overlay alpha), Image to grayscale (black & white), Remove image Transparency (alpha), Resize Image, ..." +description = "Nodes: Ollama, Text to Speech, Save image for Bjornulf LobeChat, Text with random Seed, Random line from input, Combine images (Background + Overlay alpha), Image to grayscale (black & white), Remove image Transparency (alpha), Resize Image, ..." version = "0.21" license = {file = "LICENSE"}