Skip to content

Commit 0d66e6c

Browse files
committed
fix(api-nodes-cloud): stop using sub-folder and absolute path for output of Rodin3D nodes
1 parent 163b629 commit 0d66e6c

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

comfy_api_nodes/nodes_rodin.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -225,16 +225,14 @@ async def get_rodin_download_list(uuid, auth_kwargs: Optional[dict[str, str]] =
225225

226226

227227
async def download_files(url_list, task_uuid):
228-
save_path = os.path.join(comfy_paths.get_output_directory(), f"Rodin3D_{task_uuid}")
229-
os.makedirs(save_path, exist_ok=True)
230-
model_file_path = None
228+
model_file_name = None
231229
async with aiohttp.ClientSession() as session:
232230
for i in url_list.list:
233231
url = i.url
234-
file_name = i.name
235-
file_path = os.path.join(save_path, file_name)
232+
file_name = f"Rodin3D_{task_uuid}_{i.name}"
233+
file_path = os.path.join(comfy_paths.get_output_directory(), file_name)
236234
if file_path.endswith(".glb"):
237-
model_file_path = file_path
235+
model_file_name = file_name
238236
logging.info("[ Rodin3D API - download_files ] Downloading file: %s", file_path)
239237
max_retries = 5
240238
for attempt in range(max_retries):
@@ -256,7 +254,7 @@ async def download_files(url_list, task_uuid):
256254
file_path,
257255
max_retries,
258256
)
259-
return model_file_path
257+
return model_file_name
260258

261259

262260
class Rodin3D_Regular(IO.ComfyNode):

0 commit comments

Comments
 (0)