diff --git a/py/birefnet_ultra_v2.py b/py/birefnet_ultra_v2.py index 0c13366..6964439 100644 --- a/py/birefnet_ultra_v2.py +++ b/py/birefnet_ultra_v2.py @@ -1,3 +1,4 @@ +import os import sys import torch from torchvision import transforms @@ -91,7 +92,7 @@ class LS_BiRefNetUltraV2: local_files_only = False torch.set_float32_matmul_precision(['high', 'highest'][0]) - birefnet_model.to('cuda') + birefnet_model.to(device) birefnet_model.eval() @@ -105,7 +106,7 @@ class LS_BiRefNetUltraV2: transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225]) ]) - inference_image = transform_image(orig_image).unsqueeze(0).to('cuda') + inference_image = transform_image(orig_image).unsqueeze(0).to(device) # Prediction with torch.no_grad(): diff --git a/pyproject.toml b/pyproject.toml index 6042b7e..2f0aa73 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "comfyui_layerstyle" description = "A set of nodes for ComfyUI it generate image like Adobe Photoshop's Layer Style. the Drop Shadow is first completed node, and follow-up work is in progress." -version = "1.0.46" +version = "1.0.47" license = "MIT" dependencies = ["numpy", "pillow", "torch", "matplotlib", "Scipy", "scikit_image", "opencv-contrib-python", "pymatting", "segment_anything", "timm", "addict", "yapf", "colour-science", "wget", "mediapipe", "loguru", "typer_config", "fastapi", "rich", "google-generativeai", "diffusers", "omegaconf", "tqdm", "transformers", "kornia", "image-reward", "ultralytics", "blend_modes", "blind-watermark", "qrcode", "pyzbar", "transparent-background", "huggingface_hub", "accelerate", "bitsandbytes", "torchscale", "wandb", "hydra-core", "psd-tools", "inference-cli[yolo-world]", "inference-gpu[yolo-world]", "onnxruntime"]