Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions comfy_api_nodes/nodes_rodin.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import folder_paths as comfy_paths
import aiohttp
import os
import datetime
import asyncio
import io
import logging
Expand Down Expand Up @@ -229,8 +228,8 @@ def get_quality_mode(self, poly_count):

return mesh_mode, quality

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:
Expand Down Expand Up @@ -306,7 +305,7 @@ async def api_call(
**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,)

Expand Down Expand Up @@ -352,7 +351,7 @@ async def api_call(
**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,)

Expand Down Expand Up @@ -398,7 +397,7 @@ async def api_call(
**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,)

Expand Down Expand Up @@ -453,7 +452,7 @@ async def api_call(
)
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,)

Expand Down
Loading