Skip to content

Commit 3728fbe

Browse files
committed
Merge branch 'dev/ptrottier/remix_integration' into 'main'
Implement RTX Remix Integration bits See merge request lightspeedrtx/lss-ai-tools/comfyui-rtx_remix!35
2 parents 457d133 + 21ef194 commit 3728fbe

68 files changed

Lines changed: 10651 additions & 1624 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.prettierrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"printWidth": 120,
3+
"tabWidth": 2,
4+
"useTabs": false,
5+
"semi": true,
6+
"singleQuote": false,
7+
"trailingComma": "es5",
8+
"bracketSpacing": true,
9+
"arrowParens": "always"
10+
}

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515

1616
### Removed
1717

18+
## [2.0.0] - 2025-11-21
19+
20+
### Added
21+
22+
- **RTX Remix Save Texture Node**: Saves textures to the output directory with a subfolder based on the job ID or prompt timestamp if not job ID is provided
23+
- **RTX Remix Integration Workflow**: A new workflow for integrating ComfyUI into the RTX Remix Toolkit without using REST API nodes
24+
- **RTX Remix Front-End**: Front-end ComfyUI implementation to implement a better workflow for users
25+
- Ability to tag input slots and output nodes with metadata for RTX Remix Toolkit to use
26+
- Ability to export the workflow (and associated API Workflow) to the user directory for use in the RTX Remix Toolkit integration
27+
- Update the UI to indicate tagged nodes and slots
28+
29+
### Changed
30+
31+
- Moved all nodes previously existing nodes to the REST API sub-menu and sub-directory
32+
- Updated display names to include the 🌐 prefix to indicate REST API nodes
33+
1834
## [1.1.1] - 2025-07-25
1935

2036
### Fixed

README.md

Lines changed: 391 additions & 59 deletions
Large diffs are not rendered by default.

VERSION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024.0.0
1+
2.0.0

__init__.py

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,31 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
"""
17-
from .nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
1817

19-
__all__ = ['NODE_CLASS_MAPPINGS', 'NODE_DISPLAY_NAME_MAPPINGS']
18+
from __future__ import annotations
19+
20+
__all__ = ["WEB_DIRECTORY", "comfy_entrypoint"]
21+
22+
from comfy_api.latest import io, ComfyExtension
23+
24+
# Import nodes
25+
from .nodes import RTX_REMIX_NODES
26+
27+
# Define the API endpoints
28+
from .api import *
29+
30+
# Define the UI components
31+
WEB_DIRECTORY = "./web"
32+
33+
34+
class RTXRemixExtension(ComfyExtension):
35+
"""RTX Remix Extension for ComfyUI"""
36+
37+
async def get_node_list(self) -> list[type[io.ComfyNode]]:
38+
"""Return all nodes for this extension"""
39+
return RTX_REMIX_NODES
40+
41+
42+
async def comfy_entrypoint() -> RTXRemixExtension:
43+
"""V3 entry point for ComfyUI to discover this extension's nodes"""
44+
return RTXRemixExtension()

api/__init__.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
"""
2+
* SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* https://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
"""
17+
18+
from .ui import get_all_ui, get_node_ui
19+
from .workflows import get_workflow, list_workflows, save_workflow
20+
21+
__all__ = [
22+
"get_all_ui",
23+
"get_node_ui",
24+
"get_workflow",
25+
"list_workflows",
26+
"save_workflow",
27+
]

api/configs/__init__.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
"""
2+
* SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* https://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
"""
17+
18+
__all__: list[str] = []

