Compare commits
2
Commits
v0.0.1
..
gh-release
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9f982c205a | ||
|
|
5d7950abb9 |
@@ -1,74 +0,0 @@
|
||||
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 }}
|
||||
@@ -1,79 +0,0 @@
|
||||
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
|
||||
+3
-2
@@ -1,3 +1,4 @@
|
||||
.svelte-kit
|
||||
__pycache__
|
||||
*.py[cod]
|
||||
*.onnx
|
||||
node_modules
|
||||
.DS_Store
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
[submodule "extern/SadTalker"]
|
||||
path = extern/SadTalker
|
||||
url = https://github.com/OpenTalker/SadTalker.git
|
||||
@@ -1,59 +0,0 @@
|
||||
## 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:
|
||||

|
||||
|
||||
- **Style Loader**: A111 like csv styles in Comfy
|
||||

|
||||
|
||||
- **Color Correction**: basic color correction node
|
||||

|
||||
|
||||
- **Image Remove Background [RemBG]**: (using [rembg](https://github.com/danielgatis/rembg))
|
||||

|
||||
|
||||
|
||||
|
||||
### 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
@@ -1,74 +0,0 @@
|
||||
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()
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,38 @@
|
||||
<!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>
|
||||
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.
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.
@@ -0,0 +1 @@
|
||||
export const env={}
|
||||
@@ -0,0 +1 @@
|
||||
€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.
@@ -0,0 +1 @@
|
||||
.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.
@@ -0,0 +1 @@
|
||||
.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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user