Browse Source

feat: git_exe settings

pull/113/head
Dr.Lt.Data 1 year ago
parent
commit
c2ae252e41
  1. 6
      README.md
  2. 20
      __init__.py
  3. 10
      custom-node-list.json
  4. 14
      git_helper.py
  5. 10
      node_db/new/custom-node-list.json

6
README.md

@ -45,6 +45,7 @@ This repository provides Colab notebooks that allow you to install and use Comfy
* Support for automatically installing dependencies of custom nodes upon restarting Colab notebooks. * Support for automatically installing dependencies of custom nodes upon restarting Colab notebooks.
## Changes ## Changes
* **0.29** Add `Update all` feature
* **0.25** support db channel * **0.25** support db channel
* You can directly modify the db channel settings in the `config.ini` file. * You can directly modify the db channel settings in the `config.ini` file.
* If you want to maintain a new DB channel, please modify the `channels.list` and submit a PR. * If you want to maintain a new DB channel, please modify the `channels.list` and submit a PR.
@ -155,17 +156,16 @@ NODE_CLASS_MAPPINGS.update({
## Troubleshooting ## Troubleshooting
* If your `git.exe` is installed in a specific location other than system git, please install ComfyUI-Manager and run ComfyUI. Then, specify the path including the file name in `git_exe = ` in the ComfyUI-Manager/config.ini file that is generated.
* If updating ComfyUI-Manager itself fails, please go to the **ComfyUI-Manager** directory and execute the command `git update-ref refs/remotes/origin/main a361cc1 && git fetch --all && git pull`. * If updating ComfyUI-Manager itself fails, please go to the **ComfyUI-Manager** directory and execute the command `git update-ref refs/remotes/origin/main a361cc1 && git fetch --all && git pull`.
* Alternatively, download the update-fix.py script from [update-fix.py](https://github.com/ltdrdata/ComfyUI-Manager/raw/main/scripts/update-fix.py) and place it in the ComfyUI-Manager directory. Then, run it using your Python command. * Alternatively, download the update-fix.py script from [update-fix.py](https://github.com/ltdrdata/ComfyUI-Manager/raw/main/scripts/update-fix.py) and place it in the ComfyUI-Manager directory. Then, run it using your Python command.
For the portable version, use `..\..\..\python_embeded\python.exe update-fix.py`. For the portable version, use `..\..\..\python_embeded\python.exe update-fix.py`.
* If Controlnet is set to skip_v1 true, nodes like `CannyEdgePreprocessor` will appear as extensions of missing nodes, but simply installing them is not enough, and direct modification of the user's config.yaml is required.
* For cases where nodes like `PreviewTextNode` from `ComfyUI_Custom_Nodes_AlekPet` are only supported as front-end nodes, we currently do not provide missing nodes for them. * For cases where nodes like `PreviewTextNode` from `ComfyUI_Custom_Nodes_AlekPet` are only supported as front-end nodes, we currently do not provide missing nodes for them.
* Currently, `vid2vid` is not being updated, causing compatibility issues. * Currently, `vid2vid` is not being updated, causing compatibility issues.
## TODO: Unconventional form of custom node list ## TODO: Unconventional form of custom node list
* https://github.com/bmad4ever/ComfyUI-Bmad-Custom-Nodes
* https://github.com/diontimmer/Sample-Diffusion-ComfyUI-Extension * https://github.com/diontimmer/Sample-Diffusion-ComfyUI-Extension
* https://github.com/senshilabs/NINJA-plugin * https://github.com/senshilabs/NINJA-plugin
@ -175,8 +175,8 @@ NODE_CLASS_MAPPINGS.update({
- [x] category/keyword filter - [x] category/keyword filter
- [x] Automatic recognition of missing custom nodes - [x] Automatic recognition of missing custom nodes
- [x] Automatic installation suggestion of missing custom nodes - [x] Automatic installation suggestion of missing custom nodes
- [x] 3rd party repository
- [ ] installation from git url - [ ] installation from git url
- [ ] 3rd party repository
- [ ] Specification of custom nodes - [ ] Specification of custom nodes
- [ ] Specification scanner - [ ] Specification scanner
- [ ] Search extension by node name - [ ] Search extension by node name

20
__init__.py

@ -1,8 +1,8 @@
import configparser import configparser
import shutil import shutil
import folder_paths import folder_paths
import os, sys import os
import subprocess import sys
import threading import threading
@ -55,7 +55,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.29.1)") print("### Loading: ComfyUI-Manager (V0.30)")
comfy_ui_required_revision = 1240 comfy_ui_required_revision = 1240
comfy_ui_revision = "Unknown" comfy_ui_revision = "Unknown"
@ -91,6 +91,7 @@ def write_config():
config['default'] = { config['default'] = {
'preview_method': get_current_preview_method(), 'preview_method': get_current_preview_method(),
'badge_mode': get_config()['badge_mode'], 'badge_mode': get_config()['badge_mode'],
'git_exe': get_config()['git_exe'],
'channel_url': get_config()['channel_url'], 'channel_url': get_config()['channel_url'],
'channel_url_list': get_config()['channel_url_list'] 'channel_url_list': get_config()['channel_url_list']
} }
@ -120,6 +121,7 @@ def read_config():
return { return {
'preview_method': default_conf['preview_method'] if 'preview_method' in default_conf else get_current_preview_method(), 'preview_method': default_conf['preview_method'] if 'preview_method' in default_conf else get_current_preview_method(),
'badge_mode': default_conf['badge_mode'] if 'badge_mode' in default_conf else 'none', 'badge_mode': default_conf['badge_mode'] if 'badge_mode' in default_conf else 'none',
'git_exe': default_conf['git_exe'] if 'git_exe' in default_conf else '',
'channel_url': default_conf['channel_url'] if 'channel_url' in default_conf else 'https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main', 'channel_url': default_conf['channel_url'] if 'channel_url' in default_conf else 'https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main',
'channel_url_list': ch_url_list 'channel_url_list': ch_url_list
} }
@ -128,6 +130,7 @@ def read_config():
return { return {
'preview_method': get_current_preview_method(), 'preview_method': get_current_preview_method(),
'badge_mode': 'none', 'badge_mode': 'none',
'git_exe': '',
'channel_url': 'https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main', 'channel_url': 'https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main',
'channel_url_list': '' 'channel_url_list': ''
} }
@ -391,9 +394,20 @@ def setup_js():
print(f"### ComfyUI-Manager: Copy .js from '{js_src_path}' to '{js_dest_path}'") print(f"### ComfyUI-Manager: Copy .js from '{js_src_path}' to '{js_dest_path}'")
shutil.copy(js_src_path, js_dest_path) shutil.copy(js_src_path, js_dest_path)
setup_js() setup_js()
def setup_environment():
git_exe = get_config()['git_exe']
if git_exe != '':
git.Git().update_environment(GIT_PYTHON_GIT_EXECUTABLE=git_exe)
setup_environment()
# Expand Server api # Expand Server api
import server import server

10
custom-node-list.json

@ -1802,6 +1802,16 @@
"install_type": "git-clone", "install_type": "git-clone",
"description": "Add Image Save nodes for TIFF 16 bit and EXR 32 bit formats. Probably only useful if you're applying a LUT or other color corrections, and care about preserving as much color accuracy as possible." "description": "Add Image Save nodes for TIFF 16 bit and EXR 32 bit formats. Probably only useful if you're applying a LUT or other color corrections, and care about preserving as much color accuracy as possible."
}, },
{
"author": "phineas-pta",
"title": "ComfyUI auto nodes layout",
"reference": "https://github.com/phineas-pta/comfyui-auto-nodes-layout",
"files": [
"https://github.com/phineas-pta/comfyui-auto-nodes-layout"
],
"install_type": "git-clone",
"description": "A ComfyUI extension to apply better nodes layout algorithm to ComfyUI workflow (mostly for visualization purpose)"
},
{ {
"author": "receyuki", "author": "receyuki",
"title": "comfyui-prompt-reader-node", "title": "comfyui-prompt-reader-node",

14
git_helper.py

@ -1,6 +1,9 @@
import sys import sys
import os import os
import git import git
import configparser
config_path = os.path.join(os.path.dirname(__file__), "config.ini")
def gitclone(custom_nodes_path, url): def gitclone(custom_nodes_path, url):
repo_name = os.path.splitext(os.path.basename(url))[0] repo_name = os.path.splitext(os.path.basename(url))[0]
@ -72,6 +75,17 @@ def gitpull(path):
repo.close() repo.close()
def setup_environment():
config = configparser.ConfigParser()
config.read(config_path)
if 'git_exe' in config['default'] and config['default']['git_exe'] != '':
git.Git().update_environment(GIT_PYTHON_GIT_EXECUTABLE=config['default']['git_exe'])
setup_environment()
try: try:
if sys.argv[1] == "--clone": if sys.argv[1] == "--clone":
gitclone(sys.argv[2], sys.argv[3]) gitclone(sys.argv[2], sys.argv[3])

10
node_db/new/custom-node-list.json

@ -1,5 +1,15 @@
{ {
"custom_nodes": [ "custom_nodes": [
{
"author": "phineas-pta",
"title": "ComfyUI auto nodes layout",
"reference": "https://github.com/phineas-pta/comfyui-auto-nodes-layout",
"files": [
"https://github.com/phineas-pta/comfyui-auto-nodes-layout"
],
"install_type": "git-clone",
"description": "A ComfyUI extension to apply better nodes layout algorithm to ComfyUI workflow (mostly for visualization purpose)"
},
{ {
"author": "rklaffehn", "author": "rklaffehn",
"title": "rk-comfy-nodes", "title": "rk-comfy-nodes",

Loading…
Cancel
Save