Close to working but issue with '_load_state_dict_into_model'
I think I have the environment set up properly to have the plugin working but I still get this issue when loading the custom plugin into ComfyUI:
File "C:\Users\*\Documents\comfy\ComfyUI\custom_nodes\ComfyUI-3D-Pack\Gen_3D_Modules\CharacterGen\Stage_2D\tuneavideo\models\unet_mv2d_condition.py", line 40, in <module> from diffusers.models.modeling_utils import ModelMixin, load_state_dict, _load_state_dict_into_model ImportError: cannot import name '_load_state_dict_into_model' from 'diffusers.models.modeling_utils' (C:\Users\*\Documents\comfy\comfy-env\Lib\site-packages\diffusers\models\modeling_utils.py)
I followed the steps here:
https://github.com/MrForExample/ComfyUI-3D-Pack/issues/487#issuecomment-2993597358
Which seems to resolve all the dependencies, but I did get a version error for:
numpy being higher than 2.3 so I downgraded it (not sure if that could cause the above issue)
pip install --force-reinstall numpy==2.2.6
Any suggestions are welcome.
Thanks!
I skipped the issue by removing CharacterGen from the packages that the plugin uses. But it seems that even though some models like Hunyuan 2.1 work there is always something that does not like texture generation due to the custom_rasterizer_kernel issue. Does anyone have the full plugin with all the models/parts working?
@fxlab you can fix custom_rasterize by running this bat script:
https://github.com/MrForExample/ComfyUI-3D-Pack/blob/main/Gen_3D_Modules/Hunyuan3D_2_1/hy3dpaint/DifferentiableRenderer/compile_mesh_painter.bat
It’s already included in the prebuilt wheels, but sometimes the build fails — in that case you can run it manually. Texturing still works without it, just a bit slower.
I solved the ImportError: cannot import name '_load_state_dict_into_model' error by downgrading to diffusers 0.31.0