diff --git a/check.sh b/check.sh index d0df44b8..ef5c873b 100755 --- a/check.sh +++ b/check.sh @@ -9,6 +9,7 @@ files=( "alter-list.json" "extension-node-map.json" "github-stats.json" + "extras.json" "node_db/new/custom-node-list.json" "node_db/new/model-list.json" "node_db/new/extension-node-map.json" diff --git a/extras.json b/extras.json new file mode 100644 index 00000000..cc8e3253 --- /dev/null +++ b/extras.json @@ -0,0 +1,25 @@ +{ + "favorites": [ + "comfyui_ipadapter_plus", + "comfyui-animatediff-evolved", + "comfyui_controlnet_aux", + "comfyui-impact-pack", + "comfyui-custom-scripts", + "comfyui-layerdiffuse", + "comfyui-liveportraitkj", + "aigodlike-comfyui-translation", + "comfyui-reactor-node", + "comfyui_instantid", + "sd-dynamic-thresholding", + "pr-was-node-suite-comfyui-47064894", + "comfyui-advancedliveportrait", + "comfyui_layerstyle", + "efficiency-nodes-comfyui", + "comfyui-crystools", + "comfyui-advanced-controlnet", + "comfyui-videohelpersuite", + "comfyui-kjnodes", + "comfy-mtb", + "comfyui_essentials" + ] +} \ No newline at end of file diff --git a/glob/manager_core.py b/glob/manager_core.py index fb5db4b9..c42cb2e3 100644 --- a/glob/manager_core.py +++ b/glob/manager_core.py @@ -2592,6 +2592,15 @@ def populate_github_stats(node_packs, json_obj_github): v['trust'] = False +def populate_favorites(node_packs, json_obj_extras): + favorites = set(json_obj_extras['favorites']) + + for k, v in node_packs.items(): + if v.get('version') != 'unknown': + if k in favorites: + v['is_favorite'] = True + + async def restore_snapshot(snapshot_path, git_helper_extras=None): cloned_repos = [] checkout_repos = [] diff --git a/glob/manager_server.py b/glob/manager_server.py index 7d841faf..88372bb4 100644 --- a/glob/manager_server.py +++ b/glob/manager_server.py @@ -513,8 +513,11 @@ async def fetch_customnode_list(request): channel = core.get_config()['channel_url'] node_packs = await core.get_unified_total_nodes(channel, request.rel_url.query["mode"]) - json_obj_github = await core.get_data_by_mode(request.rel_url.query["mode"], 'github-stats.json', 'default') - core.populate_github_stats(node_packs, json_obj_github) + json_obj_github = core.get_data_by_mode(request.rel_url.query["mode"], 'github-stats.json', 'default') + json_obj_extras = core.get_data_by_mode(request.rel_url.query["mode"], 'extras.json', 'default') + + core.populate_github_stats(node_packs, await json_obj_github) + core.populate_favorites(node_packs, await json_obj_extras) check_state_of_git_node_pack(node_packs, False, do_update_check=not skip_update) diff --git a/js/custom-nodes-manager.js b/js/custom-nodes-manager.js index c31ce144..96dc6c62 100644 --- a/js/custom-nodes-manager.js +++ b/js/custom-nodes-manager.js @@ -338,6 +338,7 @@ const ShowMode = { NORMAL: "Normal", UPDATE: "Update", MISSING: "Missing", + FAVORITES: "Favorites", ALTERNATIVES: "Alternatives" }; @@ -552,6 +553,10 @@ export class CustomNodesManager { label: "Missing", value: ShowMode.MISSING, hasData: false + }, { + label: "Favorites", + value: ShowMode.FAVORITES, + hasData: false }, { label: "Alternatives of A1111", value: ShowMode.ALTERNATIVES, @@ -633,7 +638,7 @@ export class CustomNodesManager { } if (rowItem?.title === "ComfyUI-Manager") { - installGroups.enabled = installGroups.enabled.filter(it => it !== "disable"); + installGroups.enabled = installGroups.enabled.filter(it => it !== "disable" && it !== "uninstall" && it !== "switch"); } let list = installGroups[action]; @@ -1461,8 +1466,18 @@ export class CustomNodesManager { return hashMap; } - async getAlternatives() { + async getFavorites() { + const hashMap = {}; + for(let k in this.custom_nodes) { + let item = this.custom_nodes[k]; + if(item.is_favorite) + hashMap[item.hash] = true; + } + return hashMap; + } + + async getAlternatives() { const mode = manager_instance.datasrc_combo.value; this.showStatus(`Loading alternatives (${mode}) ...`); const res = await fetchData(`/customnode/alternatives?mode=${mode}`); @@ -1545,6 +1560,8 @@ export class CustomNodesManager { hashMap = await this.getMissingNodes(); } else if(this.show_mode == ShowMode.ALTERNATIVES) { hashMap = await this.getAlternatives(); + } else if(this.show_mode == ShowMode.FAVORITES) { + hashMap = await this.getFavorites(); } filterItem.hashMap = hashMap; filterItem.hasData = true; diff --git a/node_db/dev/custom-node-list.json b/node_db/dev/custom-node-list.json index f3146072..3ecf6399 100644 --- a/node_db/dev/custom-node-list.json +++ b/node_db/dev/custom-node-list.json @@ -32,16 +32,6 @@ "install_type": "git-clone", "description": "Basic functionality for converting an image to ASCII art returned as a png image based on [a/ascii_magic](https://github.com/LeandroBarone/python-ascii_magic)" }, - { - "author": "AIFSH", - "title": "HivisionIDPhotos-ComfyUI", - "reference": "https://github.com/AIFSH/HivisionIDPhotos-ComfyUI", - "files": [ - "https://github.com/AIFSH/HivisionIDPhotos-ComfyUI" - ], - "install_type": "git-clone", - "description": "a custom node for [a/HivisionIDPhotos](https://github.com/Zeyi-Lin/HivisionIDPhotos).\nNOTE: Unsuitable for international users" - }, { "author": "LyazS", "title": "comfyui-nettools",