shiimizu / ComfyUI_smZNodes

Custom nodes for ComfyUI such as CLIP Text Encode++
GNU General Public License v3.0
216 stars 16 forks source link

One of the more recent updates have broken smZNodes and it fails to load #63

Closed axdwct closed 7 months ago

axdwct commented 7 months ago

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\ComfyUI_smZNodes__init__.py", line 55, in from .nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS File "C:\ProgramData\anaconda3\envs\ComfyUI\ComfyUI\custom_nodes\ComfyUI_smZNodes\nodes.py", line 7, in from .modules.sd_hijack import model_hijack File "C:\ProgramData\anaconda3\envs\ComfyUI\ComfyUI\custom_nodes\ComfyUI_smZNodes\modules\sd_hijack.py", line 12, in from ..smZNodes import FrozenCLIPEmbedderWithCustomWordsCustom, FrozenOpenCLIPEmbedder2WithCustomWordsCustom, get_learned_conditioning File "C:\ProgramData\anaconda3\envs\ComfyUI\ComfyUI\custom_nodes\ComfyUI_smZNodes\smZNodes.py", line 954, in CFGNoisePredictorOrig = comfy.samplers.CFGNoisePredictor AttributeError: module 'comfy.samplers' has no attribute 'CFGNoisePredictor'

DreamLoveBetty commented 7 months ago

It seems that the updated smznodes.py defines a CFGNoisePreditorOrig class method to be imported into a class from comfy/samplers. py, but there is no implementation for this class in comfy/samplers. py. Request an update to resolve the issue.

fernicar commented 7 months ago

For now you can delete this line from "custom_nodes\ComfyUI_smZNodes\smZNodes.py": https://github.com/shiimizu/ComfyUI_smZNodes/blob/52fb739a640366eb3ef18be4ecccd87c3a5fd8e8/smZNodes.py#L954

and you can replace the next line: https://github.com/shiimizu/ComfyUI_smZNodes/blob/52fb739a640366eb3ef18be4ecccd87c3a5fd8e8/smZNodes.py#L955 to this line: class CFGNoisePredictor():

to workaround until the next update.

alenknight commented 7 months ago

For now you can delete this line from "custom_nodes\ComfyUI_smZNodes\smZNodes.py":

https://github.com/shiimizu/ComfyUI_smZNodes/blob/52fb739a640366eb3ef18be4ecccd87c3a5fd8e8/smZNodes.py#L954

and you can replace the next line:

https://github.com/shiimizu/ComfyUI_smZNodes/blob/52fb739a640366eb3ef18be4ecccd87c3a5fd8e8/smZNodes.py#L955

to this line: class CFGNoisePredictor(): to workaround until the next update.

thank you! this worked for now! appreciate it

SquidPuffer commented 7 months ago

For now you can delete this line from "custom_nodes\ComfyUI_smZNodes\smZNodes.py":

https://github.com/shiimizu/ComfyUI_smZNodes/blob/52fb739a640366eb3ef18be4ecccd87c3a5fd8e8/smZNodes.py#L954

and you can replace the next line:

https://github.com/shiimizu/ComfyUI_smZNodes/blob/52fb739a640366eb3ef18be4ecccd87c3a5fd8e8/smZNodes.py#L955

to this line: class CFGNoisePredictor(): to workaround until the next update.

Thanks, worked.

HydraBucket commented 7 months ago

I couldnt get this working... Can I have a link to a git to clone to replace my node?