Acly / krita-ai-diffusion

Streamlined interface for generating images with AI in Krita. Inpaint and outpaint with optional text prompt, no tweaking required.
https://www.interstice.cloud
GNU General Public License v3.0
6.3k stars 301 forks source link

Server execution error: expected query, key and value to have the same dtype #345

Closed ricewind100 closed 7 months ago

ricewind100 commented 7 months ago

image

After updating, whenever I use any control function, this happens

ricewind100 commented 7 months ago

This error occurs when using "reference" or "face", the others do work it seems

ricewind100 commented 7 months ago

client log 2024-01-20 14:51:40,764 INFO Server terminated with code 1 2024-01-20 14:52:06,825 INFO Connecting to http://127.0.0.1:8188 2024-01-20 14:52:06,887 INFO Found ControlNet model inpaint for SD 1.5: control_v11p_sd15_inpaint_fp16.safetensors 2024-01-20 14:52:06,887 INFO Found ControlNet model scribble for SD 1.5: control_lora_rank128_v11p_sd15_scribble_fp16.safetensors 2024-01-20 14:52:06,887 INFO Found ControlNet model scribble for SD XL: sai_xl_sketch_256lora.safetensors 2024-01-20 14:52:06,887 INFO Found ControlNet model line_art for SD 1.5: control_v11p_sd15_lineart_fp16.safetensors 2024-01-20 14:52:06,888 INFO Found ControlNet model line_art for SD XL: sai_xl_sketch_256lora.safetensors 2024-01-20 14:52:06,888 INFO Found ControlNet model soft_edge for SD 1.5: control_v11p_sd15_softedge_fp16.safetensors 2024-01-20 14:52:06,888 INFO Found ControlNet model canny_edge for SD 1.5: control_v11p_sd15_canny_fp16.safetensors 2024-01-20 14:52:06,888 INFO Found ControlNet model canny_edge for SD XL: sai_xl_canny_256lora.safetensors 2024-01-20 14:52:06,889 INFO Found ControlNet model depth for SD 1.5: control_lora_rank128_v11f1p_sd15_depth_fp16.safetensors 2024-01-20 14:52:06,889 INFO Found ControlNet model depth for SD XL: sai_xl_depth_256lora.safetensors 2024-01-20 14:52:06,889 INFO Found ControlNet model normal for SD 1.5: control_lora_rank128_v11p_sd15_normalbae_fp16.safetensors 2024-01-20 14:52:06,889 INFO Found ControlNet model pose for SD 1.5: control_lora_rank128_v11p_sd15_openpose_fp16.safetensors 2024-01-20 14:52:06,890 INFO Found ControlNet model pose for SD XL: thibaud_xl_openpose_256lora.safetensors 2024-01-20 14:52:06,890 INFO Found ControlNet model segmentation for SD 1.5: control_lora_rank128_v11p_sd15_seg_fp16.safetensors 2024-01-20 14:52:06,890 INFO Found ControlNet model blur for SD 1.5: control_lora_rank128_v11f1e_sd15_tile_fp16.safetensors 2024-01-20 14:52:06,890 INFO Found ControlNet model stencil for SD 1.5: control_v1p_sd15_qrcode_monster.safetensors 2024-01-20 14:52:06,891 INFO Found ControlNet model hands for SD 1.5: control_sd15_inpaint_depth_hand_fp16.safetensors 2024-01-20 14:52:06,891 INFO Found ControlNet model hands for SD XL: sai_xl_depth_256lora.safetensors 2024-01-20 14:52:06,891 INFO Found CLIP Vision model ip_adapter for All: SD1.5\model.safetensors 2024-01-20 14:52:06,891 INFO Found IP-Adapter model reference for SD 1.5: ip-adapter_sd15.safetensors 2024-01-20 14:52:06,892 INFO Found IP-Adapter model reference for SD XL: ip-adapter_sdxl_vit-h.safetensors 2024-01-20 14:52:06,892 INFO Found IP-Adapter model face for SD 1.5: ip-adapter-faceid-plusv2_sd15.bin 2024-01-20 14:52:06,892 INFO Found IP-Adapter model face for SD XL: ip-adapter-faceid-plusv2_sdxl.bin 2024-01-20 14:52:06,892 INFO Found Upscale model default for All: 4x_NMKD-Superscale-SP_178000_G.pth 2024-01-20 14:52:06,893 INFO Found Upscale model fast_2x for All: OmniSR_X2_DIV2K.safetensors 2024-01-20 14:52:06,893 INFO Found Upscale model fast_3x for All: OmniSR_X3_DIV2K.safetensors 2024-01-20 14:52:06,893 INFO Found Upscale model fast_4x for All: OmniSR_X4_DIV2K.safetensors 2024-01-20 14:52:06,893 INFO Found LoRA model lcm for SD 1.5: lcm-lora-sdv1-5.safetensors 2024-01-20 14:52:06,893 INFO Found LoRA model lcm for SD XL: lcm-lora-sdxl.safetensors 2024-01-20 14:52:06,894 INFO Found LoRA model face for SD 1.5: ip-adapter-faceid-plusv2_sd15_lora.safetensors 2024-01-20 14:52:06,894 INFO Found LoRA model face for SD XL: ip-adapter-faceid-plusv2_sdxl_lora.safetensors 2024-01-20 14:52:07,614 INFO SD 1.5: supported 2024-01-20 14:52:07,615 INFO SD XL: supported 2024-01-20 14:53:23,099 ERROR Job 0d3e37a4-d0be-40e2-9d36-633fefd58722 failed: Expected query, key, and value to have the same dtype, but got query.dtype: struct c10::Half key.dtype: float and value.dtype: float instead. [' File "D:\IA KRITA\ComfyUI\execution.py", line 155, in recursive_execute\n output_data, output_ui = get_output_data(obj, input_data_all)\n', ' File "D:\IA KRITA\ComfyUI\execution.py", line 85, in get_output_data\n return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)\n', ' File "D:\IA KRITA\ComfyUI\execution.py", line 78, in map_node_over_list\n results.append(getattr(obj, func)(slice_dict(input_data_all, i)))\n', ' File "D:\IA KRITA\ComfyUI\nodes.py", line 1389, in sample\n return common_ksampler(model, noise_seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, denoise=denoise, disable_noise=disable_noise, start_step=start_at_step, last_step=end_at_step, force_full_denoise=force_full_denoise)\n', ' File "D:\IA KRITA\ComfyUI\nodes.py", line 1325, in common_ksampler\n samples = comfy.sample.sample(model, noise, steps, cfg, sampler_name, scheduler, positive, negative, latent_image,\n', ' File "D:\IA KRITA\ComfyUI\comfy\sample.py", line 100, in sample\n samples = sampler.sample(noise, positive_copy, negative_copy, cfg=cfg, latent_image=latent_image, start_step=start_step, last_step=last_step, force_full_denoise=force_full_denoise, denoise_mask=noise_mask, sigmas=sigmas, callback=callback, disable_pbar=disable_pbar, seed=seed)\n', ' File "D:\IA KRITA\ComfyUI\comfy\samplers.py", line 716, in sample\n return sample(self.model, noise, positive, negative, cfg, self.device, sampler, sigmas, self.model_options, latent_image=latent_image, denoise_mask=denoise_mask, callback=callback, disable_pbar=disable_pbar, seed=seed)\n', ' File "D:\IA KRITA\ComfyUI\comfy\samplers.py", line 622, in sample\n samples = sampler.sample(model_wrap, sigmas, extra_args, callback, noise, latent_image, denoise_mask, disable_pbar)\n', ' File "D:\IA KRITA\ComfyUI\comfy\samplers.py", line 561, in sample\n samples = self.sampler_function(model_k, noise, sigmas, extra_args=extra_args, callback=k_callback, disable=disable_pbar, self.extra_options)\n', ' File "D:\IA KRITA\python\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context\n return func(*args, kwargs)\n', ' File "D:\IA KRITA\ComfyUI\comfy\k_diffusion\sampling.py", line 154, in sample_euler_ancestral\n denoised = model(x, sigmas[i] * s_in, *extra_args)\n', ' File "D:\IA KRITA\python\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl\n return self._call_impl(args, kwargs)\n', ' File "D:\IA KRITA\python\lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl\n return forward_call(*args, kwargs)\n', ' File "D:\IA KRITA\ComfyUI\comfy\samplers.py", line 285, in forward\n out = self.inner_model(x, sigma, cond=cond, uncond=uncond, cond_scale=cond_scale, model_options=model_options, seed=seed)\n', ' File "D:\IA KRITA\python\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl\n return self._call_impl(*args, *kwargs)\n', ' File "D:\IA KRITA\python\lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl\n return forward_call(args, kwargs)\n', ' File "D:\IA KRITA\ComfyUI\comfy\samplers.py", line 275, in forward\n return self.apply_model(*args, kwargs)\n', ' File "D:\IA KRITA\ComfyUI\comfy\samplers.py", line 272, in apply_model\n out = sampling_function(self.inner_model, x, timestep, uncond, cond, cond_scale, model_options=model_options, seed=seed)\n', ' File "D:\IA KRITA\ComfyUI\comfy\samplers.py", line 252, in sampling_function\n cond_pred, uncond_pred = calc_cond_uncondbatch(model, cond, uncond, x, timestep, model_options)\n', ' File "D:\IA KRITA\ComfyUI\comfy\samplers.py", line 226, in calc_cond_uncond_batch\n output = model.apply_model(inputx, timestep, c).chunk(batch_chunks)\n', ' File "D:\IA KRITA\ComfyUI\comfy\model_base.py", line 86, in apply_model\n model_output = self.diffusion_model(xc, t, context=context, control=control, transformer_options=transformer_options, extra_conds).float()\n', ' File "D:\IA KRITA\python\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl\n return self._call_impl(*args, *kwargs)\n', ' File "D:\IA KRITA\python\lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl\n return forward_call(args, kwargs)\n', ' File "D:\IA KRITA\ComfyUI\comfy\ldm\modules\diffusionmodules\openaimodel.py", line 850, in forward\n h = forward_timestep_embed(module, h, emb, context, transformer_options, time_context=time_context, num_video_frames=num_video_frames, image_only_indicator=image_only_indicator)\n', ' File "D:\IA KRITA\ComfyUI\comfy\ldm\modules\diffusionmodules\openaimodel.py", line 46, in forward_timestep_embed\n x = layer(x, context, transformer_options)\n', ' File "D:\IA KRITA\python\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl\n return self._call_impl(*args, kwargs)\n', ' File "D:\IA KRITA\python\lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl\n return forward_call(*args, *kwargs)\n', ' File "D:\IA KRITA\ComfyUI\comfy\ldm\modules\attention.py", line 616, in forward\n x = block(x, context=context[i], transformer_options=transformer_options)\n', ' File "D:\IA KRITA\python\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl\n return self._call_impl(args, kwargs)\n', ' File "D:\IA KRITA\python\lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl\n return forward_call(*args, *kwargs)\n', ' File "D:\IA KRITA\ComfyUI\comfy\ldm\modules\attention.py", line 443, in forward\n return checkpoint(self._forward, (x, context, transformer_options), self.parameters(), self.checkpoint)\n', ' File "D:\IA KRITA\ComfyUI\comfy\ldm\modules\diffusionmodules\util.py", line 189, in checkpoint\n return func(inputs)\n', ' File "D:\IA KRITA\ComfyUI\comfy\ldm\modules\attention.py", line 540, in _forward\n n = attn2_replace_patch[block_attn2](n, context_attn2, value_attn2, extra_options)\n', ' File "D:\IA KRITA\ComfyUI\custom_nodes\ComfyUI_IPAdapter_plus\IPAdapterPlus.py", line 442, in call\n out_ip = optimized_attention(q, ip_k, ip_v, extra_options["n_heads"])\n', ' File "D:\IA KRITA\ComfyUI\comfy\ldm\modules\attention.py", line 328, in attention_pytorch\n out = torch.nn.functional.scaled_dot_product_attention(q, k, v, attn_mask=mask, dropout_p=0.0, is_causal=False)\n']

