-
Notifications
You must be signed in to change notification settings - Fork 63
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
One of the more recent updates have broken SeargeSDXL nodes and it fails to load. #137
Comments
Same here: Searge-SDXL v4.3.1 in /run/media/AI/StabilityMatrix-linux-x64/Data/Packages/ComfyUI/custom_nodes/SeargeSDXL Cannot import /run/media/AI/StabilityMatrix-linux-x64/Data/Packages/ComfyUI/custom_nodes/SeargeSDXL module for custom nodes: cannot import name 'prepare_mask' from 'comfy.sample' (/run/media/AI/StabilityMatrix-linux-x64/Data/Packages/ComfyUI/comfy/sample.py) |
Some of the Comfy sample settings have been moved. in the file "SeargeSDXL\Modules\stage_latent_detailer.py" at line 29 change from comfy.sample import prepare_mask to from comfy.sampler_helpers import prepare_mask That should fix it. |
EDIT: I made a PR (#140) for a permanent solution. The fix described here is no longer needed! As stated it was a very hacky temporary solution.@Arron17 This fix works for loading the modules. However custom_sdxl_ksampler.py also got broken by these changes, but the error only occurs when actually trying to run the SDLX Sampler v3 module. I tried some quick fixes that just led to errors in different places, so for now I went with a temporary solution: Instead of adjusting SeargeSDXL you can edit the sample.py and sampler.py and revert them to older versions. Obviously this fix is very temporary and will eventually stop working, so changes to SeargeSDXL are definitely needed. |
This fixed it for me - thank you |
This happened in a Debian environment:
_Trying to load custom node /media/drives/16TB/ComfyUI/custom_nodes/SeargeSDXL
Searge-SDXL v4.3.1 in /media/drives/16TB/ComfyUI/custom_nodes/SeargeSDXL
Traceback (most recent call last):
File "/media/drives/16TB/ComfyUI/nodes.py", line 1889, in load_custom_node
module_spec.loader.exec_module(module)
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "/media/drives/16TB/ComfyUI/custom_nodes/SeargeSDXL/__init__.py", line 35, in
from .searge_sdxl import SEARGE_CLASS_MAPPINGS, SEARGE_DISPLAY_NAME_MAPPINGS
File "/media/drives/16TB/ComfyUI/custom_nodes/SeargeSDXL/searge_sdxl.py", line 54, in
from .modules.magic_box import SeargeMagicBox
File "/media/drives/16TB/ComfyUI/custom_nodes/SeargeSDXL/modules/magic_box.py", line 38, in
from .stage_latent_detailer import SeargeStageLatentDetailer
File "/media/drives/16TB/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' (/media/drives/16TB/ComfyUI/comfy/sample.py)
Will try the above mentioned work-arounds. ======= Update: |
I managed to fix the errors caused by the changes to sample.py etc: However there was another recent change that I don't know how to deal with. Relevant commit: Another user also reported running into the same error, but with another sampler module, so let's see if it can be resolved on their side, or if more changes to this project are needed. |
I commented out the line 29 of stage_latent_detailer.py , it let searge loads as module, and I could get back my workflow running. but not sure it will not run into some issue later. |
this broke my comfy somewhat:
|
I have an open PR that should fix everything described here. Just get the newest version of comfyUI and this module and then adjust the files changed in my PR. #140 The last change to this repo was 5 months ago so I don't know how fast my PR will be merged. |
Traceback (most recent call last):
File "C:\ProgramData\anaconda3\envs\ComfyUI\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 "C:\ProgramData\anaconda3\envs\ComfyUI\ComfyUI\custom_nodes\SeargeSDXL_init.py", line 35, in
from .searge_sdxl import SEARGE_CLASS_MAPPINGS, SEARGE_DISPLAY_NAME_MAPPINGS
File "C:\ProgramData\anaconda3\envs\ComfyUI\ComfyUI\custom_nodes\SeargeSDXL\searge_sdxl.py", line 54, in
from .modules.magic_box import SeargeMagicBox
File "C:\ProgramData\anaconda3\envs\ComfyUI\ComfyUI\custom_nodes\SeargeSDXL\modules\magic_box.py", line 38, in
from .stage_latent_detailer import SeargeStageLatentDetailer
File "C:\ProgramData\anaconda3\envs\ComfyUI\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' (C:\ProgramData\anaconda3\envs\ComfyUI\ComfyUI\comfy\sample.py)
The text was updated successfully, but these errors were encountered: