Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 🚀 release 0.1.0 #22

Merged
merged 43 commits into from
Jul 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
c225da5
fix: 🚑️ TF by default fills vram
melMass Jul 14, 2023
629e2b5
feat: 🎨 add support for image.size(0) == 0
melMass Jul 14, 2023
3faadc4
feat: 🔥 add batch support for load image sequence
melMass Jul 15, 2023
da559b9
docs: 📝 add jp and cn (using deep translation)
melMass Jul 16, 2023
38f6147
feat: ✨ extract node names using ast
melMass Jul 16, 2023
cde7293
feat: ✨ WIP batch from history
melMass Jul 16, 2023
69e59ba
Merge branch 'main' into dev/next-release
melMass Jul 16, 2023
6168b3a
fix: ⚡️ from tensor2np always returning a list
melMass Jul 17, 2023
5f5297f
feat: ✨ added a way to export the node list
melMass Jul 18, 2023
ab09cca
fix: ⚡️ a few missing __doc__
melMass Jul 18, 2023
b9c1d3d
feat: 🚀 add a few examples
melMass Jul 18, 2023
b5176ca
docs: 📝 add preview for examples
melMass Jul 18, 2023
cbe67ed
docs: 📝 add model notice
melMass Jul 18, 2023
46eab5c
docs: 📝 add more description to examples
melMass Jul 18, 2023
3c3c438
docs: 📝 fold each comfy mode
melMass Jul 18, 2023
0cc54e5
chore: ✨ before categorize
melMass Jul 19, 2023
d2b3962
feat: ✨ categorize
melMass Jul 19, 2023
95afbdb
feat: 🔥 add API endpoints
melMass Jul 21, 2023
aa551eb
feat: ✨ add FitNumber node
melMass Jul 21, 2023
8a59508
fix: 🐛 tensor2pil
melMass Jul 21, 2023
67d3783
fix: 🐛 crop nodes
melMass Jul 21, 2023
b27b8ef
feat: 🚀 debug node
melMass Jul 21, 2023
e480d07
refactor: 🚧 remove color_widget
melMass Jul 21, 2023
91bb95d
feat: ✨comfy_widget shared utils
melMass Jul 21, 2023
9aa934f
fix: 🔥 deprecate some nodes and fix image list
melMass Jul 21, 2023
27500ca
fix: ✨ Various widgets issues
melMass Jul 21, 2023
44eaae5
feat: 🚧 add my CLIs
melMass Jul 21, 2023
68c250e
refactor: ♻️ remove test
melMass Jul 21, 2023
c2e8379
fix: 🎨 refactor and add Gif preview on node
melMass Jul 21, 2023
0950f99
fix: 🐛 add base64 prefix to outputs
melMass Jul 21, 2023
4d8ddac
refactor: ♻️ removes a few nodes, moved other around
melMass Jul 21, 2023
18402e3
fix: 🚑️ set debug level from endpoint
melMass Jul 21, 2023
c794d6a
fix: ⚡️ update node_list
melMass Jul 21, 2023
4e6b877
fix: 🎉 remove tests & add missing docs
melMass Jul 21, 2023
dad3966
feat: 🚀 add install script
melMass Jul 22, 2023
7e301e2
fix: 🐛 install logic
melMass Jul 22, 2023
fccf313
fix: 🚑️ always use latest for now
melMass Jul 22, 2023
7335003
fix: 💄 save gif issues
melMass Jul 22, 2023
ee17d57
test: 🔧 pipe detection
melMass Jul 22, 2023
3c66de2
fix: 🚀 try to support remote install too
melMass Jul 22, 2023
b40730d
fix: ✨ install process tested in comfy-manager (embed, colab)
melMass Jul 22, 2023
0df55de
fix: ✨ also try to copy web if symlink fails
melMass Jul 22, 2023
7be37db
feat: ✨ update install instructions
melMass Jul 22, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/package_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ jobs:
- name: 📦 Building and Bundling wheels
shell: bash
run: |
python -m pip wheel --no-cache-dir -r requirements-wheels.txt -w ./wheels > build.log

cat build.log
python -m pip wheel --no-cache-dir --no-deps -r requirements-wheels.txt -w ./wheels 2>&1 | tee build.log

# find source wheels
packages=$(cat build.log | awk -F 'Building wheels for collected packages: ' '{print $2}')
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
__pycache__
*.py[cod]
*.onnx
wheels/
node_modules/
93 changes: 93 additions & 0 deletions INSTALL-CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# 安装
- [安装](#安装)
- [自动安装(推荐)](#自动安装推荐)
- [ComfyUI 管理器](#comfyui-管理器)
- [虚拟环境](#虚拟环境)
- [模型下载](#模型下载)
- [网络扩展](#网络扩展)
- [旧的安装方法 (MANUAL)](#旧的安装方法-manual)
- [依赖关系](#依赖关系)
### 自动安装(推荐)

### ComfyUI 管理器

从 0.1.0 版开始,该扩展将使用 [ComfyUI-Manager](https://github.com/ltdrdata/ComfyUI-Manager) 进行安装,这对处理各种环境下的各种安装问题大有帮助。

### 虚拟环境
还有一种试验性的单行安装方法,即在 ComfyUI 根目录下使用以下命令进行安装。它将下载代码、安装依赖项并运行安装脚本:


```bash
curl -sSL "https://raw.githubusercontent.com/username/repo/main/install.py" | python3 -
```

## 模型下载
某些节点需要下载额外的模型,您可以使用与上述相同的 python 环境以交互方式完成下载:

```bash
python scripts/download_models.py
```

然后根据提示或直接按回车键下载每个模型。

> **Note**
> 您可以使用以下方法下载所有型号,无需提示:
```bash
python scripts/download_models.py -y
```

#### 网络扩展

首次运行时,脚本会尝试将 [网络扩展](https://github.com/melMass/comfy_mtb/tree/main/web)链接到你的 "web/extensions "文件夹,[请参阅](https://github.com/melMass/comfy_mtb/blob/d982b69a58c05ccead9c49370764beaa4549992a/__init__.py#L45-L61)。

<img alt="color widget preview" src="https://github.com/melMass/comfy_mtb/assets/7041726/cff7e66a-4cc4-4866-b35b-10af0bb2d110" width=450>

### 旧的安装方法 (MANUAL)
### 依赖关系
<details><summary><h4>Custom Virtualenv(我主要用这个)</h4></summary

1. 确保您处于用于 ComfyUI 的 Python 环境中。
2. 运行以下命令安装所需的依赖项:
```bash
pip install -r comfy_mtb/requirements.txt
```

</details>

<details><summary><h4>Comfy 便携式/单机版(来自 ComfyUI 版本)</h4></summary>

如果您使用 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)


</details>

<details><summary><h4>Google Colab</h4></summary>

在 **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)

</details>

93 changes: 93 additions & 0 deletions INSTALL-JP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# インストール

- [インストール](#インストール)
- [自動インストール (推奨)](#自動インストール-推奨)
- [ComfyUI マネージャ](#comfyui-マネージャ)
- [仮想環境](#仮想環境)
- [モデルのダウンロード](#モデルのダウンロード)
- [ウェブ拡張機能](#ウェブ拡張機能)
- [旧インストール方法 (MANUAL)](#旧インストール方法-manual)
- [依存関係](#依存関係)


## 自動インストール (推奨)

### ComfyUI マネージャ

バージョン0.1.0では、この拡張機能は[ComfyUI-Manager](https://github.com/ltdrdata/ComfyUI-Manager)と一緒にインストールすることを想定しています。これは、様々な環境で直面する様々なインストール問題を処理するのに非常に役立ちます。

### 仮想環境
また、ComfyUIのルートから以下のコマンドを使用する実験的なワンライナー・インストールもあります。これはコードをダウンロードし、依存関係をインストールし、インストールスクリプトを実行します:

```bash
curl -sSL "https://raw.githubusercontent.com/username/repo/main/install.py" | python3 -
```

## モデルのダウンロード
ノードによっては、追加モデルのダウンロードが必要な場合があるので、上記と同じ python 環境を使って対話的に行うことができる:
```bash
python scripts/download_models.py
```

プロンプトに従うか、Enterを押すだけで全てのモデルをダウンロードできます。


> **Note**
> プロンプトを出さずに全てのモデルをダウンロードするには、以下のようにします:
```bash
python scripts/download_models.py -y
```

### ウェブ拡張機能

初回実行時にスクリプトは[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`にコピーしてください:

<img alt="color widget preview" src="https://github.com/melMass/comfy_mtb/assets/7041726/cff7e66a-4cc4-4866-b35b-10af0bb2d110" width=450>

## 旧インストール方法 (MANUAL)
### 依存関係

<details><summary><h4>カスタム Virtualenv (私は主にこれを使っています)</h4></summary>

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

</details>

<details><summary><h4>Comfy-portable / standalone (ComfyUI リリースより)</h4></summary>。

もしあなたが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)

</details>

<details><summary><h4>Google Colab</h4></summary>

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)

</details>

80 changes: 50 additions & 30 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,68 @@
# 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)

### Dependencies
### 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.

#### Custom virtualenv (I use this mainly)
### 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:

<img alt="color widget preview" src="https://github.com/melMass/comfy_mtb/assets/7041726/cff7e66a-4cc4-4866-b35b-10af0bb2d110" width=450>

## Old installation method (MANUAL)
### Dependencies
<details><summary><h4>Custom Virtualenv (I use this mainly)</h4></summary>

1. Make sure you are in the Python environment you use for ComfyUI.
2. Install the required dependencies by running the following command:
```bash
pip install -r comfy_mtb/requirements.txt
```
#### Comfy-portable / standalone (from ComfyUI releases)

</details>

<details><summary><h4>Comfy-portable / standalone (from ComfyUI releases)</h4></summary>

If you use the `python-embeded` from ComfyUI standalone then you are not able to pip install dependencies with binaries when they don't have wheels, in this case check the last [release](https://github.com/melMass/comfy_mtb/releases) there is a bundle for linux and windows with prebuilt wheels (only the ones that require building from source), check [this issue (#1)](https://github.com/melMass/comfy_mtb/issues/1) for more info.
![image](https://github.com/melMass/comfy_mtb/assets/7041726/2934fa14-3725-427c-8b9e-2b4f60ba1b7b)


#### Google Colab

</details>

<details><summary><h4>Google Colab</h4></summary>

Add a new code cell just after the **Run ComfyUI with localtunnel (Recommended Way)** header (before the code cell)
![preview of where to add it on colab](https://github.com/melMass/comfy_mtb/assets/7041726/35df2ef1-14f9-44cd-aa65-353829188cd7)
Expand All @@ -43,29 +82,10 @@ If after running this, colab complains about needing to restart runtime, do it,


> **Note**:
> If you don't need all models, remove the `-y` as collab actually supportd user input: ![image](https://github.com/melMass/comfy_mtb/assets/7041726/40fc3602-f1d4-432a-98fd-ce2240f5ad06)
> 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)

</details>


### 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:

<img alt="color widget preview" src="https://github.com/melMass/comfy_mtb/assets/7041726/cff7e66a-4cc4-4866-b35b-10af0bb2d110" width=450>
Loading