diff --git a/README.MD b/README.MD index a7b205d..f6478c5 100644 --- a/README.MD +++ b/README.MD @@ -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. diff --git a/README_CN.MD b/README_CN.MD index 05a1b62..a26e8b8 100644 --- a/README_CN.MD +++ b/README_CN.MD @@ -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: 遮罩边缘向内侵蚀范围。数值越大,向内修复的范围越大。 diff --git a/image/evf_sam_ultra_example.jpg b/image/evf_sam_ultra_example.jpg index e16012b..ed747af 100644 Binary files a/image/evf_sam_ultra_example.jpg and b/image/evf_sam_ultra_example.jpg differ diff --git a/image/evf_sam_ultra_node.jpg b/image/evf_sam_ultra_node.jpg index 6d2bc95..e45626d 100644 Binary files a/image/evf_sam_ultra_node.jpg and b/image/evf_sam_ultra_node.jpg differ diff --git a/py/evf_sam_ultra.py b/py/evf_sam_ultra.py index 9c44ffb..6decd5d 100644 --- a/py/evf_sam_ultra.py +++ b/py/evf_sam_ultra.py @@ -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": @@ -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: diff --git a/pyproject.toml b/pyproject.toml index 6606267..c7e35b1 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.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"]