diff --git a/comfy_cli/command/run.py b/comfy_cli/command/run.py
index ed8ce6e..78eb1e4 100644
--- a/comfy_cli/command/run.py
+++ b/comfy_cli/command/run.py
@@ -190,7 +190,7 @@ def log_node(self, type, node_id):
 
     def format_image_path(self, img):
         filename = img["filename"]
-        subfolder = img["subfolder"]
+        subfolder = img["subfolder"] if "subfolder" in img else None
         output_type = img["type"] or "output"
 
         if self.local_paths: