Compare commits

..
19 Commits
Author SHA1 Message Date
melMass e2c456147c fix: 🤦 add missing file 2023-06-28 23:17:25 +02:00
Mel Massadian 572b4d52bc ci: 🚀 add gh action (#4) 2023-06-28 23:12:54 +02:00
melMass bcf55ca9a3 fix: ✨ small edits 2023-06-28 03:54:47 +02:00
melMass 2dae02056a fix: ⚡️ add support for batch in roop
also adds an image resizer that supports batch
2023-06-27 20:51:36 +02:00
melMass 793784a5fd fix: 🔥 various preparing for the first tag 2023-06-27 20:49:37 +02:00
melMass afd0843145 fix: 🐛 various bugs 2023-06-25 14:07:36 +02:00
Mel Massadian 9a2d52325f docs: 📝 add rembg screenshot 2023-06-25 13:37:24 +02:00
Mel Massadian e162336cd3 docs: 📝 add a few screenshots 2023-06-25 13:24:48 +02:00
melMass 966a14b40d feat: 💄 faceswap node using roop
Very interesting even as a face restoration utility.
2023-06-23 04:57:08 +02:00
melMass 647bf9e941 feat: ✨ sync local changes 2023-06-23 04:53:43 +02:00
melMass 37abf8aad1 feat: ✨ bbox from alpha 2023-06-23 04:04:48 +02:00
melMass f59b68e3ad feat: ✨ a111 like style loader 2023-06-23 04:00:22 +02:00
melMass 9a2e986327 feat: ✨ add a color type and widget
The widget part is very much WIP... an input takes precedence over the
widget. i.e the widget is only used if there is no input.
2023-06-23 03:51:14 +02:00
melMass 7f3070debb docs: 📝 update readme 2023-06-18 17:16:29 +02:00
melMass 7e86b0ed4d fix: ⚡️ add missing controls to QRCode 2023-06-18 16:53:54 +02:00
melMass 811443b921 feat: ✨ add a few nodes
- QRCode: self explanatory
- SmartStep: a very basic node to get percent of steps, to use
  in KSample Advanced.
- ImageDeglaze: taken from this archived repo
  https://github.com/Fannovel16/FN16-ComfyUI-nodes/commit/f5ecf948e11a4912e9ee3925c5ea73c4434b6c89
2023-06-18 16:41:49 +02:00
melMass 3fb871651b feat: ✨ add SadTalker as a submodule 2023-06-13 18:35:27 +02:00
melMass 6cac344f6f feat: 🚨 push local changes 2023-06-13 16:49:00 +02:00
melMass 1ae3bbc89a feat: ⚡️ initial commit 2023-06-03 20:05:19 +02:00
361 changed files with 3252 additions and 805 deletions
+74
View File
@@ -0,0 +1,74 @@
name: 📦 Building wheels
on:
workflow_dispatch:
# push:
# tags:
# - "v*"
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
platform: win32
arch: x64
# - os: macos-latest
# platform: darwin
# arch: arm64
- os: ubuntu-latest
platform: linux
arch: x64
runs-on: ${{ matrix.os }}
env:
archive_name: deps-wheels_${{ matrix.os }}-${{ matrix.platform }}-${{ matrix.arch }}
steps:
- name: ♻️ Checking out the repository
uses: actions/checkout@v3
- name: "🐍 Setting up Python"
uses: actions/setup-python@v4
with:
python-version: "3.10.9"
- 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
# find source wheels
packages=$(cat build.log | awk -F 'Building wheels for collected packages: ' '{print $2}')
packages=$(echo "$packages" | tr -d '[:space:]')
IFS=', ' read -r -a package_array <<< "$packages"
printf "Autodetect this source package: \e[32m%s\e[0m\n" "${package_array[@]}"
# Iterate through the wheel files and remove those that are not source built
for wheel_file in ./wheels/*.whl; do
# Extract the package name from the wheel filename
package_name=$(basename "$wheel_file" .whl | awk -F '-' '{print $1}')
printf "Checking package: %s\n" "$package_name"
# Check if the package is not in the array of source built packages
if [[ ! " ${package_array[@]} " =~ " ${package_name} " ]]; then
echo "Removing $wheel_file"
rm "$wheel_file"
fi
done
if [ "$RUNNER_OS" == "Windows" ]; then
"C:/Program Files/7-Zip/7z.exe" a -mfb=258 -tzip ${{ env.archive_name }}.zip wheels
else
zip -r -9 -y -m ${{ env.archive_name }}.zip wheels
fi
- name: 💾 Store cache
uses: actions/cache/save@v3
with:
path: ${{ env.archive_name }}.zip
key: ${{ env.archive_name }}
+79
View File
@@ -0,0 +1,79 @@
name: 📦 Release
on:
workflow_dispatch:
inputs:
name:
description: Release tag / name ?
required: true
default: "latest"
type: string
environment:
description: Environment to run tests against
type: environment
required: false
# push:
# tags:
# - "v*"
jobs:
release:
permissions:
contents: write
runs-on: ubuntu-latest
env:
repo_name: ${{ github.event.repository.name }}
steps:
- name: ♻️ Checking out the repository
uses: actions/checkout@v3
with:
submodules: "recursive"
path: ${{ env.repo_name }}
- name: 📦 Building custom comfy nodes
shell: bash
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
"C:/Program Files/7-Zip/7z.exe" a -mfb=258 -tzip ${{ env.repo_name }}-${{ inputs.name }}.zip ${{ env.repo_name }}
else
zip -r -9 -y -m ${{ env.repo_name }}-${{ inputs.name }}.zip ${{ env.repo_name }}
fi
- name: ✅ Create release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ inputs.name }}
files: |
${{ env.repo_name }}-${{ inputs.name }}.zip
release-wheels:
permissions:
contents: write
strategy:
fail-fast: true
matrix:
include:
- os: windows-latest
platform: win32
arch: x64
# - os: macos-latest
# platform: darwin
# arch: arm64
- os: ubuntu-latest
platform: linux
arch: x64
runs-on: ${{ matrix.os }}
env:
archive_name: deps-wheels_${{ matrix.os }}-${{ matrix.platform }}-${{ matrix.arch }}
steps:
- name: 💾 Restore cache
uses: actions/cache/restore@v3
id: cache
with:
path: ${{ env.archive_name }}.zip
key: ${{ env.archive_name }}
- name: ✅ Add wheels to release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ inputs.name }}
files: |
${{ env.archive_name }}.zip
+2 -3
View File
@@ -1,4 +1,3 @@
.svelte-kit
__pycache__
node_modules
.DS_Store
*.py[cod]
*.onnx
+3
View File
@@ -0,0 +1,3 @@
[submodule "extern/SadTalker"]
path = extern/SadTalker
url = https://github.com/OpenTalker/SadTalker.git
View File
+59
View File
@@ -0,0 +1,59 @@
## MTB Nodes
Feel free to do whatever you want with this codebase, I'm mainly using Comfy to build POCs to implement in [MLOPs](https://github.com/Bismuth-Consultancy-BV/MLOPs). And a lot of nodes are inspired by existing ones from the community or builtin
Just beware of the licenses of some libraries (deepbump for instance is [GPLv3](https://github.com/HugoTini/DeepBump/blob/master/LICENSE))
## Install
From within the python environment you already use for ComfyUI install the requirements.
```bash
pip install -r comfy_mtb/requirements.txt
```
## Screenshots
- **FaceSwap [roop]** (using [roop](https://github.com/s0md3v/roop/))
The face index allow you to choose which face to replace as you can see here:
![ComfyUI_909](https://github.com/melMass/comfy_mtb/assets/7041726/2e9d6066-c466-4a01-bd6c-315f7f1e8b42)
- **Style Loader**: A111 like csv styles in Comfy
![image](https://github.com/melMass/comfy_mtb/assets/7041726/02fe3211-18ee-4e54-a029-931388f5fde8)
- **Color Correction**: basic color correction node
![image](https://github.com/melMass/comfy_mtb/assets/7041726/7c20ac83-31ff-40ea-a1a0-06c2acefb2ef)
- **Image Remove Background [RemBG]**: (using [rembg](https://github.com/danielgatis/rembg))
![image](https://github.com/melMass/comfy_mtb/assets/7041726/e69253b4-c03c-45e9-92b5-aa46fb887be8)
### Node List
- `Latent Lerp`: Linear Interpolate between two latents,
- `Int to Number`: Supplement for WASSuite number nodes,
- `Bounding Box`: BBox constructor (custom type),
- `Crop`: Crop image from BBox,
- `Uncrop`: Uncrop image from BBox,
- `ImageBlur`: Blur the input image,
- `Denoise`: Denoise the input image,
- `ImageCompare`: Compare image,
- `RGB to HSV`: -,
- `HSV to RGB`: -,
- `Color Correct`: Basic color correction tools,
- `Modulo`: Modulo (useful for loops),
- `Deglaze Image`: taken from [FN16](https://github.com/Fannovel16/FN16-ComfyUI-nodes/blob/main/DeglazeImage.py),
- `Smart Step`: A very basic node to get step percent to use in KSampler advanced,
### Comfy Resources
**Guides**:
- [Official Examples (eng)](https://comfyanonymous.github.io/ComfyUI_examples/)
- [ComfyUI Community Manual (eng)](https://blenderneko.github.io/ComfyUI-docs/) by @BlenderNeko
- [Tomoaki's personal Wiki (jap)](https://comfyui.creamlab.net/guides/) by @tjhayasaka
**Extensions and Custom Nodes**:
- [Plugins for Comfy List (eng)](https://github.com/WASasquatch/comfyui-plugins) by @WASasquatch
- [ComfyUI tag on CivitAI (eng)](https://civitai.com/tag/comfyui)
+74
View File
@@ -0,0 +1,74 @@
import traceback
from .log import log, blue_text, get_summary, get_label
from .utils import here
import importlib
import os
NODE_CLASS_MAPPINGS = {}
NODE_CLASS_MAPPINGS_DEBUG = {}
def load_nodes():
errors = []
nodes = []
for filename in (here / "nodes").iterdir():
if filename.suffix == ".py":
module_name = filename.stem
try:
module = importlib.import_module(
f".nodes.{module_name}", package=__package__
)
_nodes = getattr(module, "__nodes__")
nodes.extend(_nodes)
log.debug(f"Imported {module_name} nodes")
except AttributeError:
pass # wip nodes
except Exception:
error_message = traceback.format_exc().splitlines()[-1]
errors.append(f"Failed to import {module_name} because {error_message}")
if errors:
log.error(
f"Some nodes failed to load:\n\t"
+ "\n\t".join(errors)
+ "\n\n"
+ "Check that you properly installed the dependencies.\n"
+ "If you think this is a bug, please report it on the github page (https://github.com/melMass/comfy_mtb/issues)"
)
return nodes
# - REGISTER WEB EXTENSIONS
web_extensions_root = utils.comfy_dir / "web" / "extensions"
web_mtb = web_extensions_root / "mtb"
if web_mtb.exists():
log.debug(f"Web extensions folder found at {web_mtb}")
elif web_extensions_root.exists():
os.symlink((here / "web"), web_mtb.as_posix())
else:
log.error(
f"Comfy root probably not found automatically, please copy the folder {web_mtb} manually in the web/extensions folder of ComfyUI"
)
# - REGISTER NODES
nodes = load_nodes()
for node_class in nodes:
class_name = node_class.__name__
class_name = node_class.__name__
node_name = f"{get_label(class_name)} (mtb)"
NODE_CLASS_MAPPINGS[node_name] = node_class
NODE_CLASS_MAPPINGS_DEBUG[node_name] = node_class.__doc__
log.debug(
f"Loaded the following nodes:\n\t"
+ "\n\t".join(
f"{k}: {blue_text(get_summary(doc)) if doc else '-'}"
for k, doc in NODE_CLASS_MAPPINGS_DEBUG.items()
)
)
View File
-38
View File
@@ -1,38 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="https://fav.farm/⚡️" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="modulepreload" href="/comfy_mtb/_app/immutable/entry/start.B_2iSefo.js">
<link rel="modulepreload" href="/comfy_mtb/_app/immutable/chunks/entry.DFosKZrm.js">
<link rel="modulepreload" href="/comfy_mtb/_app/immutable/chunks/utils.C1SWMJ6M.js">
<link rel="modulepreload" href="/comfy_mtb/_app/immutable/entry/app.DtSbs4z-.js">
<link rel="modulepreload" href="/comfy_mtb/_app/immutable/chunks/preload-helper.C56uK8e9.js">
<link rel="modulepreload" href="/comfy_mtb/_app/immutable/chunks/store.DYqNbYNW.js">
<link rel="modulepreload" href="/comfy_mtb/_app/immutable/chunks/index-client.nC1_6-Ml.js">
<link rel="modulepreload" href="/comfy_mtb/_app/immutable/chunks/this.Ju-dO593.js">
</head>
<body data-sveltekit-preload-data="hover">
<div style="display: contents">
<script>
{
__sveltekit_q2xodv = {
base: "/comfy_mtb",
assets: "/comfy_mtb"
};
const element = document.currentScript.parentElement;
Promise.all([
import("/comfy_mtb/_app/immutable/entry/start.B_2iSefo.js"),
import("/comfy_mtb/_app/immutable/entry/app.DtSbs4z-.js")
]).then(([kit, app]) => {
kit.start(app, element);
});
}
</script>
</div>
</body>
</html>
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
-1
View File
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
-1
View File
@@ -1 +0,0 @@
export const env={}
-1
View File
@@ -1 +0,0 @@
€export const env={}
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
@@ -1 +0,0 @@
.markdown-callout-title{color:var(--current-color);font-weight:700;padding:.5em;padding-inline-start:1em}.markdown-callout-content{padding:1em}.markdown-callout{--radius: 8px;--current-color: purple;border-left:3px solid var(--current-color);margin-bottom:1em;margin-top:1em}.markdown-callout-tip{--text-color: whitesmoke;--current-color: #50e3c2}.markdown-callout-note{--text-color: whitesmoke;--current-color: #0070f3}.markdown-callout-important{--text-color: whitesmoke;--current-color: #7928ca}.markdown-callout-warning{--current-color: #f5a623}.markdown-callout-caution{--current-color: #e60000}html[data-theme=light] .shiki,html[data-theme=light] .shiki>span{background-color:var(--shiki-light-bg)}html[data-theme=light] .shiki,html[data-theme=light] .shiki span{color:var(--shiki-light);font-style:var(--shiki-light-font-style);font-weight:var(--shiki-light-font-weight);-webkit-text-decoration:var(--shiki-light-text-decoration);text-decoration:var(--shiki-light-text-decoration)}html[data-theme=pastel] .shiki,html[data-theme=pastel] .shiki>span{background-color:var(--shiki-pastel-bg)}html[data-theme=pastel] .shiki,html[data-theme=pastel] .shiki span{color:var(--shiki-pastel);font-style:var(--shiki-pastel-font-style);font-weight:var(--shiki-pastel-font-weight);-webkit-text-decoration:var(--shiki-pastel-text-decoration);text-decoration:var(--shiki-pastel-text-decoration)}html[data-theme=dark] .shiki,html[data-theme=dark] .shiki>span{background-color:var(--shiki-dark-bg)}html[data-theme=dark] .shiki,html[data-theme=dark] .shiki span{color:var(--shiki-dark);font-style:var(--shiki-dark-font-style);font-weight:var(--shiki-dark-font-weight);-webkit-text-decoration:var(--shiki-dark-text-decoration);text-decoration:var(--shiki-dark-text-decoration)}pre.shiki{position:relative;z-index:1;padding:1.5rem 0;background:transparent;border-radius:.5rem}pre.shiki code{display:block;padding:0 1.5rem;transition:color .5s}.shiki.has-focused .line:not(.focused){opacity:.7;transition:filter .35s,opacity .35s;filter:blur(1.25px)}.shiki.has-focused:focus .line:not(.focused),.shiki.has-focused:hover .line:not(.focused){opacity:1;filter:blur(0)}.shiki code .diff,.shiki code .highlighted{transition:background-color .5s;margin:0 -1.5rem;padding:0 1.5rem;width:100%;display:inline-block}.shiki code .diff:before{position:absolute;left:10px}.shiki code .diff.add{background-color:#46954a26}.shiki code .diff.add:before{content:"+";color:#57ab5a}.shiki code .diff.remove{background-color:#e5534b1a;opacity:.7}.shiki code .diff.remove:before{content:"-";color:#f47067}.shiki code .highlighted{background-color:#636e7b1a!important}.shiki code .highlighted.error{background-color:#e5534b26!important}.shiki code .highlighted.warning{background-color:#ae7c1426!important}.shiki .highlighted-word{background-color:#4184e466!important;border:1px solid rgba(65,132,228,.6)!important;padding:1px 3px;margin:-1px -3px;border-radius:4px}
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
@@ -1 +0,0 @@
.markdown-callout-title{color:var(--current-color);font-weight:700;padding:.5em;padding-inline-start:1em}.markdown-callout-content{padding:1em}.markdown-callout{--radius: 8px;--current-color: purple;border-left:3px solid var(--current-color);margin-bottom:1em;margin-top:1em}.markdown-callout-tip{--text-color: whitesmoke;--current-color: #50e3c2}.markdown-callout-note{--text-color: whitesmoke;--current-color: #0070f3}.markdown-callout-important{--text-color: whitesmoke;--current-color: #7928ca}.markdown-callout-warning{--current-color: #f5a623}.markdown-callout-caution{--current-color: #e60000}html[data-theme=light]{.shiki,.shiki>span{background-color:var(--shiki-light-bg)}.shiki,.shiki span{color:var(--shiki-light);font-style:var(--shiki-light-font-style);font-weight:var(--shiki-light-font-weight);-webkit-text-decoration:var(--shiki-light-text-decoration);text-decoration:var(--shiki-light-text-decoration)}}html[data-theme=pastel]{.shiki,.shiki>span{background-color:var(--shiki-pastel-bg)}.shiki,.shiki span{color:var(--shiki-pastel);font-style:var(--shiki-pastel-font-style);font-weight:var(--shiki-pastel-font-weight);-webkit-text-decoration:var(--shiki-pastel-text-decoration);text-decoration:var(--shiki-pastel-text-decoration)}}html[data-theme=dark]{.shiki,.shiki>span{background-color:var(--shiki-dark-bg)}.shiki,.shiki span{color:var(--shiki-dark);font-style:var(--shiki-dark-font-style);font-weight:var(--shiki-dark-font-weight);-webkit-text-decoration:var(--shiki-dark-text-decoration);text-decoration:var(--shiki-dark-text-decoration)}}pre.shiki{position:relative;z-index:1;padding:1.5rem 0;background:transparent;border-radius:.5rem}pre.shiki code{display:block;padding:0 1.5rem;transition:color .5s}.shiki.has-focused .line:not(.focused){opacity:.7;transition:filter .35s,opacity .35s;filter:blur(1.25px)}.shiki.has-focused:focus .line:not(.focused),.shiki.has-focused:hover .line:not(.focused){opacity:1;filter:blur(0)}.shiki code .diff,.shiki code .highlighted{transition:background-color .5s;margin:0 -1.5rem;padding:0 1.5rem;width:100%;display:inline-block}.shiki code .diff:before{position:absolute;left:10px}.shiki code .diff.add{background-color:#46954a26}.shiki code .diff.add:before{content:"+";color:#57ab5a}.shiki code .diff.remove{background-color:#e5534b1a;opacity:.7}.shiki code .diff.remove:before{content:"-";color:#f47067}.shiki code .highlighted{background-color:#636e7b1a!important}.shiki code .highlighted.error{background-color:#e5534b26!important}.shiki code .highlighted.warning{background-color:#ae7c1426!important}.shiki .highlighted-word{background-color:#4184e466!important;border:1px solid rgba(65,132,228,.6)!important;padding:1px 3px;margin:-1px -3px;border-radius:4px}
Binary file not shown.
Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More