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

ImportError: cannot import name 'prepare_mask' #136

Open
makeitrad opened this issue Apr 5, 2024 · 2 comments
Open

ImportError: cannot import name 'prepare_mask' #136

makeitrad opened this issue Apr 5, 2024 · 2 comments

Comments

@makeitrad
Copy link

With the latest update to Comfy it's reporting the following error and will not load:

0.1 seconds (IMPORT FAILED): /home/zvi/ComfyUI/custom_nodes/SeargeSDXL

`Searge-SDXL v4.3.1 in /home/zvi/ComfyUI/custom_nodes/SeargeSDXL
Traceback (most recent call last):
File "/home/zvi/ComfyUI/nodes.py", line 1889, in load_custom_node
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/home/zvi/ComfyUI/custom_nodes/SeargeSDXL/init.py", line 35, in
from .searge_sdxl import SEARGE_CLASS_MAPPINGS, SEARGE_DISPLAY_NAME_MAPPINGS
File "/home/zvi/ComfyUI/custom_nodes/SeargeSDXL/searge_sdxl.py", line 54, in
from .modules.magic_box import SeargeMagicBox
File "/home/zvi/ComfyUI/custom_nodes/SeargeSDXL/modules/magic_box.py", line 38, in
from .stage_latent_detailer import SeargeStageLatentDetailer
File "/home/zvi/ComfyUI/custom_nodes/SeargeSDXL/modules/stage_latent_detailer.py", line 29, in
from comfy.sample import prepare_mask
ImportError: cannot import name 'prepare_mask' from 'comfy.sample' (/home/zvi/ComfyUI/comfy/sample.py)

Cannot import /home/zvi/ComfyUI/custom_nodes/SeargeSDXL module for custom nodes: cannot import name 'prepare_mask' from 'comfy.sample' (/home/zvi/ComfyUI/comfy/sample.py)`

@jundao17
Copy link

easy fix
Error: from comfy.sample import prepare_mask
Fixed: from comfy.sampler_helpers import prepare_mask

@makeitrad
Copy link
Author

Thanks for the fix!

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