sync
diff --git a/backend/headless/comfy/latent_formats.py b/backend/headless/comfy/latent_formats.py
index fadc0eec7..c209087e0 100644
--- a/backend/headless/comfy/latent_formats.py
+++ b/backend/headless/comfy/latent_formats.py
@@ -20,7 +20,7 @@ def __init__(self, scale_factor=0.18215):
                     [-0.2829,  0.1762,  0.2721],
                     [-0.2120, -0.2616, -0.7177]
                 ]
-        self.taesd_decoder_name = "taesd_decoder.pth"
+        self.taesd_decoder_name = "taesd_decoder"
 
 class SDXL(LatentFormat):
     def __init__(self):
@@ -32,4 +32,4 @@ def __init__(self):
                     [ 0.0568,  0.1687, -0.0755],
                     [-0.3112, -0.2359, -0.2076]
                 ]
-        self.taesd_decoder_name = "taesdxl_decoder.pth"
+        self.taesd_decoder_name = "taesdxl_decoder"
diff --git a/backend/headless/comfy/taesd/taesd.py b/backend/headless/comfy/taesd/taesd.py
index 1549345ae..8df1f1609 100644
--- a/backend/headless/comfy/taesd/taesd.py
+++ b/backend/headless/comfy/taesd/taesd.py
@@ -6,6 +6,8 @@
 import torch
 import torch.nn as nn
 
+import comfy.utils
+
 def conv(n_in, n_out, **kwargs):
     return nn.Conv2d(n_in, n_out, 3, padding=1, **kwargs)
 
@@ -50,9 +52,9 @@ def __init__(self, encoder_path="taesd_encoder.pth", decoder_path="taesd_decoder
         self.encoder = Encoder()
         self.decoder = Decoder()
         if encoder_path is not None:
-            self.encoder.load_state_dict(torch.load(encoder_path, map_location="cpu", weights_only=True))
+            self.encoder.load_state_dict(comfy.utils.load_torch_file(encoder_path, safe_load=True))
         if decoder_path is not None:
-            self.decoder.load_state_dict(torch.load(decoder_path, map_location="cpu", weights_only=True))
+            self.decoder.load_state_dict(comfy.utils.load_torch_file(decoder_path, safe_load=True))
 
     @staticmethod
     def scale_latents(x):
diff --git a/backend/headless/latent_preview.py b/backend/headless/latent_preview.py
index 740e08607..e1553c85c 100644
--- a/backend/headless/latent_preview.py
+++ b/backend/headless/latent_preview.py
@@ -56,7 +56,12 @@ def get_previewer(device, latent_format):
         # TODO previewer methods
         taesd_decoder_path = None
         if latent_format.taesd_decoder_name is not None:
-            taesd_decoder_path = folder_paths.get_full_path("vae_approx", latent_format.taesd_decoder_name)
+            taesd_decoder_path = next(
+                (fn for fn in folder_paths.get_filename_list("vae_approx")
+                    if fn.startswith(latent_format.taesd_decoder_name)),
+                ""
+            )
+            taesd_decoder_path = folder_paths.get_full_path("vae_approx", taesd_decoder_path)
 
         if method == LatentPreviewMethod.Auto:
             method = LatentPreviewMethod.Latent2RGB
diff --git a/dev_script_build_backend.py b/dev_script_build_backend.py
index 34ad6d2a3..8b29b014b 100644
--- a/dev_script_build_backend.py
+++ b/dev_script_build_backend.py
@@ -22,7 +22,7 @@ def get_empty_folder(path):
 
 
 comfy_repo = "https://github.com/comfyanonymous/ComfyUI"
-comfy_commit_hash = "be903eb2e2921f03a3a03dc9d6b0c6437ae201f5"
+comfy_commit_hash = "5e885bd9c822a3cc7d50d75a40958265f497cd03"
 comfy_temp_path = get_empty_folder(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'backend', 'comfy_temp'))
 comfy_core_path = get_empty_folder(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'backend', 'headless'))
 
diff --git a/fooocus_version.py b/fooocus_version.py
index 3d7da7969..6e79c6992 100644
--- a/fooocus_version.py
+++ b/fooocus_version.py
@@ -1 +1 @@
-version = '2.1.46'
+version = '2.1.47'
