0xbitches / ComfyUI-LCM

Latent Consistency Model for ComfyUI
GNU General Public License v3.0
252 stars 16 forks source link

IMPORT FAILED Error Comfyui #9

Closed sumeetprashant closed 11 months ago

sumeetprashant commented 11 months ago

lcm_issue

I have tried installing an reinstalling LCM many many times but I am always welcomed by this error at Comfy boot window. Please could anyone let me know what might be going wrong. I am NOT USING Portable Comfy. I have itching to try this out but hasn't had any success in past few days.

Even in A1111, I am just getting noise or black/grey image as final output lcm_a1111

Please folks shine some light and enlighten my path.

zlsl commented 11 months ago

install git version of diffusers pip install git+https://github.com/huggingface/diffusers

M1kep commented 11 months ago

Scroll up more in the console for more details about why it failed.

sumeetprashant commented 11 months ago

Import Failed error got sorted after updating Diffusers (it was installed but was running on 0.16.1)

but now the prompt is not getting interpreted correctly and gibberish unrelated output is coming with some error


LCM inference time: 7.181753158569336 seconds ERROR:root:!!! Exception during processing !!! ERROR:root:Traceback (most recent call last): File "Z:\Comfy UI\Comfy_new\ComfyUI\execution.py", line 153, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "Z:\Comfy UI\Comfy_new\ComfyUI\execution.py", line 83, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "Z:\Comfy UI\Comfy_new\ComfyUI\execution.py", line 76, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) File "Z:\Comfy UI\Comfy_new\ComfyUI\nodes.py", line 476, in load_checkpoint out = comfy.sd.load_checkpoint_guess_config(ckpt_path, output_vae=True, output_clip=True, embedding_directory=folder_paths.get_folder_paths("embeddings")) File "Z:\Comfy UI\Comfy_new\ComfyUI\comfy\sd.py", line 416, in load_checkpoint_guess_config model_config = model_detection.model_config_from_unet(sd, "model.diffusion_model.", unet_dtype) File "Z:\Comfy UI\Comfy_new\ComfyUI\comfy\model_detection.py", line 120, in model_config_from_unet unet_config = detect_unet_config(state_dict, unet_key_prefix, dtype) File "Z:\Comfy UI\Comfy_new\ComfyUI\comfy\model_detection.py", line 36, in detect_unet_config model_channels = state_dict['{}input_blocks.0.0.weight'.format(key_prefix)].shape[0] KeyError: 'model.diffusion_model.input_blocks.0.0.weight'

Prompt executed in 7.92 seconds

sumeetprashant commented 11 months ago

This is sorted now, not being stupid (just updating diffusers) was the workflow needed and I somehow managed to not be stupid for 30 minutes and got rid of the issue.