Skip to content

Commit

Permalink
fix EVF-SAMUltra node options
Browse files Browse the repository at this point in the history
  • Loading branch information
chflame163 committed Aug 28, 2024
1 parent b9199e5 commit c1ebb6c
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -1579,7 +1579,7 @@ Node Options:
* image: The input image.
* model: Select the model. Currently, there are options for evf-sam2 and evf sam.
* presicion: Model accuracy can be selected from fp16, bf16, and fp32.
* load_in_bit: Load the model with positional accuracy. You can choose from 16, 8, and 4.
* load_in_bit: Load the model with positional accuracy. You can choose from full, 8, and 4.
* pormpt: Prompt words used for segmentation.
* detail_method: Edge processing methods. provides VITMatte, VITMatte(local), PyMatting, GuidedFilter. If the model has been downloaded after the first use of VITMatte, you can use VITMatte (local) afterwards.
* detail_erode: Mask the erosion range inward from the edge. the larger the value, the larger the range of inward repair.
Expand Down
2 changes: 1 addition & 1 deletion README_CN.MD
Original file line number Diff line number Diff line change
Expand Up @@ -1557,7 +1557,7 @@ SegmentAnythingUltra的V2升级版,增加了VITMatte边缘处理方法。
* image: 图片输入。
* model: 选择模型。目前有 evf-sam2 和 evf-sam 可选。
* presicion: 模型精度,可选择fp16, bf16 和 fp32。
* load_in_bit: 按位精度加载模型。可选择16,8 和 4。
* load_in_bit: 按位精度加载模型。可选择full, 8 和 4。
* pormpt: 用于分割的提示词。
* detail_method: 边缘处理方法。提供了VITMatte, VITMatte(local), PyMatting, GuidedFilter。如果首次使用VITMatte后模型已经下载,之后可以使用VITMatte(local)。
* detail_erode: 遮罩边缘向内侵蚀范围。数值越大,向内修复的范围越大。
Expand Down
Binary file modified image/evf_sam_ultra_example.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified image/evf_sam_ultra_node.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion py/evf_sam_ultra.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def __init__(self):
def INPUT_TYPES(cls):
model_list = ["evf-sam2","evf-sam"]
precision_list = ["fp16", "bf16", "fp32"]
load_in_bit_list = [16, 8, 4]
load_in_bit_list = ["full", "8", "4"]
method_list = ['VITMatte', 'VITMatte(local)', 'PyMatting', 'GuidedFilter', ]
device_list = ['cuda', 'cpu']
return {"required":
Expand Down Expand Up @@ -62,6 +62,11 @@ def evf_sam_ultra(self, image, model, precision, load_in_bit, prompt,
else:
model_type = 'effi'

if load_in_bit == 'full':
load_in_bit = 16
else:
load_in_bit = int(load_in_bit)

model_path = ""
model_folder_name = 'EVF-SAM'
try:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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.30"
version = "1.0.31"
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", "torchscale", "wandb", "hydra-core", "psd-tools"]

Expand Down

0 comments on commit c1ebb6c

Please sign in to comment.