api/configs/dynamic_ui.py

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
"""
2+
* SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* https://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
"""
17+
18+
from __future__ import annotations
19+
20+
__all__ = ["NODE_UI_CONFIGS", "NodeUIConfig"]
21+
22+
from enum import Enum
23+
24+
from ..models import (
25+
DynamicHelp,
26+
HelpContent,
27+
NodeUI,
28+
UrlHandler,
29+
UrlParser,
30+
WidgetVisibility,
31+
)
32+
from ...nodes.constant import ModelSource
33+
34+
35+
class NodeUIConfig(str, Enum):
36+
RTX_REMIX_DOWNLOAD_MODEL = "RTXRemixDownloadModel"
37+
38+
39+
NODE_UI_CONFIGS: dict[NodeUIConfig, NodeUI] = {
40+
NodeUIConfig.RTX_REMIX_DOWNLOAD_MODEL: NodeUI(
41+
url_handler=UrlHandler(
42+
source_field="model_source",
43+
host_patterns={
44+
ModelSource.HUGGINGFACE: "huggingface.co",
45+
ModelSource.CIVITAI: "civitai.com",
46+
},
47+
parsers={
48+
ModelSource.HUGGINGFACE: UrlParser(
49+
populate={"repo_id": "hf_repo_id", "filename": "hf_filename"},
50+
reset=["civitai_model_id", "custom_filename"],
51+
),
52+
ModelSource.CIVITAI: UrlParser(
53+
populate={"version_id": "civitai_model_id"},
54+
reset=["hf_repo_id", "hf_filename", "custom_filename"],
55+
),
56+
ModelSource.CUSTOM: UrlParser(
57+
populate={"filename": "custom_filename"},
58+
reset=["hf_repo_id", "hf_filename", "civitai_model_id"],
59+
),
60+
},
61+
),
62+
visibility_rules=[
63+
# Show model_source only after a URL is entered
64+
WidgetVisibility(
65+
source_field="url",
66+
show_when_filled=["model_source"],
67+
),
68+
# Show source-specific fields based on detected source
69+
WidgetVisibility(
70+
source_field="model_source",
71+
mapping={
72+
ModelSource.HUGGINGFACE: [
73+
"hf_repo_id",
74+
"hf_filename",
75+
"hf_token",
76+
],
77+
ModelSource.CIVITAI: ["civitai_model_id", "civitai_api_key"],
78+
ModelSource.CUSTOM: ["custom_filename", "custom_hash"],
79+
},
80+
),
81+
# Show archive fields when extract_archive is enabled
82+
WidgetVisibility(
83+
source_field="extract_archive",
84+
mapping={
85+
True: ["archive_model_filename", "extracted_model_hash"],
86+
},
87+
),
88+
],
89+
info_button=DynamicHelp(
90+
source_field="model_source",
91+
configs={
92+
"": HelpContent(
93+
label="🛈 How to use this node",
94+
title="Download Model",
95+
template="rtx-remix-download-generic-info-template",
96+
),
97+
ModelSource.HUGGINGFACE: HelpContent(
98+
label="🛈 HuggingFace Help",
99+
title="Download from HuggingFace",
100+
template="rtx-remix-download-huggingface-token-info-template",
101+
),
102+
ModelSource.CIVITAI: HelpContent(
103+
label="🛈 CivitAI Help",
104+
title="Download from CivitAI",
105+
template="rtx-remix-download-civitai-apikey-info-template",
106+
),
107+
ModelSource.CUSTOM: HelpContent(
108+
label="🛈 Custom URL Help",
109+
title="Custom URL Download",
110+
template="rtx-remix-download-custom-howto-info-template",
111+
),
112+
},
113+
),
114+
)
115+
}

api/constants.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
"""
2+
* SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* https://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
"""
17+
18+
__all__ = ["get_base_url", "WORKFLOWS_PREFIX", "API_WORKFLOWS_DIR", "WORKFLOWS_DIR", "REMIX_USER_ID"]
19+
20+
WORKFLOWS_PREFIX = "workflows"
21+
API_WORKFLOWS_DIR = "api_workflows"
22+
WORKFLOWS_DIR = "workflows"
23+
REMIX_USER_ID = "rtx-remix"
24+
25+
26+
def get_base_url(version: int = 1) -> str:
27+
return f"/rtx-remix/v{version}"

api/enums.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
"""
2+
* SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* https://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
"""
17+
18+
__all__ = ["PathType", "SourceType"]
19+
20+
from enum import Enum
21+
22+
23+
class PathType(Enum):
24+
"""Enumeration for workflow path types."""
25+
26+
API = "api"
27+
FULL = "full"
28+
29+
30+
class SourceType(Enum):
31+
"""Enumeration for workflow source types."""
32+
33+
USER = "user"
34+
RTX_REMIX = "rtx-remix"

0 commit comments

Comments
 (0)