Need diffusers==0.35.0(for qwen image edit nunchaku), but Comfyui-3D-PAck not working(import failed), only until diffusers==0.34.0 ?? Will there be an update?
Need diffusers==0.35.0(for qwen image edit nunchaku), but Comfyui-3D-PAck not working(import failed), only until diffusers==0.34.0 ?? Will there be an update?
Warn!: Traceback (most recent call last):
File "d:\comfyui.git\app\nodes.py", line 2129, in load_custom_node
module_spec.loader.exec_module(module)
File "
Warn!: Cannot import D:\comfyui.git\app\custom_nodes\ComfyUI-3D-Pack module for custom nodes: cannot import name '_load_state_dict_into_model' from 'diffusers.models.modeling_utils' (D:\comfyui.git\app\env\lib\site-packages\diffusers\models\modeling_utils.py)
@mkat2 will take a look into this, thanks
Hi i add the same problem and i have a workaround if you are interested. _load_state_dict_into_model is no longer used
If you are in a hurry the workaroud that i am currently using is that:
replace
from diffusers.models.modeling_utils import ModelMixin, load_state_dict, _load_state_dict_into_model
with
from diffusers.models.modeling_utils import ModelMixin, load_state_dict
(Basically remove the last entry)
and then replace
if state_dict is not None:
# Whole checkpoint
mismatched_keys = _find_mismatched_keys(
state_dict,
model_state_dict,
original_loaded_keys,
ignore_mismatched_sizes,
)
error_msgs = _load_state_dict_into_model(model_to_load, state_dict)
with
if state_dict is not None:
# Whole checkpoint
load_info = model_to_load.load_state_dict(state_dict, strict=False)
(it is easy to find if you search in the file for "_load_state_dict_into_model") It works with diffusers 0.35.1 but you are suppressing the error_msgs (i have no idea what to do with load_info) so if you want something better you have to wait an official fix. Also if i remember well there are 4 files that use the _load_state_dict_into_model so you have to make this modification 4 times.
@No1Idle thanks a lot man, you’re right. We’ll fix this later, really appreciate you providing solutions for users — super helpful! You can also create a pull request and be a contributor, it’s very much appreciated!
Thanks @No1Idle ! I adjusted the code in 4 files and the node loads successful now.
Guys it would be super helpful if instead of "the file" and "4 files" you could be specific about what files (eg. path/from/root/filename.py) for intellectually challenged individuals like myself.