ricewind100 commented 7 months ago

server log 2024-01-20 14:52:06,790 INFO Starting server 2024-01-20 14:52:06,790 INFO 2024-01-20 14:52:06,790 INFO To see the GUI go to: http://127.0.0.1:8188 2024-01-20 14:52:06,885 INFO [comfyui_controlnet_aux] | INFO -> Using ckpts path: D:\IA KRITA\ComfyUI\custom_nodes\comfyui_controlnet_aux\ckpts 2024-01-20 14:52:06,886 INFO [comfyui_controlnet_aux] | INFO -> Using symlinks: False 2024-01-20 14:52:06,886 INFO [comfyui_controlnet_aux] | INFO -> Using ort providers: ['CUDAExecutionProvider', 'DirectMLExecutionProvider', 'OpenVINOExecutionProvider', 'ROCMExecutionProvider', 'CPUExecutionProvider', 'CoreMLExecutionProvider'] 2024-01-20 14:52:06,886 INFO D:\IA KRITA\ComfyUI\custom_nodes\comfyui_controlnet_aux\node_wrappers\dwpose.py:26: UserWarning: DWPose: Onnxruntime not found or doesn't come with acceleration providers, switch to OpenCV with CPU device. DWPose might run very slowly 2024-01-20 14:52:06,886 INFO warnings.warn("DWPose: Onnxruntime not found or doesn't come with acceleration providers, switch to OpenCV with CPU device. DWPose might run very slowly") 2024-01-20 14:53:04,163 INFO got prompt 2024-01-20 14:53:04,442 INFO model_type EPS 2024-01-20 14:53:04,443 INFO adm 0 2024-01-20 14:53:09,821 INFO Using pytorch attention in VAE 2024-01-20 14:53:09,822 INFO Working with z of shape (1, 4, 32, 32) = 4096 dimensions. 2024-01-20 14:53:09,822 INFO Using pytorch attention in VAE 2024-01-20 14:53:11,849 INFO missing {'cond_stage_model.clip_l.logit_scale', 'cond_stage_model.clip_l.text_projection'} 2024-01-20 14:53:11,850 INFO left over keys: dict_keys(['cond_stage_model.clip_l.transformer.text_model.embeddings.position_ids']) 2024-01-20 14:53:13,777 INFO Requested to load CLIPVisionModelProjection 2024-01-20 14:53:13,777 INFO Loading 1 new model 2024-01-20 14:53:19,015 INFO Requested to load SD1ClipModel 2024-01-20 14:53:19,016 INFO Loading 1 new model 2024-01-20 14:53:19,883 INFO [] [] 2024-01-20 14:53:20,012 INFO Requested to load AutoencoderKL 2024-01-20 14:53:20,013 INFO Loading 1 new model 2024-01-20 14:53:20,920 INFO Requested to load BaseModel 2024-01-20 14:53:20,921 INFO Requested to load ControlNet 2024-01-20 14:53:20,921 INFO Loading 2 new models 2024-01-20 14:53:21,105 INFO loading in lowvram mode 1015.9567308425903 2024-01-20 14:53:21,428 INFO loading in lowvram mode 234.45179176330566 2024-01-20 14:53:22,813 INFO 0%| | 0/7 [00:00<?, ?it/s] 0%| | 0/7 [00:01<?, ?it/s] 2024-01-20 14:53:22,942 INFO ERROR:root:!!! Exception during processing !!! 2024-01-20 14:53:22,973 INFO ERROR:root:Traceback (most recent call last): 2024-01-20 14:53:22,974 INFO File "D:\IA KRITA\ComfyUI\execution.py", line 155, in recursive_execute 2024-01-20 14:53:22,974 INFO output_data, output_ui = get_output_data(obj, input_data_all) 2024-01-20 14:53:22,974 INFO File "D:\IA KRITA\ComfyUI\execution.py", line 85, in get_output_data 2024-01-20 14:53:22,975 INFO return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) 2024-01-20 14:53:22,975 INFO File "D:\IA KRITA\ComfyUI\execution.py", line 78, in map_node_over_list 2024-01-20 14:53:22,975 INFO results.append(getattr(obj, func)(slice_dict(input_data_all, i))) 2024-01-20 14:53:22,976 INFO File "D:\IA KRITA\ComfyUI\nodes.py", line 1389, in sample 2024-01-20 14:53:22,976 INFO return common_ksampler(model, noise_seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, denoise=denoise, disable_noise=disable_noise, start_step=start_at_step, last_step=end_at_step, force_full_denoise=force_full_denoise) 2024-01-20 14:53:22,976 INFO File "D:\IA KRITA\ComfyUI\nodes.py", line 1325, in common_ksampler 2024-01-20 14:53:22,976 INFO samples = comfy.sample.sample(model, noise, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, 2024-01-20 14:53:22,977 INFO File "D:\IA KRITA\ComfyUI\comfy\sample.py", line 100, in sample 2024-01-20 14:53:22,977 INFO samples = sampler.sample(noise, positive_copy, negative_copy, cfg=cfg, latent_image=latent_image, start_step=start_step, last_step=last_step, force_full_denoise=force_full_denoise, denoise_mask=noise_mask, sigmas=sigmas, callback=callback, disable_pbar=disable_pbar, seed=seed) 2024-01-20 14:53:22,977 INFO File "D:\IA KRITA\ComfyUI\comfy\samplers.py", line 716, in sample 2024-01-20 14:53:22,977 INFO return sample(self.model, noise, positive, negative, cfg, self.device, sampler, sigmas, self.model_options, latent_image=latent_image, denoise_mask=denoise_mask, callback=callback, disable_pbar=disable_pbar, seed=seed) 2024-01-20 14:53:22,978 INFO File "D:\IA KRITA\ComfyUI\comfy\samplers.py", line 622, in sample 2024-01-20 14:53:22,978 INFO samples = sampler.sample(model_wrap, sigmas, extra_args, callback, noise, latent_image, denoise_mask, disable_pbar) 2024-01-20 14:53:22,978 INFO File "D:\IA KRITA\ComfyUI\comfy\samplers.py", line 561, in sample 2024-01-20 14:53:22,978 INFO samples = self.sampler_function(model_k, noise, sigmas, extra_args=extra_args, callback=k_callback, disable=disable_pbar, self.extra_options) 2024-01-20 14:53:22,978 INFO File "D:\IA KRITA\python\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context 2024-01-20 14:53:22,979 INFO return func(*args, kwargs) 2024-01-20 14:53:22,979 INFO File "D:\IA KRITA\ComfyUI\comfy\k_diffusion\sampling.py", line 154, in sample_euler_ancestral 2024-01-20 14:53:22,979 INFO denoised = model(x, sigmas[i] * s_in, *extra_args) 2024-01-20 14:53:22,979 INFO File "D:\IA KRITA\python\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl 2024-01-20 14:53:22,980 INFO return self._call_impl(args, kwargs) 2024-01-20 14:53:22,980 INFO File "D:\IA KRITA\python\lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl 2024-01-20 14:53:22,980 INFO return forward_call(*args, kwargs) 2024-01-20 14:53:22,980 INFO File "D:\IA KRITA\ComfyUI\comfy\samplers.py", line 285, in forward 2024-01-20 14:53:22,981 INFO out = self.inner_model(x, sigma, cond=cond, uncond=uncond, cond_scale=cond_scale, model_options=model_options, seed=seed) 2024-01-20 14:53:22,981 INFO File "D:\IA KRITA\python\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl 2024-01-20 14:53:22,981 INFO return self._call_impl(*args, *kwargs) 2024-01-20 14:53:22,981 INFO File "D:\IA KRITA\python\lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl 2024-01-20 14:53:22,982 INFO return forward_call(args, kwargs) 2024-01-20 14:53:22,982 INFO File "D:\IA KRITA\ComfyUI\comfy\samplers.py", line 275, in forward 2024-01-20 14:53:22,982 INFO return self.apply_model(*args, kwargs) 2024-01-20 14:53:22,982 INFO File "D:\IA KRITA\ComfyUI\comfy\samplers.py", line 272, in apply_model 2024-01-20 14:53:22,982 INFO out = sampling_function(self.inner_model, x, timestep, uncond, cond, cond_scale, model_options=model_options, seed=seed) 2024-01-20 14:53:22,983 INFO File "D:\IA KRITA\ComfyUI\comfy\samplers.py", line 252, in sampling_function 2024-01-20 14:53:22,983 INFO cond_pred, uncond_pred = calc_cond_uncondbatch(model, cond, uncond, x, timestep, model_options) 2024-01-20 14:53:22,983 INFO File "D:\IA KRITA\ComfyUI\comfy\samplers.py", line 226, in calc_cond_uncond_batch 2024-01-20 14:53:22,984 INFO output = model.apply_model(inputx, timestep, c).chunk(batch_chunks) 2024-01-20 14:53:22,984 INFO File "D:\IA KRITA\ComfyUI\comfy\model_base.py", line 86, in apply_model 2024-01-20 14:53:22,984 INFO model_output = self.diffusion_model(xc, t, context=context, control=control, transformer_options=transformer_options, extra_conds).float() 2024-01-20 14:53:22,984 INFO File "D:\IA KRITA\python\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl 2024-01-20 14:53:22,985 INFO return self._call_impl(*args, *kwargs) 2024-01-20 14:53:22,985 INFO File "D:\IA KRITA\python\lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl 2024-01-20 14:53:22,985 INFO return forward_call(args, kwargs) 2024-01-20 14:53:22,986 INFO File "D:\IA KRITA\ComfyUI\comfy\ldm\modules\diffusionmodules\openaimodel.py", line 850, in forward 2024-01-20 14:53:22,986 INFO h = forward_timestep_embed(module, h, emb, context, transformer_options, time_context=time_context, num_video_frames=num_video_frames, image_only_indicator=image_only_indicator) 2024-01-20 14:53:22,986 INFO File "D:\IA KRITA\ComfyUI\comfy\ldm\modules\diffusionmodules\openaimodel.py", line 46, in forward_timestep_embed 2024-01-20 14:53:22,987 INFO x = layer(x, context, transformer_options) 2024-01-20 14:53:22,987 INFO File "D:\IA KRITA\python\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl 2024-01-20 14:53:22,987 INFO return self._call_impl(*args, kwargs) 2024-01-20 14:53:22,988 INFO File "D:\IA KRITA\python\lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl 2024-01-20 14:53:22,988 INFO return forward_call(*args, *kwargs) 2024-01-20 14:53:22,988 INFO File "D:\IA KRITA\ComfyUI\comfy\ldm\modules\attention.py", line 616, in forward 2024-01-20 14:53:22,988 INFO x = block(x, context=context[i], transformer_options=transformer_options) 2024-01-20 14:53:22,988 INFO File "D:\IA KRITA\python\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl 2024-01-20 14:53:22,988 INFO return self._call_impl(args, kwargs) 2024-01-20 14:53:22,989 INFO File "D:\IA KRITA\python\lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl 2024-01-20 14:53:22,989 INFO return forward_call(*args, *kwargs) 2024-01-20 14:53:22,989 INFO File "D:\IA KRITA\ComfyUI\comfy\ldm\modules\attention.py", line 443, in forward 2024-01-20 14:53:22,990 INFO return checkpoint(self._forward, (x, context, transformer_options), self.parameters(), self.checkpoint) 2024-01-20 14:53:22,990 INFO File "D:\IA KRITA\ComfyUI\comfy\ldm\modules\diffusionmodules\util.py", line 189, in checkpoint 2024-01-20 14:53:22,990 INFO return func(inputs) 2024-01-20 14:53:22,991 INFO File "D:\IA KRITA\ComfyUI\comfy\ldm\modules\attention.py", line 540, in _forward 2024-01-20 14:53:22,991 INFO n = attn2_replace_patch[block_attn2](n, context_attn2, value_attn2, extra_options) 2024-01-20 14:53:22,991 INFO File "D:\IA KRITA\ComfyUI\custom_nodes\ComfyUI_IPAdapter_plus\IPAdapterPlus.py", line 442, in call 2024-01-20 14:53:22,992 INFO out_ip = optimized_attention(q, ip_k, ip_v, extra_options["n_heads"]) 2024-01-20 14:53:22,992 INFO File "D:\IA KRITA\ComfyUI\comfy\ldm\modules\attention.py", line 328, in attention_pytorch 2024-01-20 14:53:22,992 INFO out = torch.nn.functional.scaled_dot_product_attention(q, k, v, attn_mask=mask, dropout_p=0.0, is_causal=False) 2024-01-20 14:53:22,992 INFO RuntimeError: Expected query, key, and value to have the same dtype, but got query.dtype: struct c10::Half key.dtype: float and value.dtype: float instead. 2024-01-20 14:53:22,993 INFO 2024-01-20 14:53:22,993 INFO Prompt executed in 18.77 seconds

