Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: type object 'Yoloworld_ESAM_Zho' has no attribute 'inference_sam_with_boxes' #575

Closed
gsongX opened this issue Apr 28, 2024 · 2 comments

Comments

@gsongX
Copy link

gsongX commented Apr 28, 2024

how to solve this problem?

Snipaste_2024-04-28_18-33-13
workflow.json

Loads EfficientSAM model: (device:CUDA)
!!! Exception during processing!!! type object 'Yoloworld_ESAM_Zho' has no attribute 'inference_sam_with_boxes'
Traceback (most recent call last):
File "D:\AI-Starter\ComfyUI_windows\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\AI-Starter\ComfyUI_windows\ComfyUI\execution.py", line 81, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\AI-Starter\ComfyUI_windows\ComfyUI\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\AI-Starter\ComfyUI_windows\ComfyUI\custom_nodes\ComfyUI-Impact-Pack\modules\impact\detectors.py", line 62, in doit
combined_mask, batch_masks = core.make_sam_mask_segmented(sam_model, segs, image, detection_hint, dilation,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\AI-Starter\ComfyUI_windows\ComfyUI\custom_nodes\ComfyUI-Impact-Pack\modules\impact\core.py", line 835, in make_sam_mask_segmented
detected_masks = sam_obj.predict(image, points, plabs, dilated_bbox, threshold)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\AI-Starter\ComfyUI_windows\ComfyUI\custom_nodes\ComfyUI-Impact-Pack\modules\impact\core.py", line 523, in predict
detected_masks = self.func_inference.inference_sam_with_boxes(image=image, xyxy=[bbox], model=self.model, device=self.device)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: type object 'Yoloworld_ESAM_Zho' has no attribute 'inference_sam_with_boxes'

Prompt executed in 62.15 seconds

@ltdrdata
Copy link
Owner

That depends on this PR. ZHO-ZHO-ZHO/ComfyUI-YoloWorld-EfficientSAM#32
You need to install a/forked version to use ESAM feature since it isn't merged yet.

@gsongX
Copy link
Author

gsongX commented Apr 28, 2024

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants