mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2025-12-18 02:43:00 +08:00
support missing node installer for ComfyUI-Workflow-Component
This commit is contained in:
parent
ea08191fa8
commit
74c3f81094
@ -16,7 +16,7 @@ sys.path.append('../..')
|
|||||||
from torchvision.datasets.utils import download_url
|
from torchvision.datasets.utils import download_url
|
||||||
|
|
||||||
# ensure .js
|
# ensure .js
|
||||||
print("### Loading: ComfyUI-Manager (V0.7.2)")
|
print("### Loading: ComfyUI-Manager (V0.8)")
|
||||||
|
|
||||||
comfy_path = os.path.dirname(folder_paths.__file__)
|
comfy_path = os.path.dirname(folder_paths.__file__)
|
||||||
custom_nodes_path = os.path.join(comfy_path, 'custom_nodes')
|
custom_nodes_path = os.path.join(comfy_path, 'custom_nodes')
|
||||||
|
|||||||
@ -16,6 +16,22 @@ async function getCustomnodeMappings() {
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function getUnresolvedNodesInComponent() {
|
||||||
|
try {
|
||||||
|
var mode = "url";
|
||||||
|
if(ManagerMenuDialog.instance.local_mode_checkbox.checked)
|
||||||
|
mode = "local";
|
||||||
|
|
||||||
|
const response = await fetch(`/component/get_unresolved`);
|
||||||
|
|
||||||
|
const data = await response.json();
|
||||||
|
return data.nodes;
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
async function getCustomNodes() {
|
async function getCustomNodes() {
|
||||||
var mode = "url";
|
var mode = "url";
|
||||||
if(ManagerMenuDialog.instance.local_mode_checkbox.checked)
|
if(ManagerMenuDialog.instance.local_mode_checkbox.checked)
|
||||||
@ -243,6 +259,14 @@ class CustomNodesInstaller extends ComfyDialog {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let unresolved_nodes = await getUnresolvedNodesInComponent();
|
||||||
|
for (let i in unresolved_nodes) {
|
||||||
|
let node_type = unresolved_nodes[i];
|
||||||
|
const url = name_to_url[node_type];
|
||||||
|
if(url)
|
||||||
|
missing_nodes.add(url);
|
||||||
|
}
|
||||||
|
|
||||||
return data.filter(node => node.files.some(file => missing_nodes.has(file)));
|
return data.filter(node => node.files.some(file => missing_nodes.has(file)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user