From e3b25487a244127d26df684d57dfc9e8a5dd79ab Mon Sep 17 00:00:00 2001 From: kijai <40791699+kijai@users.noreply.github.com> Date: Wed, 15 Apr 2026 01:26:10 +0300 Subject: [PATCH] Uuid for the temporary preview file --- comfy_extras/nodes_sam3.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/comfy_extras/nodes_sam3.py b/comfy_extras/nodes_sam3.py index b7be5e3a3..1326452f1 100644 --- a/comfy_extras/nodes_sam3.py +++ b/comfy_extras/nodes_sam3.py @@ -410,9 +410,10 @@ class SAM3_TrackPreview(io.ComfyNode): else: N, N_obj = packed.shape[0], packed.shape[1] + import uuid gpu = comfy.model_management.get_torch_device() temp_dir = folder_paths.get_temp_directory() - filename = "sam3_track_preview.mp4" + filename = f"sam3_track_preview_{uuid.uuid4().hex[:8]}.mp4" filepath = os.path.join(temp_dir, filename) with av.open(filepath, mode='w') as output: stream = output.add_stream('h264', rate=Fraction(round(fps * 1000), 1000))