Skip to content

Commit 9b4348d

Browse files
committed
Added new nodes for multimodality. Added new nodes for background removal. Added more instructions and explanations.
1 parent 1d02157 commit 9b4348d

File tree

11 files changed

+1310
-24
lines changed

11 files changed

+1310
-24
lines changed

__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ def check_requirements_installed(requirements_path):
3535
init()
3636

3737
node_list = [
38+
"image.birefnet_LP",
39+
"image.rmbg_LP",
40+
"image.rembg_LP",
3841
"llm.llm_LP",
3942
"vlm.autotagger_LP",
4043
"vlm.llava_LP",

install_init.py

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ def install_llama(system_info):
154154

155155
# Build from source with appropriate acceleration
156156
try:
157+
print("WARNING: Building the llama-cpp-python wheels can take UP TO AN HOUR due to the specific build conditions. This is not an error, just wait.")
157158
if system_info.get('metal', False):
158159
print("Building llama-cpp-python from source with Metal support")
159160
os.environ['CMAKE_ARGS'] = "-DGGML_METAL=on"
@@ -327,17 +328,6 @@ def get_comfy_dir(subpath=None, mkdir=False):
327328
def should_install_js():
328329
return not hasattr(PromptServer.instance, "supports") or "custom_nodes_from_web" not in PromptServer.instance.supports
329330

330-
def has_nvidia_cuda():
331-
try:
332-
output = subprocess.check_output(
333-
['nvidia-smi', '--query-gpu=name', '--format=csv,noheader'],
334-
stderr=subprocess.DEVNULL,
335-
encoding='utf-8'
336-
).strip()
337-
return bool(output)
338-
except (subprocess.CalledProcessError, FileNotFoundError):
339-
return False
340-
341331
def is_installed(pkg_name: str, min_version: str = '') -> bool:
342332
try:
343333
ver = metadata.version(pkg_name)
@@ -354,7 +344,8 @@ def uninstall(pkg: str):
354344
subprocess.check_call([sys.executable, '-m', 'pip', 'uninstall', '-y', pkg])
355345

356346
def install_onnxruntime():
357-
gpu = has_nvidia_cuda()
347+
import torch
348+
gpu = torch.cuda.is_available()
358349
print(f"Found NVIDIA GPU: {gpu}")
359350
if gpu:
360351
if is_installed('onnxruntime'):

node_list.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,9 @@
99
"LLava Sampler Advanced [LP]":"Generates text using the VLM. Advanced settings.",
1010
"LLava Simple [LP]":"Generates text using the loaded VLM from LLava Loader. Simple settings.",
1111
"LLava Advanced [LP]":"Generates text using the loaded VLM from LLava Loader. Advanced settings.",
12-
"Recognize Anything (RAM) [LP]":"Recognize Anything (RAM) - node for generating tags for an image using the Recognize Anything Plus Model"
12+
"Recognize Anything (RAM) [LP]":"Recognize Anything (RAM) - node for generating tags for an image using the Recognize Anything Plus Model",
13+
"Image Remove Background (rembg) [LP]":"Removes background for images with user-defined model. This node uses the rembg library. It is NOT recommended for use in normal scenarios.",
14+
"Image Remove Background (BiRefNet) [LP]":"Removes background for images with user-defined model type of BiRefNet. Recommended for fast and high-quality background removal",
15+
"Image Remove Background (RMBG) [LP]":"Removes background for images with user-defined model. This node uses the RMBG models. Recommended for ultra-high precision",
16+
"Multimodal Generator Advanced [LP]":"Node for Multimodal neural models based on GGUF. Supports Qwen2.5-VL of GGUF format. Based on llama-mtmd."
1317
}

0 commit comments

Comments
 (0)