[Rodin3d api nodes] Updated the name of the save file path (changed from timestamp to UUID). (#10011)

* Update savepath name from time to uuid

* delete lib
This commit is contained in:
Changrz 2025-09-30 02:59:12 +08:00 committed by GitHub
parent b60dc31627
commit 6ec1cfe101
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -11,7 +11,6 @@ from comfy.comfy_types.node_typing import IO
import folder_paths as comfy_paths
import aiohttp
import os
import datetime
import asyncio
import io
import logging
@ -243,8 +242,8 @@ class Rodin3DAPI:
return mesh_mode, quality_override
async def download_files(self, url_list):
save_path = os.path.join(comfy_paths.get_output_directory(), "Rodin3D", datetime.datetime.now().strftime("%Y-%m-%d_%H-%M-%S"))
async def download_files(self, url_list, task_uuid):
save_path = os.path.join(comfy_paths.get_output_directory(), f"Rodin3D_{task_uuid}")
os.makedirs(save_path, exist_ok=True)
model_file_path = None
async with aiohttp.ClientSession() as session:
@ -320,7 +319,7 @@ class Rodin3D_Regular(Rodin3DAPI):
**kwargs)
await self.poll_for_task_status(subscription_key, **kwargs)
download_list = await self.get_rodin_download_list(task_uuid, **kwargs)
model = await self.download_files(download_list)
model = await self.download_files(download_list, task_uuid)
return (model,)
@ -366,7 +365,7 @@ class Rodin3D_Detail(Rodin3DAPI):
**kwargs)
await self.poll_for_task_status(subscription_key, **kwargs)
download_list = await self.get_rodin_download_list(task_uuid, **kwargs)
model = await self.download_files(download_list)
model = await self.download_files(download_list, task_uuid)
return (model,)
@ -412,7 +411,7 @@ class Rodin3D_Smooth(Rodin3DAPI):
**kwargs)
await self.poll_for_task_status(subscription_key, **kwargs)
download_list = await self.get_rodin_download_list(task_uuid, **kwargs)
model = await self.download_files(download_list)
model = await self.download_files(download_list, task_uuid)
return (model,)
@ -467,7 +466,7 @@ class Rodin3D_Sketch(Rodin3DAPI):
)
await self.poll_for_task_status(subscription_key, **kwargs)
download_list = await self.get_rodin_download_list(task_uuid, **kwargs)
model = await self.download_files(download_list)
model = await self.download_files(download_list, task_uuid)
return (model,)