From 7be37dbbfac45e8038f94ced8a2fa8ec2b06fb34 Mon Sep 17 00:00:00 2001 From: melMass Date: Sat, 22 Jul 2023 18:41:59 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20=E2=9C=A8=20update=20install=20instruct?= =?UTF-8?q?ions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- INSTALL-CN.md | 135 +++++++++++++++++++++++++++++--------------------- INSTALL-JP.md | 120 ++++++++++++++++++++++++++------------------ INSTALL.md | 64 ++++++++++++++---------- 3 files changed, 188 insertions(+), 131 deletions(-) diff --git a/INSTALL-CN.md b/INSTALL-CN.md index 479f46c..934e540 100644 --- a/INSTALL-CN.md +++ b/INSTALL-CN.md @@ -1,72 +1,93 @@ # 安装 - - [安装](#安装) - - [依赖项](#依赖项) - - [自定义虚拟环境(我主要使用此方法)](#自定义虚拟环境我主要使用此方法) - - [Comfy-portable / 独立安装(来自 ComfyUI 发布)](#comfy-portable--独立安装来自-comfyui-发布) - - [Google Colab](#google-colab) - - [模型下载](#模型下载) - - [Web 扩展](#web-扩展) + - [自动安装(推荐)](#自动安装推荐) + - [ComfyUI 管理器](#comfyui-管理器) + - [虚拟环境](#虚拟环境) + - [模型下载](#模型下载) + - [网络扩展](#网络扩展) + - [旧的安装方法 (MANUAL)](#旧的安装方法-manual) + - [依赖关系](#依赖关系) +### 自动安装(推荐) + +### ComfyUI 管理器 + +从 0.1.0 版开始,该扩展将使用 [ComfyUI-Manager](https://github.com/ltdrdata/ComfyUI-Manager) 进行安装,这对处理各种环境下的各种安装问题大有帮助。 + +### 虚拟环境 +还有一种试验性的单行安装方法,即在 ComfyUI 根目录下使用以下命令进行安装。它将下载代码、安装依赖项并运行安装脚本: -### 依赖项 - -#### 自定义虚拟环境(我主要使用此方法) - -1. 确保您处于用于 ComfyUI 的 Python 环境中。 -2. 运行以下命令安装所需的依赖项: - ```bash - pip install -r comfy_mtb/requirements.txt - ``` - -#### Comfy-portable / 独立安装(来自 ComfyUI 发布) - -如果您使用的是 ComfyUI 独立版的 `python-embeded`,则无法使用二进制文件进行依赖项的 pip 安装,特别是当它们没有预编译的 wheels 时。在这种情况下,请查看最新的[发布版](https://github.com/melMass/comfy_mtb/releases),其中包含了为 Linux 和 Windows 构建的预编译 wheels(仅对需要从源代码构建的部分)。有关更多信息,请参阅[此问题(#1)](https://github.com/melMass/comfy_mtb/issues/1)。 -![image](https://github.com/melMass/comfy_mtb/assets/7041726/2934fa14-3725-427c-8b9e-2b4f60ba1b7b) - - -#### Google Colab - -在 **运行 ComfyUI with localtunnel(推荐方式)** 标题下方添加一个新的代码单元格(在代码单元格之前)。 -![在 Colab 中添加位置的预览](https://github.com/melMass/comfy_mtb/assets/7041726/35df2ef1-14f9-44cd-aa65-353829188cd7) - - -```python -# 下载节点 -!git clone --recursive https://github.com/melMass/comfy_mtb.git custom_nodes/comfy_mtb - -# 下载所有模型 -!python custom_nodes/comfy_mtb/scripts/download_models.py -y - -# 安装依赖项 -!pip install -r custom_nodes/comfy_mtb/requirements.txt -f https://download.openmmlab.com/mmcv/dist/cu118/torch2.0/index.html +```bash +curl -sSL "https://raw.githubusercontent.com/username/repo/main/install.py" | python3 - ``` -如果运行后,Colab 抱怨需要重新启动运行时,请重新启动,并且不要重新运行之前的单元格,只需运行一个用于运行 localtunnel 的单元格即可(您可能需要先添加一个 `%cd ComfyUI` 的单元格...)。 -> **注意**: -> 如果您不需要所有模型,请将 `-y` 删除,因为 Colab 实际上支持用户输入: ![image](https://github.com/melMass/comfy_mtb/assets/7041726/40fc3602-f1d4-432a-98fd-ce2240f5ad06) +## 模型下载 +某些节点需要下载额外的模型,您可以使用与上述相同的 python 环境以交互方式完成下载: -> **预览** -> ![image](https://github.com/melMass/comfy_mtb/assets/7041726/b5b2b2d9-f1e8-4c43-b1db-7dfc5e07be86) - - - -### 模型下载 -某些节点需要下载额外的模型,您可以使用与上述相同的 Python 环境进行交互式下载: ```bash python scripts/download_models.py ``` -然后按照提示操作或只需按 Enter 键下载所有模型。 +然后根据提示或直接按回车键下载每个模型。 -> **注意** -> 您可以使用以下命令无需提示下载所有模型: -> ```bash -> python scripts/download_models.py -y -> ``` +> **Note** +> 您可以使用以下方法下载所有型号,无需提示: + ```bash + python scripts/download_models.py -y + ``` -### Web 扩展 +#### 网络扩展 -第一次运行脚本时,会[尝试创建符号链接](https://github.com/melMass/comfy_mtb/blob/d982b69a58c05ccead9c49370764beaa4549992a/__init__.py#L45-L61),将[Web 扩展](https://github.com/melMass/comfy_mtb/tree/main/web)链接到 Comfy 的 `web/extensions` 文件夹。如果失败,您可以手动将 `mtb` 文件夹复制到 `ComfyUI/web/extensions`,目前它只提供了一个颜色小部件,由几个节点共享: +首次运行时,脚本会尝试将 [网络扩展](https://github.com/melMass/comfy_mtb/tree/main/web)链接到你的 "web/extensions "文件夹,[请参阅](https://github.com/melMass/comfy_mtb/blob/d982b69a58c05ccead9c49370764beaa4549992a/__init__.py#L45-L61)。 + +color widget preview + +### 旧的安装方法 (MANUAL) +### 依赖关系 +