Acly commented 7 months ago

What's your GPU?

Does adding --force-fp16 to the ComfyUI command line help? If it's started by the plugin, you can open settings.json in the plugin folder and put it as server_arguments value.

ricewind100 commented 7 months ago

1060, 3 vram :P

ricewind100 commented 7 months ago

{ "server_mode": "managed", "server_path": "D:/IA KRITA", "server_url": "127.0.0.1:8188", "server_backend": "cuda", "server_arguments": "--force-fp16", "selection_grow": 7, "selection_feather": 7, "selection_padding": 7, "new_seed_after_apply": false, "prompt_line_count": 2, "show_negative_prompt": true, "auto_preview": true, "show_control_end": true, "history_size": 1000, "history_storage": 20, "performance_preset": "low", "batch_size": 2, "resolution_multiplier": 1.0, "max_pixel_count": 2, "debug_dump_workflow": false }

NOT WORK :( same mistake

Acly commented 7 months ago

Just to be sure, check your server log. It should say

Forcing FP16.

there somewhere (just below where it lists Total VRAM)

This issue has been reported serveral times here, but it seems (almost?) all were resolved with --force-fp16, so not sure what else to recommend. Though it's not a very good solution anyway, since I don't want to force fp16 on all systems, but don't really know which GPUs need it...

ricewind100 commented 7 months ago

image

working again even without forcing the argument, I do not rule out that the server had been closed incorrectly and had more than one instance running. Thanks for this great work

ricewind100 commented 7 months ago

Ok, it happened to me again, I don't know what's happening but I do know that it doesn't detect correctly whether the server is launched or not. Captura de pantalla 2024-01-22 110912

Acly commented 7 months ago

Solution for this server-already-running exists but is hard to access for the plugin, so it's still not fixed. It's tracked by #196