diff --git a/PulidFluxHook.py b/PulidFluxHook.py
index 2700791..7970d66 100644
--- a/PulidFluxHook.py
+++ b/PulidFluxHook.py
@@ -30,7 +30,7 @@ def set_model_dit_patch_replace(model, patch_kwargs, key):
         to["patches_replace"]["dit"][key].add(pulid_patch, **patch_kwargs)
 
 def pulid_patch(img, pulid_model=None, ca_idx=None, weight=1.0, embedding=None, mask=None, transformer_options={}):
-    pulid_img = weight * pulid_model.model.pulid_ca[ca_idx](embedding, img)
+    pulid_img = weight * pulid_model.model.pulid_ca[ca_idx].to(img.device)(embedding, img)
     if mask is not None:
         pulid_temp_attrs = transformer_options.get(PatchKeys.pulid_patch_key_attrs, {})
         latent_image_shape = pulid_temp_attrs.get("latent_image_shape", None)
diff --git a/pyproject.toml b/pyproject.toml
index f96b664..52d3a91 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,7 +1,7 @@
 [project]
 name = "comfyui_pulid_flux_ll"
 description = "The implementation for PuLID-Flux, support use with TeaCache and WaveSpeed, no model pollution."
-version = "1.0.5"
+version = "1.0.6"
 license = {file = "LICENSE"}
 dependencies = ['facexlib', 'insightface', 'onnxruntime', 'onnxruntime-gpu; sys_platform != "darwin" and platform_machine == "x86_64"', 'ftfy', 'timm']