Custom Virtualenv(我主要用这个)

+ +

Comfy 便携式/单机版(来自 ComfyUI 版本)

+ +如果您使用 ComfyUI 单机版中的 `python-embeded `,那么当二进制文件没有轮子时,您就无法使用 pip 安装二进制文件的依赖项,在这种情况下,请查看最近的 [发布](https://github.com/melMass/comfy_mtb/releases),那里有一个预编译轮子的 linux 和 windows 捆绑包(只有那些需要从源代码编译的轮子),请查看 [此问题 (#1)](https://github.com/melMass/comfy_mtb/issues/1) 以获取更多信息。 +![image](https://github.com/melMass/comfy_mtb/assets/7041726/2934fa14-3725-427c-8b9e-2b4f60ba1b7b) + + +
+ +

Google Colab

+ +在 **Run ComfyUI with localtunnel (Recommended Way)** 标题之后(代码单元格之前)添加一个新的代码单元格 + +![preview of where to add it on colab](https://github.com/melMass/comfy_mtb/assets/7041726/35df2ef1-14f9-44cd-aa65-353829188cd7) + + +```python +# download the nodes +!git clone --recursive https://github.com/melMass/comfy_mtb.git custom_nodes/comfy_mtb + +# download all models +!python custom_nodes/comfy_mtb/scripts/download_models.py -y + +# install the dependencies +!pip install -r custom_nodes/comfy_mtb/requirements.txt -f https://download.openmmlab.com/mmcv/dist/cu118/torch2.0/index.html +``` + +如果运行后 colab 抱怨需要重新启动运行时,请重新启动,然后不要重新运行之前的单元格,只运行运行本地隧道的单元格。(可能需要先添加一个包含 `%cd ComfyUI` 的单元格) + + +> **Note**: +> If you don't need all models, remove the `-y` as collab actually supports user input: ![image](https://github.com/melMass/comfy_mtb/assets/7041726/40fc3602-f1d4-432a-98fd-ce2240f5ad06) + +> **Preview** +> ![image](https://github.com/melMass/comfy_mtb/assets/7041726/b5b2b2d9-f1e8-4c43-b1db-7dfc5e07be86) + +
-color widget preview \ No newline at end of file diff --git a/INSTALL-JP.md b/INSTALL-JP.md index 61212ee..f06dc6f 100644 --- a/INSTALL-JP.md +++ b/INSTALL-JP.md @@ -1,71 +1,93 @@ # インストール + - [インストール](#インストール) + - [自動インストール (推奨)](#自動インストール-推奨) + - [ComfyUI マネージャ](#comfyui-マネージャ) + - [仮想環境](#仮想環境) + - [モデルのダウンロード](#モデルのダウンロード) + - [ウェブ拡張機能](#ウェブ拡張機能) + - [旧インストール方法 (MANUAL)](#旧インストール方法-manual) - [依存関係](#依存関係) - - [カスタム仮想環境(主に使用)](#カスタム仮想環境主に使用) - - [Comfyポータブル/スタンドアロン(ComfyUIリリースから)](#comfyポータブルスタンドアロンcomfyuiリリースから) - - [Google Colab](#google-colab) - - [モデルのダウンロード](#モデルのダウンロード) - - [Web拡張機能](#web拡張機能) -### 依存関係 +## 自動インストール (推奨) -#### カスタム仮想環境(主に使用) +### ComfyUI マネージャ -1. ComfyUIで使用するPython環境にいることを確認してください。 -2. 次のコマンドを実行して、必要な依存関係をインストールします。 - ```bash - pip install -r comfy_mtb/requirements.txt - ``` -#### Comfyポータブル/スタンドアロン(ComfyUIリリースから) +バージョン0.1.0では、この拡張機能は[ComfyUI-Manager](https://github.com/ltdrdata/ComfyUI-Manager)と一緒にインストールすることを想定しています。これは、様々な環境で直面する様々なインストール問題を処理するのに非常に役立ちます。 -ComfyUIスタンドアロンの`python-embeded`を使用している場合、ホイールがない場合にはバイナリの依存関係をpipでインストールすることはできません。この場合は、最新の[リリース](https://github.com/melMass/comfy_mtb/releases)を確認してください。ビルド元のソースが必要な場合は、linuxとwindows用のプリビルドホイールがバンドルされています。詳細については、[この問題(#1)](https://github.com/melMass/comfy_mtb/issues/1)を参照してください。 -![image](https://github.com/melMass/comfy_mtb/assets/7041726/2934fa14-3725-427c-8b9e-2b4f60ba1b7b) +### 仮想環境 +また、ComfyUIのルートから以下のコマンドを使用する実験的なワンライナー・インストールもあります。これはコードをダウンロードし、依存関係をインストールし、インストールスクリプトを実行します: - -#### Google Colab - -**Run ComfyUI with localtunnel (Recommended Way)**ヘッダーのすぐ後ろに新しいコードセルを追加します(コードセルの前) -![colabでの追加方法のプレビュー](https://github.com/melMass/comfy_mtb/assets/7041726/35df2ef1-14f9-44cd-aa65-353829188cd7) - - -```python -# ノードをダウンロード -!git clone --recursive https://github.com/melMass/comfy_mtb.git custom_nodes/comfy_mtb - -# すべてのモデルをダウンロード -!python custom_nodes/comfy_mtb/scripts/download_models.py -y - -# 依存関係をインストール -!pip install -r custom_nodes/comfy_mtb/requirements.txt -f https://download.openmmlab.com/mmcv/dist/cu118/torch2.0/index.html +```bash +curl -sSL "https://raw.githubusercontent.com/username/repo/main/install.py" | python3 - ``` -これを実行した後、colabがランタイムを再起動するようにクレームをつける場合は、再起動してから以前のセルを再実行せずに、ローカルトンネルを実行するセルのみを実行します(最初に`%cd ComfyUI`というセルを追加する必要があるかもしれません...) - -> **注意**: -> すべてのモデルが必要ない場合は、collabは実際にユーザー入力をサポートしているため、`-y`を削除します: ![image](https://github.com/melMass/comfy_mtb/assets/7041726/40fc3602-f1d4-432a-98fd-ce2240f5ad06) - -> **プレビュー** -> ![image](https://github.com/melMass/comfy_mtb/assets/7041726/b5b2b2d9-f1e8-4c43-b1db-7dfc5e07be86) - - - -### モデルのダウンロード -一部のノードには追加のモデルのダウンロードが必要です。上記と同じPython環境を使用して対話的に行うことができます。 +## モデルのダウンロード +ノードによっては、追加モデルのダウンロードが必要な場合があるので、上記と同じ python 環境を使って対話的に行うことができる: ```bash python scripts/download_models.py ``` -その後、プロンプトに従ってモデルをダウンロードするか、単にEnterキーを押してすべてのモデルをダウンロードします。 +プロンプトに従うか、Enterを押すだけで全てのモデルをダウンロードできます。 -> **注意** -> プロンプトなしですべてのモデルをダウンロードするには、次のコマンドを使用します: + +> **Note** +> プロンプトを出さずに全てのモデルをダウンロードするには、以下のようにします: ```bash python scripts/download_models.py -y ``` -### Web拡張機能 +### ウェブ拡張機能 -最初の実行時に、スクリプトは[web拡張機能](https://github.com/melMass/comfy_mtb/tree/main/web)をComfyの`web/extensions`フォルダにシンボリックリンクしようとします。これが失敗する場合は、`mtb`フォルダを手動で`ComfyUI/web/extensions`にコピーしてください。現時点では、いくつかのノードで共有されるカラーウィジェットのみが提供されています。 +初回実行時にスクリプトは[web extensions](https://github.com/melMass/comfy_mtb/tree/main/web)をあなたの快適な `web/extensions` フォルダに[シンボリックリンク](https://github.com/melMass/comfy_mtb/blob/d982b69a58c05ccead9c49370764beaa4549992a/__init__.py#L45-L61)しようとします。万が一失敗した場合は、mtbフォルダを手動で`ComfyUI/web/extensions`にコピーしてください: + +color widget preview + +## 旧インストール方法 (MANUAL) +### 依存関係 + +

カスタム Virtualenv (私は主にこれを使っています)

+ +1. ComfyUIで使用しているPython環境であることを確認してください。 +2. 以下のコマンドを実行して、必要な依存関係をインストールします: + ```bash + pip install -r comfy_mtb/requirements.txt + ``` + +
+ +

Comfy-portable / standalone (ComfyUI リリースより)

。 + +もしあなたがComfyUIスタンドアロンから`python-embeded`を使用している場合、バイナリがホイールを持っていない場合、依存関係をpipでインストールすることができません。この場合、最後の[リリース](https://github.com/melMass/comfy_mtb/releases)をチェックしてください。(ソースからのビルドが必要なもののみ)あらかじめビルドされたホイールがあるlinuxとwindows用のバンドルがあります。詳細は[この問題(#1)](https://github.com/melMass/comfy_mtb/issues/1)をチェックしてください。 + +![image](https://github.com/melMass/comfy_mtb/assets/7041726/2934fa14-3725-427c-8b9e-2b4f60ba1b7b) + +
+ +

Google Colab

+ +ComfyUI with localtunnel (Recommended Way)**ヘッダーのすぐ後(コードセルの前)に、新しいコードセルを追加してください。 +![colabに追加する場所のプレビュー](https://github.com/melMass/comfy_mtb/assets/7041726/35df2ef1-14f9-44cd-aa65-353829188cd7) + +```python +# download the nodes +!git clone --recursive https://github.com/melMass/comfy_mtb.git custom_nodes/comfy_mtb + +# download all models +!python custom_nodes/comfy_mtb/scripts/download_models.py -y + +# install the dependencies +!pip install -r custom_nodes/comfy_mtb/requirements.txt -f https://download.openmmlab.com/mmcv/dist/cu118/torch2.0/index.html +``` +これを実行した後、colabがランタイムを再起動する必要があると文句を言ったら、それを実行し、それ以前のセルは再実行せず、localtunnelを実行するセルだけを再実行してください。(最初に`%cd ComfyUI`のセルを追加する必要があるかもしれません...) + + +> **Note**: +> すべてのモデルが必要でない場合は、`-y`を削除してください : ![image](https://github.com/melMass/comfy_mtb/assets/7041726/40fc3602-f1d4-432a-98fd-ce2240f5ad06) + +> **プレビュー** +> ![image](https://github.com/melMass/comfy_mtb/assets/7041726/b5b2b2d9-f1e8-4c43-b1db-7dfc5e07be86) + +
-color widget preview \ No newline at end of file diff --git a/INSTALL.md b/INSTALL.md index 3ccd5e0..2bf392d 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,13 +1,47 @@ # Installation - [Installation](#installation) - - [Dependencies](#dependencies) - - [Custom virtualenv (I use this mainly)](#custom-virtualenv-i-use-this-mainly) - - [Comfy-portable / standalone (from ComfyUI releases)](#comfy-portable--standalone-from-comfyui-releases) - - [Google Colab](#google-colab) - - [Models Download](#models-download) + - [Automatic Install (Recommended)](#automatic-install-recommended) + - [ComfyUI Manager](#comfyui-manager) + - [Virtual Env](#virtual-env) + - [Models Download](#models-download) - [Web Extensions](#web-extensions) + - [Old installation method (MANUAL)](#old-installation-method-manual) + - [Dependencies](#dependencies) +## Automatic Install (Recommended) +### ComfyUI Manager + +As of version 0.1.0, this extension is meant to be installed with the [ComfyUI-Manager](https://github.com/ltdrdata/ComfyUI-Manager), which helps a lot with handling the various install issues faced by various environments. + +### Virtual Env +There is also an experimental one liner install using the following command from ComfyUI's root. It will download the code, install the dependencies and run the install script: + +```bash +curl -sSL "https://raw.githubusercontent.com/username/repo/main/install.py" | python3 - +``` + +## Models Download +Some nodes require extra models to be downloaded, you can interactively do it using the same python environment as above: +```bash +python scripts/download_models.py +``` + +then follow the prompt or just press enter to download every models. + +> **Note** +> You can use the following to download all models without prompt: + ```bash + python scripts/download_models.py -y + ``` + +### Web Extensions + +On first run the script [tries to symlink](https://github.com/melMass/comfy_mtb/blob/d982b69a58c05ccead9c49370764beaa4549992a/__init__.py#L45-L61) the [web extensions](https://github.com/melMass/comfy_mtb/tree/main/web) to your comfy `web/extensions` folder. In case it fails you can manually copy the mtb folder to `ComfyUI/web/extensions` it only provides a color widget for now shared by a few nodes: + +color widget preview + +## Old installation method (MANUAL) ### Dependencies

Custom Virtualenv (I use this mainly)

@@ -55,23 +89,3 @@ If after running this, colab complains about needing to restart runtime, do it,
- -### Models Download -Some nodes require extra models to be downloaded, you can interactively do it using the same python environment as above: -```bash -python scripts/download_models.py -``` - -then follow the prompt or just press enter to download every models. - -> **Note** -> You can use the following to download all models without prompt: - ```bash - python scripts/download_models.py -y - ``` - -### Web Extensions - -On first run the script [tries to symlink](https://github.com/melMass/comfy_mtb/blob/d982b69a58c05ccead9c49370764beaa4549992a/__init__.py#L45-L61) the [web extensions](https://github.com/melMass/comfy_mtb/tree/main/web) to your comfy `web/extensions` folder. In case it fails you can manually copy the mtb folder to `ComfyUI/web/extensions` it only provides a color widget for now shared by a few nodes: - -color widget preview