kealiu / ComfyUI-Zero123-Porting

ComfyUI Node for Zero-1-to-3: Zero-shot One Image to 3D Object
Apache License 2.0
19 stars 5 forks source link

cannot import name 'VectorQuantizer2' from 'taming.modules.vqvae.quantize' #5

Open niko2020 opened 2 months ago

niko2020 commented 2 months ago

Hi, has anyone ever encountered this error when using node "Zero123: Image Rotate in 3D"?

Error occurred when executing Zero123: Image Rotate in 3D:

cannot import name 'VectorQuantizer2' from 'taming.modules.vqvae.quantize' (/workspace/venv_nextgen/lib/python3.10/site-packages/taming/modules/vqvae/quantize.py)

File "/workspace/ComfyUI/execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "/workspace/ComfyUI/execution.py", line 81, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "/workspace/ComfyUI/execution.py", line 74, in map_node_over_list results.append(getattr(obj, func)(slice_dict(input_data_all, i))) File "/workspace/ComfyUI/custom_nodes/ComfyUI-Zero123-Porting/zero123_nodes.py", line 111, in moveCam model, device = load_model(folder_paths.get_full_path("checkpoints", checkpoint), hf=fp16) File "/workspace/ComfyUI/custom_nodes/ComfyUI-Zero123-Porting/zero123_nodes.py", line 37, in load_model g_model = init_model(g_device, checkpoint, half_precision=hf) File "/workspace/ComfyUI/custom_nodes/ComfyUI-Zero123-Porting/zero123.py", line 47, in init_model model = torch.compile(load_model_from_config(config, ckpt, device=device)) File "/workspace/ComfyUI/custom_nodes/ComfyUI-Zero123-Porting/zero123.py", line 23, in load_model_from_config model = instantiate_from_config(config.model) File "/workspace/ComfyUI/custom_nodes/ComfyUI-Zero123-Porting/ldm/util.py", line 138, in instantiate_from_config return get_obj_from_str(config["target"])(config.get("params", dict())) File "/workspace/ComfyUI/custom_nodes/ComfyUI-Zero123-Porting/ldm/util.py", line 146, in get_obj_from_str return getattr(importlib.import_module(module, package=None), cls) File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1006, in _find_and_load_unlocked File "", line 688, in _load_unlocked File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "/workspace/ComfyUI/custom_nodes/ComfyUI-Zero123-Porting/ldm/models/diffusion/ddpm.py", line 26, in from ldm.models.autoencoder import VQModelInterface, IdentityFirstStage, AutoencoderKL File "/workspace/ComfyUI/custom_nodes/ComfyUI-Zero123-Porting/ldm/models/autoencoder.py", line 6, in from taming.modules.vqvae.quantize import VectorQuantizer2 as VectorQuantizer

kealiu commented 2 months ago

please refer https://github.com/kealiu/ComfyUI-Zero123-Porting/issues/3

seems related to : https://github.com/CompVis/stable-diffusion/issues/72