Compare commits
62
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
62f8e388bb | ||
|
|
f86c08baed | ||
|
|
7f64bcc3ae | ||
|
|
8359d1c783 | ||
|
|
dca27fe2ba | ||
|
|
0ae70835c4 | ||
|
|
99cda529a9 | ||
|
|
7e640a0da4 | ||
|
|
f19b80a25d | ||
|
|
1ba7640d7f | ||
|
|
6ecf9c782b | ||
|
|
1904b4bdbf | ||
|
|
4112e0ec8c | ||
|
|
171a227856 | ||
|
|
051db3c394 | ||
|
|
757868deaf | ||
|
|
7b1e7afb62 | ||
|
|
9f65ce72a5 | ||
|
|
a424e391d1 | ||
|
|
6add68599b | ||
|
|
b3df94d1af | ||
|
|
26b149553b | ||
|
|
17683d353c | ||
|
|
7552353e30 | ||
|
|
d619ad7f3b | ||
|
|
f0ed0ad8f7 | ||
|
|
7fce0b4976 | ||
|
|
0e218752ca | ||
|
|
4073a43d3d | ||
|
|
3d6a554f7f | ||
|
|
ce939fbe1b | ||
|
|
48f5ce15d7 | ||
|
|
9512437573 | ||
|
|
649e431227 | ||
|
|
411db66d81 | ||
|
|
67f25b2353 | ||
|
|
ce3b0dbe84 | ||
|
|
fc36a8ad0f | ||
|
|
638e625d72 | ||
|
|
230cee40d2 | ||
|
|
73853a60ff | ||
|
|
413115571b | ||
|
|
bf00580562 | ||
|
|
6ed468d7d4 | ||
|
|
5423b4ee6f | ||
|
|
2c1656756d | ||
|
|
ac843527d9 | ||
|
|
f39d216326 | ||
|
|
40ec37e58f | ||
|
|
1d63b21643 | ||
|
|
0e3baf22df | ||
|
|
1837065ed2 | ||
|
|
9a8f4795d1 | ||
|
|
c0c617c5d2 | ||
|
|
1e33435ae5 | ||
|
|
04161071f2 | ||
|
|
32d574475c | ||
|
|
1a017ee6a3 | ||
|
|
603223741a | ||
|
|
2bd8b23c60 | ||
|
|
a82e315d6c | ||
|
|
7fdfba6b6e |
@@ -7,15 +7,19 @@ on:
|
||||
paths:
|
||||
- "pyproject.toml"
|
||||
|
||||
permissions:
|
||||
issues: write
|
||||
|
||||
jobs:
|
||||
publish-node:
|
||||
name: Publish Custom Node to registry
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.repository_owner == 'BennyKok' }}
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
- name: Publish Custom Node
|
||||
uses: Comfy-Org/publish-node-action@main
|
||||
uses: Comfy-Org/publish-node-action@v1
|
||||
with:
|
||||
## Add your own personal access token to your Github Repository secrets and reference it here.
|
||||
personal_access_token: ${{ secrets.REGISTRY_ACCESS_TOKEN }}
|
||||
personal_access_token: ${{ secrets.REGISTRY_ACCESS_TOKEN }}
|
||||
|
||||
+2
-1
@@ -1,2 +1,3 @@
|
||||
__pycache__
|
||||
.DS_Store
|
||||
.DS_Store
|
||||
file-hash-cache.json
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
Open source comfyui deployment platform, a `vercel` for generative workflow infra. (serverless hosted gpu with vertical intergation with comfyui)
|
||||
|
||||
> [!NOTE]
|
||||
> Im looking for creative hacker to join ComfyDeploy's core team! DM me on [twitter](https://x.com/BennyKokMusic)
|
||||
|
||||
Join [Discord](https://discord.gg/EEYcQmdYZw) to chat more or visit [Comfy Deploy](https://comfydeploy.com/) to get started!
|
||||
|
||||
Check out our latest [nextjs starter kit](https://github.com/BennyKok/comfyui-deploy-next-example) with Comfy Deploy
|
||||
@@ -93,10 +96,6 @@ Major areas
|
||||
|
||||
# Self Hosting with Vercel
|
||||
|
||||
[](https://www.youtube.com/watch?v=hWvsEY1cS2M)
|
||||
Tutorial Created by [Ross](https://github.com/rossman22590) and [Syn](https://github.com/mortlsyn)
|
||||
|
||||
|
||||
Build command
|
||||
|
||||
```
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
import json
|
||||
|
||||
|
||||
class AnyType(str):
|
||||
"""A special class that is always equal in not equal comparisons. Credit to pythongosssss"""
|
||||
|
||||
def __ne__(self, __value: object) -> bool:
|
||||
return False
|
||||
|
||||
|
||||
any = AnyType("*")
|
||||
|
||||
|
||||
class ComfyDeployStdOutputAny:
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls): # pylint: disable = invalid-name, missing-function-docstring
|
||||
return {
|
||||
"required": {
|
||||
"name": ("STRING", {"default": "ComfyUI"}),
|
||||
"source": (any, {}), # Use "*" to accept any input type
|
||||
},
|
||||
}
|
||||
|
||||
CATEGORY = "output"
|
||||
RETURN_TYPES = ()
|
||||
FUNCTION = "run"
|
||||
OUTPUT_NODE = True
|
||||
|
||||
def run(self, name, source=None):
|
||||
value = "None"
|
||||
if source is not None:
|
||||
try:
|
||||
value = json.dumps(source)
|
||||
except Exception:
|
||||
try:
|
||||
value = str(source)
|
||||
except Exception:
|
||||
value = "source exists, but could not be serialized."
|
||||
|
||||
return {"ui": {name: (value,)}}
|
||||
|
||||
|
||||
NODE_CLASS_MAPPINGS = {"ComfyDeployStdOutputAny": ComfyDeployStdOutputAny}
|
||||
NODE_DISPLAY_NAME_MAPPINGS = {
|
||||
"ComfyDeployStdOutputAny": "Standard Any Output (ComfyDeploy)"
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
import os
|
||||
import io
|
||||
import torchaudio
|
||||
from folder_paths import get_annotated_filepath
|
||||
|
||||
class ComfyUIDeployExternalAudio:
|
||||
RETURN_TYPES = ("AUDIO",)
|
||||
RETURN_NAMES = ("audio",)
|
||||
FUNCTION = "load_audio"
|
||||
CATEGORY = "🔗ComfyDeploy"
|
||||
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls):
|
||||
return {
|
||||
"required": {
|
||||
"input_id": (
|
||||
"STRING",
|
||||
{"multiline": False, "default": "input_audio"},
|
||||
),
|
||||
"audio_file": ("STRING", {"default": ""}),
|
||||
},
|
||||
"optional": {
|
||||
"default_value": ("AUDIO",),
|
||||
"display_name": (
|
||||
"STRING",
|
||||
{"multiline": False, "default": ""},
|
||||
),
|
||||
"description": (
|
||||
"STRING",
|
||||
{"multiline": False, "default": ""},
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
@classmethod
|
||||
def VALIDATE_INPUTS(s, audio_file, **kwargs):
|
||||
return True
|
||||
|
||||
def load_audio(self, input_id, audio_file, default_value=None, display_name=None, description=None):
|
||||
if audio_file and audio_file != "":
|
||||
if audio_file.startswith(('http://', 'https://')):
|
||||
# Handle URL input
|
||||
import requests
|
||||
response = requests.get(audio_file)
|
||||
audio_data = io.BytesIO(response.content)
|
||||
waveform, sample_rate = torchaudio.load(audio_data)
|
||||
else:
|
||||
# Handle local file
|
||||
audio_path = get_annotated_filepath(audio_file)
|
||||
waveform, sample_rate = torchaudio.load(audio_path)
|
||||
|
||||
audio = {"waveform": waveform.unsqueeze(0), "sample_rate": sample_rate}
|
||||
return (audio,)
|
||||
else:
|
||||
return (default_value,)
|
||||
|
||||
NODE_CLASS_MAPPINGS = {"ComfyUIDeployExternalAudio": ComfyUIDeployExternalAudio}
|
||||
NODE_DISPLAY_NAME_MAPPINGS = {"ComfyUIDeployExternalAudio": "External Audio (ComfyUI Deploy)"}
|
||||
@@ -23,8 +23,9 @@ class ComfyUIDeployExternalBoolean:
|
||||
|
||||
RETURN_TYPES = ("BOOLEAN",)
|
||||
RETURN_NAMES = ("bool_value",)
|
||||
|
||||
|
||||
FUNCTION = "run"
|
||||
CATEGORY = "🔗ComfyDeploy"
|
||||
|
||||
def run(self, input_id, default_value=None, display_name=None, description=None):
|
||||
print(f"Node '{input_id}' processing with switch set to {default_value}")
|
||||
|
||||
@@ -36,10 +36,11 @@ class ComfyUIDeployExternalCheckpoint:
|
||||
|
||||
RETURN_TYPES = (WILDCARD,)
|
||||
RETURN_NAMES = ("path",)
|
||||
|
||||
|
||||
FUNCTION = "run"
|
||||
|
||||
CATEGORY = "deploy"
|
||||
CATEGORY = "🔗ComfyDeploy"
|
||||
|
||||
def run(self, input_id, default_value=None, display_name=None, description=None):
|
||||
import requests
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
import os
|
||||
import io
|
||||
import cv2 as cv
|
||||
import numpy as np
|
||||
import torch
|
||||
import requests
|
||||
from folder_paths import get_annotated_filepath
|
||||
|
||||
class ComfyUIDeployExternalEXR:
|
||||
RETURN_TYPES = ("IMAGE", "MASK")
|
||||
RETURN_NAMES = ("image", "mask")
|
||||
FUNCTION = "load_exr"
|
||||
CATEGORY = "🔗ComfyDeploy"
|
||||
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls):
|
||||
return {
|
||||
"required": {
|
||||
"input_id": (
|
||||
"STRING",
|
||||
{"multiline": False, "default": "input_exr"},
|
||||
),
|
||||
"exr_file": ("STRING", {"default": ""}),
|
||||
"tonemap": (["linear", "sRGB", "Reinhard"], {"default": "sRGB"}),
|
||||
},
|
||||
"optional": {
|
||||
"default_image": ("IMAGE",),
|
||||
"default_mask": ("MASK",),
|
||||
"display_name": (
|
||||
"STRING",
|
||||
{"multiline": False, "default": ""},
|
||||
),
|
||||
"description": (
|
||||
"STRING",
|
||||
{"multiline": False, "default": ""},
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
@classmethod
|
||||
def VALIDATE_INPUTS(s, exr_file, **kwargs):
|
||||
return True
|
||||
|
||||
def sRGBtoLinear(self, npArray):
|
||||
less = npArray <= 0.0404482362771082
|
||||
npArray[less] = npArray[less] / 12.92
|
||||
npArray[~less] = np.power((npArray[~less] + 0.055) / 1.055, 2.4)
|
||||
|
||||
def linearToSRGB(self, npArray):
|
||||
less = npArray <= 0.0031308
|
||||
npArray[less] = npArray[less] * 12.92
|
||||
npArray[~less] = np.power(npArray[~less], 1/2.4) * 1.055 - 0.055
|
||||
|
||||
def load_exr(self, input_id, exr_file, tonemap="sRGB",
|
||||
default_image=None, default_mask=None,
|
||||
display_name=None, description=None):
|
||||
try:
|
||||
if exr_file and exr_file != "":
|
||||
if exr_file.startswith(('http://', 'https://')):
|
||||
# Handle URL input
|
||||
response = requests.get(exr_file)
|
||||
# Write to temp buffer
|
||||
buffer = io.BytesIO(response.content)
|
||||
nparr = np.frombuffer(buffer.getvalue(), np.uint8)
|
||||
image = cv.imdecode(nparr, cv.IMREAD_UNCHANGED).astype(np.float32)
|
||||
else:
|
||||
# Handle local file
|
||||
exr_path = get_annotated_filepath(exr_file)
|
||||
image = cv.imread(exr_path, cv.IMREAD_UNCHANGED).astype(np.float32)
|
||||
|
||||
if len(image.shape) == 2:
|
||||
image = np.repeat(image[..., np.newaxis], 3, axis=2)
|
||||
|
||||
# Extract RGB and flip channels
|
||||
rgb = np.flip(image[:,:,:3], 2).copy()
|
||||
|
||||
# Apply tonemapping
|
||||
if tonemap == "sRGB":
|
||||
self.linearToSRGB(rgb)
|
||||
rgb = np.clip(rgb, 0, 1)
|
||||
elif tonemap == "Reinhard":
|
||||
rgb = np.clip(rgb, 0, None)
|
||||
rgb = rgb / (rgb + 1)
|
||||
self.linearToSRGB(rgb)
|
||||
rgb = np.clip(rgb, 0, 1)
|
||||
|
||||
rgb = torch.unsqueeze(torch.from_numpy(rgb), 0)
|
||||
|
||||
# Handle alpha/mask
|
||||
mask = torch.zeros((1, image.shape[0], image.shape[1]), dtype=torch.float32)
|
||||
if image.shape[2] > 3:
|
||||
mask[0] = torch.from_numpy(np.clip(image[:,:,3], 0, 1))
|
||||
|
||||
return (rgb, mask)
|
||||
else:
|
||||
# Return defaults if no file provided
|
||||
return (default_image, default_mask)
|
||||
|
||||
except Exception as e:
|
||||
print(f"Error loading EXR: {str(e)}")
|
||||
# Return defaults on error
|
||||
return (default_image, default_mask)
|
||||
|
||||
NODE_CLASS_MAPPINGS = {
|
||||
"ComfyUIDeployExternalEXR": ComfyUIDeployExternalEXR
|
||||
}
|
||||
|
||||
NODE_DISPLAY_NAME_MAPPINGS = {
|
||||
"ComfyUIDeployExternalEXR": "External EXR (ComfyUI Deploy)"
|
||||
}
|
||||
@@ -48,10 +48,8 @@ class ComfyUIDeployExternalFaceModel:
|
||||
|
||||
RETURN_TYPES = (WILDCARD,)
|
||||
RETURN_NAMES = ("path",)
|
||||
|
||||
FUNCTION = "run"
|
||||
|
||||
CATEGORY = "deploy"
|
||||
CATEGORY = "🔗ComfyDeploy"
|
||||
|
||||
def run(
|
||||
self,
|
||||
|
||||
@@ -21,44 +21,55 @@ class ComfyUIDeployExternalImage:
|
||||
),
|
||||
"description": (
|
||||
"STRING",
|
||||
{"multiline": True, "default": ""},
|
||||
{"multiline": False, "default": ""},
|
||||
),
|
||||
"default_value_url": ("STRING", {"image_preview": True, "default": ""}),
|
||||
}
|
||||
}
|
||||
|
||||
RETURN_TYPES = ("IMAGE",)
|
||||
RETURN_NAMES = ("image",)
|
||||
|
||||
FUNCTION = "run"
|
||||
CATEGORY = "🔗ComfyDeploy"
|
||||
|
||||
CATEGORY = "image"
|
||||
|
||||
def run(self, input_id, default_value=None, display_name=None, description=None):
|
||||
def run(self, input_id, default_value=None, display_name=None, description=None, default_value_url=None):
|
||||
image = default_value
|
||||
try:
|
||||
if input_id.startswith('http'):
|
||||
import requests
|
||||
from io import BytesIO
|
||||
print("Fetching image from url: ", input_id)
|
||||
response = requests.get(input_id)
|
||||
image = Image.open(BytesIO(response.content))
|
||||
elif input_id.startswith('data:image/png;base64,') or input_id.startswith('data:image/jpeg;base64,') or input_id.startswith('data:image/jpg;base64,'):
|
||||
import base64
|
||||
from io import BytesIO
|
||||
print("Decoding base64 image")
|
||||
base64_image = input_id[input_id.find(",")+1:]
|
||||
decoded_image = base64.b64decode(base64_image)
|
||||
image = Image.open(BytesIO(decoded_image))
|
||||
else:
|
||||
raise ValueError("Invalid image url provided.")
|
||||
|
||||
image = ImageOps.exif_transpose(image)
|
||||
image = image.convert("RGB")
|
||||
image = np.array(image).astype(np.float32) / 255.0
|
||||
image = torch.from_numpy(image)[None,]
|
||||
return [image]
|
||||
except:
|
||||
return [image]
|
||||
|
||||
# Try both input_id and default_value_url
|
||||
urls_to_try = [url for url in [input_id, default_value_url] if url]
|
||||
|
||||
print(default_value_url)
|
||||
|
||||
for url in urls_to_try:
|
||||
try:
|
||||
if url.startswith('http'):
|
||||
import requests
|
||||
from io import BytesIO
|
||||
print(f"Fetching image from url: {url}")
|
||||
response = requests.get(url)
|
||||
image = Image.open(BytesIO(response.content))
|
||||
break
|
||||
elif url.startswith(('data:image/png;base64,', 'data:image/jpeg;base64,', 'data:image/jpg;base64,')):
|
||||
import base64
|
||||
from io import BytesIO
|
||||
print("Decoding base64 image")
|
||||
base64_image = url[url.find(",")+1:]
|
||||
decoded_image = base64.b64decode(base64_image)
|
||||
image = Image.open(BytesIO(decoded_image))
|
||||
break
|
||||
except:
|
||||
continue
|
||||
|
||||
if image is not None:
|
||||
try:
|
||||
image = ImageOps.exif_transpose(image)
|
||||
image = image.convert("RGB")
|
||||
image = np.array(image).astype(np.float32) / 255.0
|
||||
image = torch.from_numpy(image)[None,]
|
||||
except:
|
||||
pass
|
||||
|
||||
return [image]
|
||||
|
||||
|
||||
NODE_CLASS_MAPPINGS = {"ComfyUIDeployExternalImage": ComfyUIDeployExternalImage}
|
||||
|
||||
@@ -28,10 +28,8 @@ class ComfyUIDeployExternalImageAlpha:
|
||||
|
||||
RETURN_TYPES = ("IMAGE",)
|
||||
RETURN_NAMES = ("image",)
|
||||
|
||||
FUNCTION = "run"
|
||||
|
||||
CATEGORY = "image"
|
||||
CATEGORY = "🔗ComfyDeploy"
|
||||
|
||||
def run(self, input_id, default_value=None, display_name=None, description=None):
|
||||
image = default_value
|
||||
|
||||
@@ -34,10 +34,8 @@ class ComfyUIDeployExternalImageBatch:
|
||||
|
||||
RETURN_TYPES = ("IMAGE",)
|
||||
RETURN_NAMES = ("image",)
|
||||
|
||||
FUNCTION = "run"
|
||||
|
||||
CATEGORY = "image"
|
||||
CATEGORY = "🔗ComfyDeploy"
|
||||
|
||||
def process_image(self, image):
|
||||
image = ImageOps.exif_transpose(image)
|
||||
|
||||
@@ -46,10 +46,8 @@ class ComfyUIDeployExternalLora:
|
||||
|
||||
RETURN_TYPES = (WILDCARD,)
|
||||
RETURN_NAMES = ("path",)
|
||||
|
||||
FUNCTION = "run"
|
||||
|
||||
CATEGORY = "deploy"
|
||||
CATEGORY = "🔗ComfyDeploy"
|
||||
|
||||
def run(
|
||||
self,
|
||||
@@ -64,32 +62,42 @@ class ComfyUIDeployExternalLora:
|
||||
import os
|
||||
import uuid
|
||||
|
||||
if lora_url and lora_url.startswith("http"):
|
||||
if lora_save_name:
|
||||
existing_loras = folder_paths.get_filename_list("loras")
|
||||
# Check if lora_save_name exists in the list
|
||||
if lora_save_name in existing_loras:
|
||||
print(f"using lora: {lora_save_name}")
|
||||
return (lora_save_name,)
|
||||
if lora_url:
|
||||
if lora_url.startswith("http"):
|
||||
if lora_save_name:
|
||||
existing_loras = folder_paths.get_filename_list("loras")
|
||||
# Check if lora_save_name exists in the list
|
||||
if lora_save_name in existing_loras:
|
||||
print(f"using lora: {lora_save_name}")
|
||||
return (lora_save_name,)
|
||||
else:
|
||||
lora_save_name = str(uuid.uuid4()) + ".safetensors"
|
||||
print(lora_save_name)
|
||||
print(folder_paths.folder_names_and_paths["loras"][0][0])
|
||||
destination_path = os.path.join(
|
||||
folder_paths.folder_names_and_paths["loras"][0][0], lora_save_name
|
||||
)
|
||||
print(destination_path)
|
||||
print(
|
||||
"Downloading external lora - "
|
||||
+ lora_url
|
||||
+ " to "
|
||||
+ destination_path
|
||||
)
|
||||
response = requests.get(
|
||||
lora_url,
|
||||
headers={"User-Agent": "Mozilla/5.0"},
|
||||
allow_redirects=True,
|
||||
)
|
||||
with open(destination_path, "wb") as out_file:
|
||||
out_file.write(response.content)
|
||||
print(f"Ext Lora loading: {lora_url} to {lora_save_name}")
|
||||
return (lora_save_name,)
|
||||
else:
|
||||
lora_save_name = str(uuid.uuid4()) + ".safetensors"
|
||||
print(lora_save_name)
|
||||
print(folder_paths.folder_names_and_paths["loras"][0][0])
|
||||
destination_path = os.path.join(
|
||||
folder_paths.folder_names_and_paths["loras"][0][0], lora_save_name
|
||||
)
|
||||
print(destination_path)
|
||||
print("Downloading external lora - " + lora_url + " to " + destination_path)
|
||||
response = requests.get(
|
||||
lora_url,
|
||||
headers={"User-Agent": "Mozilla/5.0"},
|
||||
allow_redirects=True,
|
||||
)
|
||||
with open(destination_path, "wb") as out_file:
|
||||
out_file.write(response.content)
|
||||
return (lora_save_name,)
|
||||
print(f"Ext Lora loading: {lora_url}")
|
||||
return (lora_url,)
|
||||
else:
|
||||
print(f"using lora: {default_lora_name}")
|
||||
print(f"Ext Lora loading: {default_lora_name}")
|
||||
return (default_lora_name,)
|
||||
|
||||
|
||||
|
||||
@@ -31,10 +31,8 @@ class ComfyUIDeployExternalNumber:
|
||||
|
||||
RETURN_TYPES = ("FLOAT",)
|
||||
RETURN_NAMES = ("value",)
|
||||
|
||||
FUNCTION = "run"
|
||||
|
||||
CATEGORY = "number"
|
||||
CATEGORY = "🔗ComfyDeploy"
|
||||
|
||||
def run(self, input_id, default_value=None, display_name=None, description=None):
|
||||
try:
|
||||
|
||||
@@ -31,10 +31,8 @@ class ComfyUIDeployExternalNumberInt:
|
||||
|
||||
RETURN_TYPES = ("INT",)
|
||||
RETURN_NAMES = ("value",)
|
||||
|
||||
FUNCTION = "run"
|
||||
|
||||
CATEGORY = "number"
|
||||
CATEGORY = "🔗ComfyDeploy"
|
||||
|
||||
def run(self, input_id, default_value=None, display_name=None, description=None):
|
||||
if not input_id or (isinstance(input_id, str) and not input_id.strip().isdigit()):
|
||||
|
||||
@@ -34,10 +34,8 @@ class ComfyUIDeployExternalNumberSlider:
|
||||
|
||||
RETURN_TYPES = ("FLOAT",)
|
||||
RETURN_NAMES = ("value",)
|
||||
|
||||
FUNCTION = "run"
|
||||
|
||||
CATEGORY = "number"
|
||||
CATEGORY = "🔗ComfyDeploy"
|
||||
|
||||
def run(self, input_id, default_value=None, min_value=0, max_value=1, display_name=None, description=None):
|
||||
try:
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
import re
|
||||
|
||||
|
||||
class StringFunction:
|
||||
@classmethod
|
||||
def INPUT_TYPES(s):
|
||||
return {
|
||||
"required": {
|
||||
"action": (["append", "replace"], {}),
|
||||
"tidy_tags": (["yes", "no"], {}),
|
||||
},
|
||||
"optional": {
|
||||
"text_a": ("STRING", {"multiline": True, "dynamicPrompts": False}),
|
||||
"text_b": ("STRING", {"multiline": True, "dynamicPrompts": False}),
|
||||
"text_c": ("STRING", {"multiline": True, "dynamicPrompts": False}),
|
||||
},
|
||||
}
|
||||
|
||||
RETURN_TYPES = ("STRING",)
|
||||
FUNCTION = "exec"
|
||||
CATEGORY = "🔗ComfyDeploy"
|
||||
OUTPUT_NODE = True
|
||||
|
||||
def exec(self, action, tidy_tags, text_a="", text_b="", text_c=""):
|
||||
tidy_tags = tidy_tags == "yes"
|
||||
out = ""
|
||||
if action == "append":
|
||||
out = (", " if tidy_tags else "").join(
|
||||
filter(None, [text_a, text_b, text_c])
|
||||
)
|
||||
else:
|
||||
if text_c is None:
|
||||
text_c = ""
|
||||
if text_b.startswith("/") and text_b.endswith("/"):
|
||||
regex = text_b[1:-1]
|
||||
out = re.sub(regex, text_c, text_a)
|
||||
else:
|
||||
out = text_a.replace(text_b, text_c)
|
||||
if tidy_tags:
|
||||
out = re.sub(r"\s{2,}", " ", out)
|
||||
out = out.replace(" ,", ",")
|
||||
out = re.sub(r",{2,}", ",", out)
|
||||
out = out.strip()
|
||||
return {"ui": {"text": (out,)}, "result": (out,)}
|
||||
|
||||
|
||||
NODE_CLASS_MAPPINGS = {
|
||||
"ComfyUIDeployStringCombine": StringFunction,
|
||||
}
|
||||
|
||||
NODE_DISPLAY_NAME_MAPPINGS = {
|
||||
"ComfyUIDeployStringCombine": "String Combine (ComfyUI Deploy)",
|
||||
}
|
||||
@@ -34,7 +34,7 @@ class ComfyUIDeployExternalText:
|
||||
|
||||
FUNCTION = "run"
|
||||
|
||||
CATEGORY = "text"
|
||||
CATEGORY = "🔗ComfyDeploy"
|
||||
|
||||
def run(self, input_id, default_value=None, display_name=None, description=None):
|
||||
return [default_value]
|
||||
|
||||
@@ -36,7 +36,7 @@ class ComfyUIDeployExternalTextAny:
|
||||
|
||||
FUNCTION = "run"
|
||||
|
||||
CATEGORY = "text"
|
||||
CATEGORY = "🔗ComfyDeploy"
|
||||
|
||||
def run(self, input_id, default_value=None, display_name=None, description=None):
|
||||
return [default_value]
|
||||
|
||||
@@ -36,6 +36,7 @@ class ComfyUIDeployExternalVideo:
|
||||
RETURN_NAMES = ("video")
|
||||
|
||||
FUNCTION = "load_video"
|
||||
CATEGORY = "🔗ComfyDeploy"
|
||||
|
||||
def load_video(self, input_id, default_value):
|
||||
input_dir = folder_paths.get_input_directory()
|
||||
|
||||
@@ -791,6 +791,7 @@ class ComfyUIDeployExternalVideo:
|
||||
)
|
||||
|
||||
FUNCTION = "load_video"
|
||||
CATEGORY = "🔗ComfyDeploy"
|
||||
|
||||
def load_video(self, **kwargs):
|
||||
input_id = kwargs.get("input_id")
|
||||
|
||||
@@ -33,6 +33,7 @@ class ComfyDeployWebscoketImageInput:
|
||||
RETURN_NAMES = ("images",)
|
||||
|
||||
FUNCTION = "run"
|
||||
CATEGORY = "🔗ComfyDeploy"
|
||||
|
||||
@classmethod
|
||||
def VALIDATE_INPUTS(s, input_id):
|
||||
|
||||
@@ -48,7 +48,7 @@ class ComfyUIDeployModalList:
|
||||
|
||||
FUNCTION = "run"
|
||||
|
||||
CATEGORY = "model"
|
||||
CATEGORY = "🔗ComfyDeploy"
|
||||
|
||||
def run(self, model=""):
|
||||
# Split the model path by '/' and select the last item
|
||||
|
||||
@@ -6,7 +6,7 @@ from PIL.PngImagePlugin import PngInfo
|
||||
import folder_paths
|
||||
|
||||
|
||||
class ComfyDeployStdOutputImage:
|
||||
class ComfyDeployOutputImage:
|
||||
def __init__(self):
|
||||
self.output_dir = folder_paths.get_output_directory()
|
||||
self.type = "output"
|
||||
@@ -28,6 +28,12 @@ class ComfyDeployStdOutputImage:
|
||||
"file_type": (["png", "jpg", "webp"], {"default": "webp"}),
|
||||
"quality": ("INT", {"default": 80, "min": 1, "max": 100, "step": 1}),
|
||||
},
|
||||
"optional": {
|
||||
"output_id": (
|
||||
"STRING",
|
||||
{"multiline": False, "default": "output_images"},
|
||||
),
|
||||
},
|
||||
"hidden": {"prompt": "PROMPT", "extra_pnginfo": "EXTRA_PNGINFO"},
|
||||
}
|
||||
|
||||
@@ -35,8 +41,7 @@ class ComfyDeployStdOutputImage:
|
||||
FUNCTION = "run"
|
||||
|
||||
OUTPUT_NODE = True
|
||||
|
||||
CATEGORY = "output"
|
||||
CATEGORY = "🔗ComfyDeploy"
|
||||
DESCRIPTION = "Saves the input images to your ComfyUI output directory."
|
||||
|
||||
def run(
|
||||
@@ -45,6 +50,7 @@ class ComfyDeployStdOutputImage:
|
||||
filename_prefix="ComfyUI",
|
||||
file_type="png",
|
||||
quality=80,
|
||||
output_id="output_images",
|
||||
prompt=None,
|
||||
extra_pnginfo=None,
|
||||
):
|
||||
@@ -79,14 +85,17 @@ class ComfyDeployStdOutputImage:
|
||||
img.save(file_path, quality=quality)
|
||||
|
||||
results.append(
|
||||
{"filename": file, "subfolder": subfolder, "type": self.type}
|
||||
{
|
||||
"filename": file,
|
||||
"subfolder": subfolder,
|
||||
"type": self.type,
|
||||
"output_id": output_id,
|
||||
}
|
||||
)
|
||||
counter += 1
|
||||
|
||||
return {"ui": {"images": results}}
|
||||
|
||||
|
||||
NODE_CLASS_MAPPINGS = {"ComfyDeployStdOutputImage": ComfyDeployStdOutputImage}
|
||||
NODE_DISPLAY_NAME_MAPPINGS = {
|
||||
"ComfyDeployStdOutputImage": "Standard Image Output (ComfyDeploy)"
|
||||
}
|
||||
NODE_CLASS_MAPPINGS = {"ComfyDeployOutputImage": ComfyDeployOutputImage}
|
||||
NODE_DISPLAY_NAME_MAPPINGS = {"ComfyDeployOutputImage": "Image Output (ComfyDeploy)"}
|
||||
@@ -33,10 +33,8 @@ class ComfyDeployWebscoketImageOutput:
|
||||
|
||||
RETURN_TYPES = ()
|
||||
RETURN_NAMES = ("text",)
|
||||
|
||||
FUNCTION = "run"
|
||||
|
||||
CATEGORY = "output"
|
||||
CATEGORY = "🔗ComfyDeploy"
|
||||
|
||||
@classmethod
|
||||
def VALIDATE_INPUTS(s, output_id):
|
||||
|
||||
+1029
-83
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,359 @@
|
||||
{
|
||||
"extra": {
|
||||
"ds": {
|
||||
"scale": 0.6010518407212623,
|
||||
"offset": [815.5938895649746, 84.94304700477853]
|
||||
},
|
||||
"node_versions": {
|
||||
"comfy-core": "0.3.19",
|
||||
"comfyui-deploy": "b3df94d1affcf7ce05ee7eeda99989194bcd9159"
|
||||
}
|
||||
},
|
||||
"links": [
|
||||
[9, 8, 0, 9, 0, "IMAGE"],
|
||||
[45, 30, 1, 6, 0, "CLIP"],
|
||||
[46, 30, 2, 8, 1, "VAE"],
|
||||
[47, 30, 0, 31, 0, "MODEL"],
|
||||
[51, 27, 0, 31, 3, "LATENT"],
|
||||
[52, 31, 0, 8, 0, "LATENT"],
|
||||
[54, 30, 1, 33, 0, "CLIP"],
|
||||
[55, 33, 0, 31, 2, "CONDITIONING"],
|
||||
[56, 6, 0, 35, 0, "CONDITIONING"],
|
||||
[57, 35, 0, 31, 1, "CONDITIONING"],
|
||||
[58, 38, 0, 6, 1, "STRING"],
|
||||
[59, 40, 0, 27, 0, "INT"],
|
||||
[60, 39, 0, 27, 1, "INT"]
|
||||
],
|
||||
"nodes": [
|
||||
{
|
||||
"id": 6,
|
||||
"pos": [384, 192],
|
||||
"mode": 0,
|
||||
"size": [422.8500061035156, 164.30999755859375],
|
||||
"type": "CLIPTextEncode",
|
||||
"color": "#232",
|
||||
"flags": {},
|
||||
"order": 7,
|
||||
"title": "CLIP Text Encode (Positive Prompt)",
|
||||
"inputs": [
|
||||
{ "link": 45, "name": "clip", "type": "CLIP" },
|
||||
{
|
||||
"pos": [10, 36],
|
||||
"link": 58,
|
||||
"name": "text",
|
||||
"type": "STRING",
|
||||
"widget": { "name": "text" }
|
||||
}
|
||||
],
|
||||
"bgcolor": "#353",
|
||||
"outputs": [
|
||||
{
|
||||
"name": "CONDITIONING",
|
||||
"type": "CONDITIONING",
|
||||
"links": [56],
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": { "Node name for S&R": "CLIPTextEncode" },
|
||||
"widgets_values": [
|
||||
"cute anime girl with massive fluffy fennec ears and a big fluffy tail blonde messy long hair blue eyes wearing a maid outfit with a long black gold leaf pattern dress and a white apron mouth open placing a fancy black forest cake with candles on top of a dinner table of an old dark Victorian mansion lit by candlelight with a bright window to the foggy forest and very expensive stuff everywhere there are paintings on the walls"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"pos": [1151, 195],
|
||||
"mode": 0,
|
||||
"size": [210, 46],
|
||||
"type": "VAEDecode",
|
||||
"flags": {},
|
||||
"order": 11,
|
||||
"inputs": [
|
||||
{ "link": 52, "name": "samples", "type": "LATENT" },
|
||||
{ "link": 46, "name": "vae", "type": "VAE" }
|
||||
],
|
||||
"outputs": [
|
||||
{ "name": "IMAGE", "type": "IMAGE", "links": [9], "slot_index": 0 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "VAEDecode" },
|
||||
"widgets_values": []
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"pos": [1375, 194],
|
||||
"mode": 0,
|
||||
"size": [985.2999877929688, 1060.3800048828125],
|
||||
"type": "SaveImage",
|
||||
"flags": {},
|
||||
"order": 12,
|
||||
"inputs": [{ "link": 9, "name": "images", "type": "IMAGE" }],
|
||||
"outputs": [],
|
||||
"properties": {},
|
||||
"widgets_values": ["ComfyUI"]
|
||||
},
|
||||
{
|
||||
"id": 31,
|
||||
"pos": [816, 192],
|
||||
"mode": 0,
|
||||
"size": [315, 262],
|
||||
"type": "KSampler",
|
||||
"flags": {},
|
||||
"order": 10,
|
||||
"inputs": [
|
||||
{ "link": 47, "name": "model", "type": "MODEL" },
|
||||
{ "link": 57, "name": "positive", "type": "CONDITIONING" },
|
||||
{ "link": 55, "name": "negative", "type": "CONDITIONING" },
|
||||
{ "link": 51, "name": "latent_image", "type": "LATENT" }
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "LATENT",
|
||||
"type": "LATENT",
|
||||
"links": [52],
|
||||
"shape": 3,
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": { "Node name for S&R": "KSampler" },
|
||||
"widgets_values": [
|
||||
1024035737089801,
|
||||
"randomize",
|
||||
20,
|
||||
1,
|
||||
"euler",
|
||||
"simple",
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 35,
|
||||
"pos": [576, 96],
|
||||
"mode": 0,
|
||||
"size": [211.60000610351562, 58],
|
||||
"type": "FluxGuidance",
|
||||
"flags": {},
|
||||
"order": 9,
|
||||
"inputs": [
|
||||
{ "link": 56, "name": "conditioning", "type": "CONDITIONING" }
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "CONDITIONING",
|
||||
"type": "CONDITIONING",
|
||||
"links": [57],
|
||||
"shape": 3,
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": { "Node name for S&R": "FluxGuidance" },
|
||||
"widgets_values": [3.5]
|
||||
},
|
||||
{
|
||||
"id": 37,
|
||||
"pos": [60, 345],
|
||||
"mode": 0,
|
||||
"size": [225, 88],
|
||||
"type": "MarkdownNote",
|
||||
"color": "#432",
|
||||
"flags": {},
|
||||
"order": 0,
|
||||
"inputs": [],
|
||||
"bgcolor": "#653",
|
||||
"outputs": [],
|
||||
"properties": {},
|
||||
"widgets_values": [
|
||||
"🛈 [Learn more about this workflow](https://comfyanonymous.github.io/ComfyUI_examples/flux/#flux-dev-1)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 34,
|
||||
"pos": [825, 510],
|
||||
"mode": 0,
|
||||
"size": [282.8599853515625, 164.0800018310547],
|
||||
"type": "Note",
|
||||
"color": "#432",
|
||||
"flags": {},
|
||||
"order": 1,
|
||||
"inputs": [],
|
||||
"bgcolor": "#653",
|
||||
"outputs": [],
|
||||
"properties": { "text": "" },
|
||||
"widgets_values": [
|
||||
"Note that Flux dev and schnell do not have any negative prompt so CFG should be set to 1.0. Setting CFG to 1.0 means the negative prompt is ignored."
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 30,
|
||||
"pos": [48, 192],
|
||||
"mode": 0,
|
||||
"size": [315, 98],
|
||||
"type": "CheckpointLoaderSimple",
|
||||
"flags": {},
|
||||
"order": 2,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "MODEL",
|
||||
"type": "MODEL",
|
||||
"links": [47],
|
||||
"shape": 3,
|
||||
"slot_index": 0
|
||||
},
|
||||
{
|
||||
"name": "CLIP",
|
||||
"type": "CLIP",
|
||||
"links": [45, 54],
|
||||
"shape": 3,
|
||||
"slot_index": 1
|
||||
},
|
||||
{
|
||||
"name": "VAE",
|
||||
"type": "VAE",
|
||||
"links": [46],
|
||||
"shape": 3,
|
||||
"slot_index": 2
|
||||
}
|
||||
],
|
||||
"properties": { "Node name for S&R": "CheckpointLoaderSimple" },
|
||||
"widgets_values": ["FLUX1/flux1-dev-fp8.safetensors"]
|
||||
},
|
||||
{
|
||||
"id": 33,
|
||||
"pos": [390, 400],
|
||||
"mode": 0,
|
||||
"size": [422.8500061035156, 164.30999755859375],
|
||||
"type": "CLIPTextEncode",
|
||||
"color": "#322",
|
||||
"flags": { "collapsed": true },
|
||||
"order": 6,
|
||||
"title": "CLIP Text Encode (Negative Prompt)",
|
||||
"inputs": [
|
||||
{ "link": 54, "name": "clip", "type": "CLIP", "slot_index": 0 }
|
||||
],
|
||||
"bgcolor": "#533",
|
||||
"outputs": [
|
||||
{
|
||||
"name": "CONDITIONING",
|
||||
"type": "CONDITIONING",
|
||||
"links": [55],
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": { "Node name for S&R": "CLIPTextEncode" },
|
||||
"widgets_values": [""]
|
||||
},
|
||||
{
|
||||
"id": 27,
|
||||
"pos": [461.8629455566406, 460.2491149902344],
|
||||
"mode": 0,
|
||||
"size": [315, 126],
|
||||
"type": "EmptySD3LatentImage",
|
||||
"color": "#323",
|
||||
"flags": {},
|
||||
"order": 8,
|
||||
"inputs": [
|
||||
{
|
||||
"pos": [10, 60],
|
||||
"link": 59,
|
||||
"name": "height",
|
||||
"type": "INT",
|
||||
"widget": { "name": "height" }
|
||||
},
|
||||
{
|
||||
"pos": [10, 36],
|
||||
"link": 60,
|
||||
"name": "width",
|
||||
"type": "INT",
|
||||
"widget": { "name": "width" }
|
||||
}
|
||||
],
|
||||
"bgcolor": "#535",
|
||||
"outputs": [
|
||||
{
|
||||
"name": "LATENT",
|
||||
"type": "LATENT",
|
||||
"links": [51],
|
||||
"shape": 3,
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": { "Node name for S&R": "EmptySD3LatentImage" },
|
||||
"widgets_values": [1024, 1024, 1]
|
||||
},
|
||||
{
|
||||
"id": 38,
|
||||
"pos": [-497.3238525390625, 306.5517578125],
|
||||
"mode": 0,
|
||||
"size": [400, 200],
|
||||
"type": "ComfyUIDeployExternalText",
|
||||
"flags": {},
|
||||
"order": 3,
|
||||
"inputs": [],
|
||||
"outputs": [{ "name": "text", "type": "STRING", "links": [58] }],
|
||||
"properties": { "Node name for S&R": "ComfyUIDeployExternalText" },
|
||||
"widgets_values": [
|
||||
"prompt",
|
||||
"cute anime girl with massive fluffy fennec ears and a big fluffy tail blonde messy long hair blue eyes wearing a maid outfit with a long black gold leaf pattern dress and a white apron mouth open placing a fancy black forest cake with candles on top of a dinner table of an old dark Victorian mansion lit by candlelight with a bright window to the foggy forest and very expensive stuff everywhere there are paintings on the walls",
|
||||
"Prompt",
|
||||
"The prompt to generate an image from."
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 39,
|
||||
"pos": [-507.4543762207031, 612.9552001953125],
|
||||
"mode": 0,
|
||||
"size": [453.5999755859375, 200],
|
||||
"type": "ComfyUIDeployExternalNumberInt",
|
||||
"flags": {},
|
||||
"order": 4,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{ "name": "value", "type": "INT", "links": [60], "slot_index": 0 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "ComfyUIDeployExternalNumberInt" },
|
||||
"widgets_values": ["width", 1024, "Width", "The width of the image."]
|
||||
},
|
||||
{
|
||||
"id": 40,
|
||||
"pos": [-497.8695068359375, 864.68994140625],
|
||||
"mode": 0,
|
||||
"size": [453.5999755859375, 200],
|
||||
"type": "ComfyUIDeployExternalNumberInt",
|
||||
"flags": {},
|
||||
"order": 5,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{ "name": "value", "type": "INT", "links": [59], "slot_index": 0 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "ComfyUIDeployExternalNumberInt" },
|
||||
"widgets_values": ["height", 1024, "Height", "The height of the image."]
|
||||
}
|
||||
],
|
||||
"config": {},
|
||||
"groups": [
|
||||
{
|
||||
"id": 1,
|
||||
"color": "#3f789e",
|
||||
"flags": {},
|
||||
"title": "Input",
|
||||
"bounding": [
|
||||
-508.010986328125, 186.76593017578125, 453.23040771484375,
|
||||
334.3218994140625
|
||||
],
|
||||
"font_size": 24
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"color": "#A88",
|
||||
"flags": {},
|
||||
"title": "Additional",
|
||||
"bounding": [
|
||||
-517.1227416992188, 537.53759765625, 644.4954223632812,
|
||||
599.2609252929688
|
||||
],
|
||||
"font_size": 24
|
||||
}
|
||||
],
|
||||
"version": 0.4,
|
||||
"last_link_id": 60,
|
||||
"last_node_id": 40
|
||||
}
|
||||
@@ -0,0 +1,423 @@
|
||||
{
|
||||
"extra": {
|
||||
"ds": {
|
||||
"scale": 0.6830134553650709,
|
||||
"offset": [750.2474149300585, 120.48924647647146]
|
||||
},
|
||||
"node_versions": {
|
||||
"comfy-core": "0.3.19",
|
||||
"comfyui-deploy": "171a227856bd5f31e97828d89f83f3741004d05e"
|
||||
}
|
||||
},
|
||||
"links": [
|
||||
[9, 8, 0, 9, 0, "IMAGE"],
|
||||
[10, 11, 0, 6, 0, "CLIP"],
|
||||
[12, 10, 0, 8, 1, "VAE"],
|
||||
[19, 16, 0, 13, 2, "SAMPLER"],
|
||||
[20, 17, 0, 13, 3, "SIGMAS"],
|
||||
[23, 5, 0, 13, 4, "LATENT"],
|
||||
[24, 13, 0, 8, 0, "LATENT"],
|
||||
[30, 22, 0, 13, 1, "GUIDER"],
|
||||
[37, 25, 0, 13, 0, "NOISE"],
|
||||
[38, 12, 0, 17, 0, "MODEL"],
|
||||
[39, 12, 0, 22, 0, "MODEL"],
|
||||
[40, 6, 0, 22, 1, "CONDITIONING"],
|
||||
[41, 28, 0, 6, 1, "STRING"],
|
||||
[44, 29, 0, 5, 0, "INT"],
|
||||
[45, 30, 0, 5, 1, "INT"]
|
||||
],
|
||||
"nodes": [
|
||||
{
|
||||
"id": 13,
|
||||
"pos": [842, 215],
|
||||
"mode": 0,
|
||||
"size": [355.20001220703125, 106],
|
||||
"type": "SamplerCustomAdvanced",
|
||||
"flags": {},
|
||||
"order": 14,
|
||||
"inputs": [
|
||||
{ "link": 37, "name": "noise", "type": "NOISE", "slot_index": 0 },
|
||||
{ "link": 30, "name": "guider", "type": "GUIDER", "slot_index": 1 },
|
||||
{ "link": 19, "name": "sampler", "type": "SAMPLER", "slot_index": 2 },
|
||||
{ "link": 20, "name": "sigmas", "type": "SIGMAS", "slot_index": 3 },
|
||||
{
|
||||
"link": 23,
|
||||
"name": "latent_image",
|
||||
"type": "LATENT",
|
||||
"slot_index": 4
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "output",
|
||||
"type": "LATENT",
|
||||
"links": [24],
|
||||
"shape": 3,
|
||||
"slot_index": 0
|
||||
},
|
||||
{
|
||||
"name": "denoised_output",
|
||||
"type": "LATENT",
|
||||
"links": null,
|
||||
"shape": 3
|
||||
}
|
||||
],
|
||||
"properties": { "Node name for S&R": "SamplerCustomAdvanced" },
|
||||
"widgets_values": []
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"pos": [1248, 192],
|
||||
"mode": 0,
|
||||
"size": [210, 46],
|
||||
"type": "VAEDecode",
|
||||
"flags": {},
|
||||
"order": 15,
|
||||
"inputs": [
|
||||
{ "link": 24, "name": "samples", "type": "LATENT" },
|
||||
{ "link": 12, "name": "vae", "type": "VAE" }
|
||||
],
|
||||
"outputs": [
|
||||
{ "name": "IMAGE", "type": "IMAGE", "links": [9], "slot_index": 0 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "VAEDecode" },
|
||||
"widgets_values": []
|
||||
},
|
||||
{
|
||||
"id": 22,
|
||||
"pos": [559, 125],
|
||||
"mode": 0,
|
||||
"size": [241.79998779296875, 46],
|
||||
"type": "BasicGuider",
|
||||
"flags": {},
|
||||
"order": 13,
|
||||
"inputs": [
|
||||
{ "link": 39, "name": "model", "type": "MODEL", "slot_index": 0 },
|
||||
{
|
||||
"link": 40,
|
||||
"name": "conditioning",
|
||||
"type": "CONDITIONING",
|
||||
"slot_index": 1
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "GUIDER",
|
||||
"type": "GUIDER",
|
||||
"links": [30],
|
||||
"shape": 3,
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": { "Node name for S&R": "BasicGuider" },
|
||||
"widgets_values": []
|
||||
},
|
||||
{
|
||||
"id": 16,
|
||||
"pos": [480, 720],
|
||||
"mode": 0,
|
||||
"size": [315, 58],
|
||||
"type": "KSamplerSelect",
|
||||
"flags": {},
|
||||
"order": 0,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{ "name": "SAMPLER", "type": "SAMPLER", "links": [19], "shape": 3 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "KSamplerSelect" },
|
||||
"widgets_values": ["euler"]
|
||||
},
|
||||
{
|
||||
"id": 17,
|
||||
"pos": [480, 816],
|
||||
"mode": 0,
|
||||
"size": [315, 106],
|
||||
"type": "BasicScheduler",
|
||||
"flags": {},
|
||||
"order": 10,
|
||||
"inputs": [
|
||||
{ "link": 38, "name": "model", "type": "MODEL", "slot_index": 0 }
|
||||
],
|
||||
"outputs": [
|
||||
{ "name": "SIGMAS", "type": "SIGMAS", "links": [20], "shape": 3 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "BasicScheduler" },
|
||||
"widgets_values": ["simple", 4, 1]
|
||||
},
|
||||
{
|
||||
"id": 27,
|
||||
"pos": [480, 960],
|
||||
"mode": 0,
|
||||
"size": [311.3529052734375, 131.16229248046875],
|
||||
"type": "Note",
|
||||
"color": "#432",
|
||||
"flags": {},
|
||||
"order": 1,
|
||||
"inputs": [],
|
||||
"bgcolor": "#653",
|
||||
"outputs": [],
|
||||
"properties": { "text": "" },
|
||||
"widgets_values": [
|
||||
"The schnell model is a distilled model that can generate a good image with only 4 steps."
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"pos": [1488, 192],
|
||||
"mode": 0,
|
||||
"size": [985.3012084960938, 1060.3828125],
|
||||
"type": "SaveImage",
|
||||
"flags": {},
|
||||
"order": 16,
|
||||
"inputs": [{ "link": 9, "name": "images", "type": "IMAGE" }],
|
||||
"outputs": [],
|
||||
"properties": {},
|
||||
"widgets_values": ["ComfyUI"]
|
||||
},
|
||||
{
|
||||
"id": 25,
|
||||
"pos": [480, 587.7890625],
|
||||
"mode": 0,
|
||||
"size": [315, 82],
|
||||
"type": "RandomNoise",
|
||||
"color": "#2a363b",
|
||||
"flags": {},
|
||||
"order": 2,
|
||||
"inputs": [],
|
||||
"bgcolor": "#3f5159",
|
||||
"outputs": [
|
||||
{ "name": "NOISE", "type": "NOISE", "links": [37], "shape": 3 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "RandomNoise" },
|
||||
"widgets_values": [393845863554716, "randomize"]
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"pos": [471.7746276855469, 423.91571044921875],
|
||||
"mode": 0,
|
||||
"size": [315, 126],
|
||||
"type": "EmptyLatentImage",
|
||||
"color": "#323",
|
||||
"flags": {},
|
||||
"order": 12,
|
||||
"inputs": [
|
||||
{
|
||||
"pos": [10, 36],
|
||||
"link": 44,
|
||||
"name": "width",
|
||||
"type": "INT",
|
||||
"widget": { "name": "width" }
|
||||
},
|
||||
{
|
||||
"pos": [10, 60],
|
||||
"link": 45,
|
||||
"name": "height",
|
||||
"type": "INT",
|
||||
"widget": { "name": "height" }
|
||||
}
|
||||
],
|
||||
"bgcolor": "#535",
|
||||
"outputs": [
|
||||
{ "name": "LATENT", "type": "LATENT", "links": [23], "slot_index": 0 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "EmptyLatentImage" },
|
||||
"widgets_values": [1024, 1024, 1]
|
||||
},
|
||||
{
|
||||
"id": 26,
|
||||
"pos": [41.60395812988281, 517.059326171875],
|
||||
"mode": 0,
|
||||
"size": [336, 288],
|
||||
"type": "Note",
|
||||
"color": "#432",
|
||||
"flags": {},
|
||||
"order": 3,
|
||||
"inputs": [],
|
||||
"bgcolor": "#653",
|
||||
"outputs": [],
|
||||
"properties": { "text": "" },
|
||||
"widgets_values": [
|
||||
"If you get an error in any of the nodes above make sure the files are in the correct directories.\n\nSee the top of the examples page for the links : https://comfyanonymous.github.io/ComfyUI_examples/flux/\n\nflux1-schnell.safetensors goes in: ComfyUI/models/unet/\n\nt5xxl_fp16.safetensors and clip_l.safetensors go in: ComfyUI/models/clip/\n\nae.safetensors goes in: ComfyUI/models/vae/\n\n\nTip: You can set the weight_dtype above to one of the fp8 types if you have memory issues."
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"pos": [45.584651947021484, 229.13525390625],
|
||||
"mode": 0,
|
||||
"size": [315, 122],
|
||||
"type": "DualCLIPLoader",
|
||||
"flags": {},
|
||||
"order": 4,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "CLIP",
|
||||
"type": "CLIP",
|
||||
"links": [10],
|
||||
"shape": 3,
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": { "Node name for S&R": "DualCLIPLoader" },
|
||||
"widgets_values": [
|
||||
"t5xxl_fp16.safetensors",
|
||||
"clip_l.safetensors",
|
||||
"flux",
|
||||
"default"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"pos": [45.92215347290039, 95.6536865234375],
|
||||
"mode": 0,
|
||||
"size": [315, 82],
|
||||
"type": "UNETLoader",
|
||||
"color": "#223",
|
||||
"flags": { "pinned": true },
|
||||
"order": 5,
|
||||
"inputs": [],
|
||||
"bgcolor": "#335",
|
||||
"outputs": [
|
||||
{
|
||||
"name": "MODEL",
|
||||
"type": "MODEL",
|
||||
"links": [38, 39],
|
||||
"shape": 3,
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": { "Node name for S&R": "UNETLoader" },
|
||||
"widgets_values": ["flux1-schnell.safetensors", "default"]
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"pos": [385.87054443359375, 216.75625610351562],
|
||||
"mode": 0,
|
||||
"size": [422.84503173828125, 164.31304931640625],
|
||||
"type": "CLIPTextEncode",
|
||||
"color": "#232",
|
||||
"flags": {},
|
||||
"order": 11,
|
||||
"inputs": [
|
||||
{ "link": 10, "name": "clip", "type": "CLIP" },
|
||||
{
|
||||
"pos": [10, 36],
|
||||
"link": 41,
|
||||
"name": "text",
|
||||
"type": "STRING",
|
||||
"widget": { "name": "text" }
|
||||
}
|
||||
],
|
||||
"bgcolor": "#353",
|
||||
"outputs": [
|
||||
{
|
||||
"name": "CONDITIONING",
|
||||
"type": "CONDITIONING",
|
||||
"links": [40],
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": { "Node name for S&R": "CLIPTextEncode" },
|
||||
"widgets_values": [
|
||||
"a bottle with a beautiful rainbow galaxy inside it on top of a wooden table in the middle of a modern kitchen beside a plate of vegetables and mushrooms and a wine glasse that contains a planet earth with a plate with a half eaten apple pie on it"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"pos": [42.45906066894531, 405.2187805175781],
|
||||
"mode": 0,
|
||||
"size": [315, 58],
|
||||
"type": "VAELoader",
|
||||
"flags": {},
|
||||
"order": 6,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "VAE",
|
||||
"type": "VAE",
|
||||
"links": [12],
|
||||
"shape": 3,
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": { "Node name for S&R": "VAELoader" },
|
||||
"widgets_values": ["ae.sft"]
|
||||
},
|
||||
{
|
||||
"id": 28,
|
||||
"pos": [-620.3922119140625, 199.8013916015625],
|
||||
"mode": 0,
|
||||
"size": [400, 200],
|
||||
"type": "ComfyUIDeployExternalText",
|
||||
"flags": {},
|
||||
"order": 7,
|
||||
"inputs": [],
|
||||
"outputs": [{ "name": "text", "type": "STRING", "links": [41] }],
|
||||
"properties": { "Node name for S&R": "ComfyUIDeployExternalText" },
|
||||
"widgets_values": [
|
||||
"prompt",
|
||||
"a bottle with a beautiful rainbow galaxy inside it on top of a wooden table in the middle of a modern kitchen beside a plate of vegetables and mushrooms and a wine glasse that contains a planet earth with a plate with a half eaten apple pie on it",
|
||||
"Prompt",
|
||||
"The prompt to generate an image from."
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 29,
|
||||
"pos": [-677.4290161132812, 597.3389282226562],
|
||||
"mode": 0,
|
||||
"size": [453.5999755859375, 200],
|
||||
"type": "ComfyUIDeployExternalNumberInt",
|
||||
"flags": {},
|
||||
"order": 8,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{ "name": "value", "type": "INT", "links": [44], "slot_index": 0 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "ComfyUIDeployExternalNumberInt" },
|
||||
"widgets_values": ["width", 1024, "Width", "The width of the image."]
|
||||
},
|
||||
{
|
||||
"id": 30,
|
||||
"pos": [-670.0703735351562, 848.3707885742188],
|
||||
"mode": 0,
|
||||
"size": [453.5999755859375, 200],
|
||||
"type": "ComfyUIDeployExternalNumberInt",
|
||||
"flags": {},
|
||||
"order": 9,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{ "name": "value", "type": "INT", "links": [45], "slot_index": 0 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "ComfyUIDeployExternalNumberInt" },
|
||||
"widgets_values": ["height", 1024, "Height", "The height of the image."]
|
||||
}
|
||||
],
|
||||
"config": {},
|
||||
"groups": [
|
||||
{
|
||||
"id": 1,
|
||||
"color": "#3f789e",
|
||||
"flags": {},
|
||||
"title": "Input",
|
||||
"bounding": [
|
||||
-652.184326171875, 99.11231994628906, 565.7923583984375,
|
||||
362.8800354003906
|
||||
],
|
||||
"font_size": 24
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"color": "#A88",
|
||||
"flags": {},
|
||||
"title": "Additional",
|
||||
"bounding": [
|
||||
-720.3274536132812, 508.1206970214844, 703.0422973632812,
|
||||
576.5584716796875
|
||||
],
|
||||
"font_size": 24
|
||||
}
|
||||
],
|
||||
"version": 0.4,
|
||||
"last_link_id": 45,
|
||||
"last_node_id": 30
|
||||
}
|
||||
@@ -0,0 +1,482 @@
|
||||
{
|
||||
"extra": {
|
||||
"ds": {
|
||||
"scale": 0.6830134553650709,
|
||||
"offset": [1030.9627343190857, 159.73178253107423]
|
||||
},
|
||||
"groupNodes": {},
|
||||
"node_versions": {
|
||||
"comfy-core": "0.3.12",
|
||||
"comfyui-deploy": "b3df94d1affcf7ce05ee7eeda99989194bcd9159"
|
||||
}
|
||||
},
|
||||
"links": [
|
||||
[19, 16, 0, 13, 2, "SAMPLER"],
|
||||
[20, 17, 0, 13, 3, "SIGMAS"],
|
||||
[30, 22, 0, 13, 1, "GUIDER"],
|
||||
[37, 25, 0, 13, 0, "NOISE"],
|
||||
[129, 26, 0, 22, 1, "CONDITIONING"],
|
||||
[175, 44, 0, 26, 0, "CONDITIONING"],
|
||||
[180, 45, 0, 13, 4, "LATENT"],
|
||||
[181, 13, 0, 8, 0, "LATENT"],
|
||||
[190, 12, 0, 17, 0, "MODEL"],
|
||||
[195, 67, 0, 22, 0, "MODEL"],
|
||||
[205, 11, 0, 44, 0, "CLIP"],
|
||||
[206, 10, 0, 8, 1, "VAE"],
|
||||
[209, 12, 0, 67, 0, "MODEL"],
|
||||
[210, 13, 0, 73, 0, "LATENT"],
|
||||
[211, 10, 0, 73, 1, "VAE"],
|
||||
[215, 73, 0, 75, 0, "IMAGE"],
|
||||
[216, 78, 0, 44, 1, "STRING"],
|
||||
[217, 79, 0, 45, 0, "INT"],
|
||||
[218, 83, 0, 45, 1, "INT"]
|
||||
],
|
||||
"nodes": [
|
||||
{
|
||||
"id": 16,
|
||||
"pos": [484, 751],
|
||||
"mode": 0,
|
||||
"size": [315, 58],
|
||||
"type": "KSamplerSelect",
|
||||
"flags": {},
|
||||
"order": 0,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{ "name": "SAMPLER", "type": "SAMPLER", "links": [19], "shape": 3 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "KSamplerSelect" },
|
||||
"widgets_values": ["euler"]
|
||||
},
|
||||
{
|
||||
"id": 17,
|
||||
"pos": [478, 860],
|
||||
"mode": 0,
|
||||
"size": [315, 106],
|
||||
"type": "BasicScheduler",
|
||||
"flags": {},
|
||||
"order": 10,
|
||||
"inputs": [
|
||||
{ "link": 190, "name": "model", "type": "MODEL", "slot_index": 0 }
|
||||
],
|
||||
"outputs": [
|
||||
{ "name": "SIGMAS", "type": "SIGMAS", "links": [20], "shape": 3 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "BasicScheduler" },
|
||||
"widgets_values": ["simple", 20, 1]
|
||||
},
|
||||
{
|
||||
"id": 26,
|
||||
"pos": [520, 100],
|
||||
"mode": 0,
|
||||
"size": [317.4000244140625, 58],
|
||||
"type": "FluxGuidance",
|
||||
"color": "#233",
|
||||
"flags": {},
|
||||
"order": 14,
|
||||
"inputs": [
|
||||
{ "link": 175, "name": "conditioning", "type": "CONDITIONING" }
|
||||
],
|
||||
"bgcolor": "#355",
|
||||
"outputs": [
|
||||
{
|
||||
"name": "CONDITIONING",
|
||||
"type": "CONDITIONING",
|
||||
"links": [129],
|
||||
"shape": 3,
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": { "Node name for S&R": "FluxGuidance" },
|
||||
"widgets_values": [6]
|
||||
},
|
||||
{
|
||||
"id": 45,
|
||||
"pos": [475.540771484375, 432.673583984375],
|
||||
"mode": 0,
|
||||
"size": [315, 130],
|
||||
"type": "EmptyHunyuanLatentVideo",
|
||||
"flags": {},
|
||||
"order": 13,
|
||||
"inputs": [
|
||||
{
|
||||
"link": 217,
|
||||
"name": "width",
|
||||
"type": "INT",
|
||||
"widget": { "name": "width" }
|
||||
},
|
||||
{
|
||||
"link": 218,
|
||||
"name": "height",
|
||||
"type": "INT",
|
||||
"widget": { "name": "height" }
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{ "name": "LATENT", "type": "LATENT", "links": [180], "slot_index": 0 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "EmptyHunyuanLatentVideo" },
|
||||
"widgets_values": [848, 480, 73, 1]
|
||||
},
|
||||
{
|
||||
"id": 22,
|
||||
"pos": [600, 0],
|
||||
"mode": 0,
|
||||
"size": [222.3482666015625, 46],
|
||||
"type": "BasicGuider",
|
||||
"flags": {},
|
||||
"order": 15,
|
||||
"inputs": [
|
||||
{ "link": 195, "name": "model", "type": "MODEL", "slot_index": 0 },
|
||||
{
|
||||
"link": 129,
|
||||
"name": "conditioning",
|
||||
"type": "CONDITIONING",
|
||||
"slot_index": 1
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "GUIDER",
|
||||
"type": "GUIDER",
|
||||
"links": [30],
|
||||
"shape": 3,
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": { "Node name for S&R": "BasicGuider" },
|
||||
"widgets_values": []
|
||||
},
|
||||
{
|
||||
"id": 67,
|
||||
"pos": [360, 0],
|
||||
"mode": 0,
|
||||
"size": [210, 58],
|
||||
"type": "ModelSamplingSD3",
|
||||
"flags": {},
|
||||
"order": 11,
|
||||
"inputs": [{ "link": 209, "name": "model", "type": "MODEL" }],
|
||||
"outputs": [
|
||||
{ "name": "MODEL", "type": "MODEL", "links": [195], "slot_index": 0 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "ModelSamplingSD3" },
|
||||
"widgets_values": [7]
|
||||
},
|
||||
{
|
||||
"id": 73,
|
||||
"pos": [1150, 200],
|
||||
"mode": 0,
|
||||
"size": [210, 150],
|
||||
"type": "VAEDecodeTiled",
|
||||
"flags": {},
|
||||
"order": 18,
|
||||
"inputs": [
|
||||
{ "link": 210, "name": "samples", "type": "LATENT" },
|
||||
{ "link": 211, "name": "vae", "type": "VAE" }
|
||||
],
|
||||
"outputs": [
|
||||
{ "name": "IMAGE", "type": "IMAGE", "links": [215], "slot_index": 0 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "VAEDecodeTiled" },
|
||||
"widgets_values": [256, 64, 64, 8]
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"pos": [1150, 90],
|
||||
"mode": 2,
|
||||
"size": [210, 46],
|
||||
"type": "VAEDecode",
|
||||
"flags": {},
|
||||
"order": 17,
|
||||
"inputs": [
|
||||
{ "link": 181, "name": "samples", "type": "LATENT" },
|
||||
{ "link": 206, "name": "vae", "type": "VAE" }
|
||||
],
|
||||
"outputs": [
|
||||
{ "name": "IMAGE", "type": "IMAGE", "links": [], "slot_index": 0 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "VAEDecode" },
|
||||
"widgets_values": []
|
||||
},
|
||||
{
|
||||
"id": 77,
|
||||
"pos": [0, 0],
|
||||
"mode": 0,
|
||||
"size": [350, 110],
|
||||
"type": "Note",
|
||||
"color": "#432",
|
||||
"flags": {},
|
||||
"order": 1,
|
||||
"inputs": [],
|
||||
"bgcolor": "#653",
|
||||
"outputs": [],
|
||||
"properties": {},
|
||||
"widgets_values": [
|
||||
"Select a fp8 weight_dtype if you are running out of memory."
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 13,
|
||||
"pos": [860, 200],
|
||||
"mode": 0,
|
||||
"size": [272.3617858886719, 124.53733825683594],
|
||||
"type": "SamplerCustomAdvanced",
|
||||
"flags": {},
|
||||
"order": 16,
|
||||
"inputs": [
|
||||
{ "link": 37, "name": "noise", "type": "NOISE", "slot_index": 0 },
|
||||
{ "link": 30, "name": "guider", "type": "GUIDER", "slot_index": 1 },
|
||||
{ "link": 19, "name": "sampler", "type": "SAMPLER", "slot_index": 2 },
|
||||
{ "link": 20, "name": "sigmas", "type": "SIGMAS", "slot_index": 3 },
|
||||
{
|
||||
"link": 180,
|
||||
"name": "latent_image",
|
||||
"type": "LATENT",
|
||||
"slot_index": 4
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "output",
|
||||
"type": "LATENT",
|
||||
"links": [181, 210],
|
||||
"shape": 3,
|
||||
"slot_index": 0
|
||||
},
|
||||
{
|
||||
"name": "denoised_output",
|
||||
"type": "LATENT",
|
||||
"links": null,
|
||||
"shape": 3
|
||||
}
|
||||
],
|
||||
"properties": { "Node name for S&R": "SamplerCustomAdvanced" },
|
||||
"widgets_values": []
|
||||
},
|
||||
{
|
||||
"id": 75,
|
||||
"pos": [1410, 200],
|
||||
"mode": 0,
|
||||
"size": [315, 366],
|
||||
"type": "SaveAnimatedWEBP",
|
||||
"flags": {},
|
||||
"order": 19,
|
||||
"inputs": [{ "link": 215, "name": "images", "type": "IMAGE" }],
|
||||
"outputs": [],
|
||||
"properties": {},
|
||||
"widgets_values": ["ComfyUI", 24, false, 80, "default"]
|
||||
},
|
||||
{
|
||||
"id": 25,
|
||||
"pos": [479, 618],
|
||||
"mode": 0,
|
||||
"size": [315, 82],
|
||||
"type": "RandomNoise",
|
||||
"color": "#2a363b",
|
||||
"flags": {},
|
||||
"order": 2,
|
||||
"inputs": [],
|
||||
"bgcolor": "#3f5159",
|
||||
"outputs": [
|
||||
{ "name": "NOISE", "type": "NOISE", "links": [37], "shape": 3 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "RandomNoise" },
|
||||
"widgets_values": [1, "randomize"]
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"pos": [0, 150],
|
||||
"mode": 0,
|
||||
"size": [350, 82],
|
||||
"type": "UNETLoader",
|
||||
"color": "#223",
|
||||
"flags": {},
|
||||
"order": 3,
|
||||
"inputs": [],
|
||||
"bgcolor": "#335",
|
||||
"outputs": [
|
||||
{
|
||||
"name": "MODEL",
|
||||
"type": "MODEL",
|
||||
"links": [190, 209],
|
||||
"shape": 3,
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": { "Node name for S&R": "UNETLoader" },
|
||||
"widgets_values": ["hunyuan_video_t2v_720p_bf16.safetensors", "default"]
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"pos": [0, 420],
|
||||
"mode": 0,
|
||||
"size": [350, 60],
|
||||
"type": "VAELoader",
|
||||
"flags": {},
|
||||
"order": 4,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "VAE",
|
||||
"type": "VAE",
|
||||
"links": [206, 211],
|
||||
"shape": 3,
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": { "Node name for S&R": "VAELoader" },
|
||||
"widgets_values": ["hunyuan_video_vae_bf16.safetensors"]
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"pos": [0, 270],
|
||||
"mode": 0,
|
||||
"size": [350, 106],
|
||||
"type": "DualCLIPLoader",
|
||||
"flags": {},
|
||||
"order": 5,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "CLIP",
|
||||
"type": "CLIP",
|
||||
"links": [205],
|
||||
"shape": 3,
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": { "Node name for S&R": "DualCLIPLoader" },
|
||||
"widgets_values": [
|
||||
"clip_l.safetensors",
|
||||
"llava_llama3_fp8_scaled.safetensors",
|
||||
"hunyuan_video",
|
||||
"default"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 44,
|
||||
"pos": [459.0518798828125, 226.60147094726562],
|
||||
"mode": 0,
|
||||
"size": [285.6000061035156, 54],
|
||||
"type": "CLIPTextEncode",
|
||||
"color": "#232",
|
||||
"flags": {},
|
||||
"order": 12,
|
||||
"title": "CLIP Text Encode (Positive Prompt)",
|
||||
"inputs": [
|
||||
{ "link": 205, "name": "clip", "type": "CLIP" },
|
||||
{
|
||||
"link": 216,
|
||||
"name": "text",
|
||||
"type": "STRING",
|
||||
"widget": { "name": "text" }
|
||||
}
|
||||
],
|
||||
"bgcolor": "#353",
|
||||
"outputs": [
|
||||
{
|
||||
"name": "CONDITIONING",
|
||||
"type": "CONDITIONING",
|
||||
"links": [175],
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": { "Node name for S&R": "CLIPTextEncode" },
|
||||
"widgets_values": [
|
||||
"anime style anime girl with massive fennec ears and one big fluffy tail, she has blonde hair long hair blue eyes wearing a pink sweater and a long blue skirt walking in a beautiful outdoor scenery with snow mountains in the background"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 83,
|
||||
"pos": [-591.1870727539062, 751.6737670898438],
|
||||
"mode": 0,
|
||||
"size": [453.5999755859375, 200],
|
||||
"type": "ComfyUIDeployExternalNumberInt",
|
||||
"flags": {},
|
||||
"order": 6,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{ "name": "value", "type": "INT", "links": [218], "slot_index": 0 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "ComfyUIDeployExternalNumberInt" },
|
||||
"widgets_values": ["height", 480, "Height", "The height of the video."]
|
||||
},
|
||||
{
|
||||
"id": 74,
|
||||
"pos": [1151.89599609375, 402.439697265625],
|
||||
"mode": 0,
|
||||
"size": [210, 170],
|
||||
"type": "Note",
|
||||
"color": "#432",
|
||||
"flags": {},
|
||||
"order": 7,
|
||||
"inputs": [],
|
||||
"bgcolor": "#653",
|
||||
"outputs": [],
|
||||
"properties": {},
|
||||
"widgets_values": [
|
||||
"Use the tiled decode node by default because most people will need it.\n\nLower the tile_size and overlap if you run out of memory."
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 78,
|
||||
"pos": [-560.058837890625, 155.3986358642578],
|
||||
"mode": 0,
|
||||
"size": [400, 200],
|
||||
"type": "ComfyUIDeployExternalText",
|
||||
"flags": {},
|
||||
"order": 8,
|
||||
"inputs": [],
|
||||
"outputs": [{ "name": "text", "type": "STRING", "links": [216] }],
|
||||
"properties": { "Node name for S&R": "ComfyUIDeployExternalText" },
|
||||
"widgets_values": [
|
||||
"prompt",
|
||||
"anime style anime girl with massive fennec ears and one big fluffy tail, she has blonde hair long hair blue eyes wearing a pink sweater and a long blue skirt walking in a beautiful outdoor scenery with snow mountains in the background",
|
||||
"Prompt",
|
||||
"The prompt to generate the video from."
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 79,
|
||||
"pos": [-588.2138061523438, 493.3861389160156],
|
||||
"mode": 0,
|
||||
"size": [453.5999755859375, 200],
|
||||
"type": "ComfyUIDeployExternalNumberInt",
|
||||
"flags": {},
|
||||
"order": 9,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{ "name": "value", "type": "INT", "links": [217], "slot_index": 0 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "ComfyUIDeployExternalNumberInt" },
|
||||
"widgets_values": ["width", 848, "Width", "The width of the video."]
|
||||
}
|
||||
],
|
||||
"config": {},
|
||||
"groups": [
|
||||
{
|
||||
"id": 1,
|
||||
"color": "#3f789e",
|
||||
"flags": {},
|
||||
"title": "Input",
|
||||
"bounding": [
|
||||
-662.9779052734375, 14.93773078918457, 575.2218627929688,
|
||||
384.41424560546875
|
||||
],
|
||||
"font_size": 24
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"color": "#b06634",
|
||||
"flags": {},
|
||||
"title": "Additional",
|
||||
"bounding": [
|
||||
-659.7621459960938, 414.3213195800781, 570.7182006835938,
|
||||
594.72216796875
|
||||
],
|
||||
"font_size": 24
|
||||
}
|
||||
],
|
||||
"version": 0.4,
|
||||
"last_link_id": 218,
|
||||
"last_node_id": 83
|
||||
}
|
||||
@@ -0,0 +1,240 @@
|
||||
{
|
||||
"extra": {
|
||||
"ds": { "scale": 1, "offset": { "0": 0, "1": 0 } },
|
||||
"node_versions": {
|
||||
"comfy-core": "0.3.12",
|
||||
"comfyui-deploy": "171a227856bd5f31e97828d89f83f3741004d05e"
|
||||
}
|
||||
},
|
||||
"links": [
|
||||
[1, 4, 0, 3, 0, "MODEL"],
|
||||
[2, 5, 0, 3, 3, "LATENT"],
|
||||
[3, 4, 1, 6, 0, "CLIP"],
|
||||
[4, 6, 0, 3, 1, "CONDITIONING"],
|
||||
[5, 4, 1, 7, 0, "CLIP"],
|
||||
[6, 7, 0, 3, 2, "CONDITIONING"],
|
||||
[7, 3, 0, 8, 0, "LATENT"],
|
||||
[8, 4, 2, 8, 1, "VAE"],
|
||||
[9, 8, 0, 9, 0, "IMAGE"],
|
||||
[10, 12, 0, 6, 1, "STRING"],
|
||||
[11, 13, 0, 7, 1, "STRING"]
|
||||
],
|
||||
"nodes": [
|
||||
{
|
||||
"id": 5,
|
||||
"pos": [473, 609],
|
||||
"mode": 0,
|
||||
"size": [315, 106],
|
||||
"type": "EmptyLatentImage",
|
||||
"flags": {},
|
||||
"order": 0,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{ "name": "LATENT", "type": "LATENT", "links": [2], "slot_index": 0 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "EmptyLatentImage" },
|
||||
"widgets_values": [512, 512, 1]
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"pos": [863, 186],
|
||||
"mode": 0,
|
||||
"size": [315, 262],
|
||||
"type": "KSampler",
|
||||
"flags": {},
|
||||
"order": 7,
|
||||
"inputs": [
|
||||
{ "link": 1, "name": "model", "type": "MODEL" },
|
||||
{ "link": 4, "name": "positive", "type": "CONDITIONING" },
|
||||
{ "link": 6, "name": "negative", "type": "CONDITIONING" },
|
||||
{ "link": 2, "name": "latent_image", "type": "LATENT" }
|
||||
],
|
||||
"outputs": [
|
||||
{ "name": "LATENT", "type": "LATENT", "links": [7], "slot_index": 0 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "KSampler" },
|
||||
"widgets_values": [
|
||||
156680208700286,
|
||||
"randomize",
|
||||
20,
|
||||
8,
|
||||
"euler",
|
||||
"normal",
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"pos": [1209, 188],
|
||||
"mode": 0,
|
||||
"size": [210, 46],
|
||||
"type": "VAEDecode",
|
||||
"flags": {},
|
||||
"order": 8,
|
||||
"inputs": [
|
||||
{ "link": 7, "name": "samples", "type": "LATENT" },
|
||||
{ "link": 8, "name": "vae", "type": "VAE" }
|
||||
],
|
||||
"outputs": [
|
||||
{ "name": "IMAGE", "type": "IMAGE", "links": [9], "slot_index": 0 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "VAEDecode" },
|
||||
"widgets_values": []
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"pos": [1451, 189],
|
||||
"mode": 0,
|
||||
"size": [210, 58],
|
||||
"type": "SaveImage",
|
||||
"flags": {},
|
||||
"order": 9,
|
||||
"inputs": [{ "link": 9, "name": "images", "type": "IMAGE" }],
|
||||
"outputs": [],
|
||||
"properties": {},
|
||||
"widgets_values": ["ComfyUI"]
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"pos": [26, 474],
|
||||
"mode": 0,
|
||||
"size": [315, 98],
|
||||
"type": "CheckpointLoaderSimple",
|
||||
"flags": {},
|
||||
"order": 1,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{ "name": "MODEL", "type": "MODEL", "links": [1], "slot_index": 0 },
|
||||
{ "name": "CLIP", "type": "CLIP", "links": [3, 5], "slot_index": 1 },
|
||||
{ "name": "VAE", "type": "VAE", "links": [8], "slot_index": 2 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "CheckpointLoaderSimple" },
|
||||
"widgets_values": ["v1-5-pruned-emaonly.ckpt"]
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"pos": [415, 186],
|
||||
"mode": 0,
|
||||
"size": [422.84503173828125, 164.31304931640625],
|
||||
"type": "CLIPTextEncode",
|
||||
"flags": {},
|
||||
"order": 6,
|
||||
"inputs": [
|
||||
{ "link": 3, "name": "clip", "type": "CLIP" },
|
||||
{
|
||||
"link": 10,
|
||||
"name": "text",
|
||||
"type": "STRING",
|
||||
"widget": { "name": "text" }
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "CONDITIONING",
|
||||
"type": "CONDITIONING",
|
||||
"links": [4],
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": { "Node name for S&R": "CLIPTextEncode" },
|
||||
"widgets_values": [
|
||||
"beautiful scenery nature glass bottle landscape, , purple galaxy bottle,"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"pos": [413, 389],
|
||||
"mode": 0,
|
||||
"size": [425.27801513671875, 180.6060791015625],
|
||||
"type": "CLIPTextEncode",
|
||||
"flags": {},
|
||||
"order": 5,
|
||||
"inputs": [
|
||||
{ "link": 5, "name": "clip", "type": "CLIP" },
|
||||
{
|
||||
"link": 11,
|
||||
"name": "text",
|
||||
"type": "STRING",
|
||||
"widget": { "name": "text" }
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "CONDITIONING",
|
||||
"type": "CONDITIONING",
|
||||
"links": [6],
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": { "Node name for S&R": "CLIPTextEncode" },
|
||||
"widgets_values": ["text, watermark"]
|
||||
},
|
||||
{
|
||||
"id": 13,
|
||||
"pos": [-70, -60],
|
||||
"mode": 0,
|
||||
"size": [400, 200],
|
||||
"type": "ComfyUIDeployExternalText",
|
||||
"flags": {},
|
||||
"order": 2,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "text",
|
||||
"type": "STRING",
|
||||
"links": [11],
|
||||
"shape": 3,
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": { "Node name for S&R": "ComfyUIDeployExternalText" },
|
||||
"widgets_values": ["negative_prompt", "text, watermark", "", ""]
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"pos": [-72, 193],
|
||||
"mode": 0,
|
||||
"size": [400, 200],
|
||||
"type": "ComfyUIDeployExternalText",
|
||||
"flags": {},
|
||||
"order": 3,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "text",
|
||||
"type": "STRING",
|
||||
"links": [10],
|
||||
"shape": 3,
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": { "Node name for S&R": "ComfyUIDeployExternalText" },
|
||||
"widgets_values": [
|
||||
"positive_prompt",
|
||||
"beautiful scenery nature glass bottle landscape, , purple galaxy bottle,",
|
||||
"",
|
||||
""
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 14,
|
||||
"pos": [419, 23],
|
||||
"mode": 0,
|
||||
"size": [210, 96],
|
||||
"type": "ComfyDeploy",
|
||||
"color": "#432",
|
||||
"flags": {},
|
||||
"order": 4,
|
||||
"inputs": [],
|
||||
"bgcolor": "#653",
|
||||
"outputs": [],
|
||||
"properties": { "version": "", "workflow_id": "", "workflow_name": "" },
|
||||
"widgets_values": ["", "", "1"]
|
||||
}
|
||||
],
|
||||
"config": {},
|
||||
"groups": [],
|
||||
"version": 0.4,
|
||||
"last_link_id": 11,
|
||||
"last_node_id": 14
|
||||
}
|
||||
@@ -0,0 +1,409 @@
|
||||
{
|
||||
"extra": {
|
||||
"ds": {
|
||||
"scale": 0.620921323059155,
|
||||
"offset": [1535.1422819333457, 285.0502099350181]
|
||||
},
|
||||
"node_versions": {
|
||||
"comfy-core": "0.3.12",
|
||||
"comfyui-deploy": "171a227856bd5f31e97828d89f83f3741004d05e"
|
||||
}
|
||||
},
|
||||
"links": [
|
||||
[7, 3, 0, 8, 0, "LATENT"],
|
||||
[21, 16, 0, 3, 1, "CONDITIONING"],
|
||||
[51, 8, 0, 9, 0, "IMAGE"],
|
||||
[53, 4, 2, 8, 1, "VAE"],
|
||||
[80, 40, 0, 3, 2, "CONDITIONING"],
|
||||
[99, 4, 0, 3, 0, "MODEL"],
|
||||
[100, 53, 0, 3, 3, "LATENT"],
|
||||
[103, 43, 0, 16, 0, "CLIP"],
|
||||
[104, 43, 0, 40, 0, "CLIP"],
|
||||
[105, 54, 0, 16, 1, "STRING"],
|
||||
[106, 55, 0, 40, 1, "STRING"],
|
||||
[107, 56, 0, 53, 0, "INT"],
|
||||
[108, 57, 0, 53, 1, "INT"]
|
||||
],
|
||||
"nodes": [
|
||||
{
|
||||
"id": 8,
|
||||
"pos": [1200, 96],
|
||||
"mode": 0,
|
||||
"size": [210, 46],
|
||||
"type": "VAEDecode",
|
||||
"flags": {},
|
||||
"order": 14,
|
||||
"inputs": [
|
||||
{ "link": 7, "name": "samples", "type": "LATENT" },
|
||||
{ "link": 53, "name": "vae", "type": "VAE", "slot_index": 1 }
|
||||
],
|
||||
"outputs": [
|
||||
{ "name": "IMAGE", "type": "IMAGE", "links": [51], "slot_index": 0 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "VAEDecode" },
|
||||
"widgets_values": []
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"pos": [1440, 96],
|
||||
"mode": 0,
|
||||
"size": [952.5112915039062, 1007.9328002929688],
|
||||
"type": "SaveImage",
|
||||
"flags": {},
|
||||
"order": 15,
|
||||
"inputs": [
|
||||
{ "link": 51, "name": "images", "type": "IMAGE", "slot_index": 0 }
|
||||
],
|
||||
"outputs": [],
|
||||
"properties": {},
|
||||
"widgets_values": ["ComfyUI"]
|
||||
},
|
||||
{
|
||||
"id": 53,
|
||||
"pos": [480, 576],
|
||||
"mode": 0,
|
||||
"size": [315, 106],
|
||||
"type": "EmptySD3LatentImage",
|
||||
"flags": {},
|
||||
"order": 10,
|
||||
"inputs": [
|
||||
{
|
||||
"link": 107,
|
||||
"name": "width",
|
||||
"type": "INT",
|
||||
"widget": { "name": "width" }
|
||||
},
|
||||
{
|
||||
"link": 108,
|
||||
"name": "height",
|
||||
"type": "INT",
|
||||
"widget": { "name": "height" }
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "LATENT",
|
||||
"type": "LATENT",
|
||||
"links": [100],
|
||||
"shape": 3,
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": { "Node name for S&R": "EmptySD3LatentImage" },
|
||||
"widgets_values": [1024, 1024, 1]
|
||||
},
|
||||
{
|
||||
"id": 50,
|
||||
"pos": [-384, 144],
|
||||
"mode": 0,
|
||||
"size": [223.34756469726562, 254.37765502929688],
|
||||
"type": "Note",
|
||||
"color": "#432",
|
||||
"flags": {},
|
||||
"order": 0,
|
||||
"inputs": [],
|
||||
"bgcolor": "#653",
|
||||
"outputs": [],
|
||||
"properties": { "text": "" },
|
||||
"widgets_values": [
|
||||
"SD3 supports different text encoder configurations, you can see how to load them here.\n\n\nMake sure to put these files:\nclip_g.safetensors\nclip_l.safetensors\nt5xxl_fp16.safetensors\n\n\nIn the ComfyUI/models/clip directory"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 41,
|
||||
"pos": [-96, 0],
|
||||
"mode": 0,
|
||||
"size": [315, 82],
|
||||
"type": "CLIPLoader",
|
||||
"flags": {},
|
||||
"order": 1,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "CLIP",
|
||||
"type": "CLIP",
|
||||
"links": [],
|
||||
"shape": 3,
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": { "Node name for S&R": "CLIPLoader" },
|
||||
"widgets_values": ["t5xxl_fp16.safetensors", "sd3", "default"]
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"pos": [-96, 480],
|
||||
"mode": 0,
|
||||
"size": [384.75592041015625, 98],
|
||||
"type": "CheckpointLoaderSimple",
|
||||
"flags": {},
|
||||
"order": 2,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{ "name": "MODEL", "type": "MODEL", "links": [99], "slot_index": 0 },
|
||||
{ "name": "CLIP", "type": "CLIP", "links": [], "slot_index": 1 },
|
||||
{ "name": "VAE", "type": "VAE", "links": [53], "slot_index": 2 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "CheckpointLoaderSimple" },
|
||||
"widgets_values": ["sd3.5_large.safetensors"]
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"pos": [864, 96],
|
||||
"mode": 0,
|
||||
"size": [315, 474],
|
||||
"type": "KSampler",
|
||||
"flags": {},
|
||||
"order": 13,
|
||||
"inputs": [
|
||||
{ "link": 99, "name": "model", "type": "MODEL", "slot_index": 0 },
|
||||
{ "link": 21, "name": "positive", "type": "CONDITIONING" },
|
||||
{ "link": 80, "name": "negative", "type": "CONDITIONING" },
|
||||
{ "link": 100, "name": "latent_image", "type": "LATENT" }
|
||||
],
|
||||
"outputs": [
|
||||
{ "name": "LATENT", "type": "LATENT", "links": [7], "slot_index": 0 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "KSampler" },
|
||||
"widgets_values": [
|
||||
797639488625463,
|
||||
"randomize",
|
||||
20,
|
||||
5.45,
|
||||
"euler",
|
||||
"sgm_uniform",
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 51,
|
||||
"pos": [-96, 624],
|
||||
"mode": 0,
|
||||
"size": [384, 192],
|
||||
"type": "Note",
|
||||
"color": "#432",
|
||||
"flags": {},
|
||||
"order": 3,
|
||||
"inputs": [],
|
||||
"bgcolor": "#653",
|
||||
"outputs": [],
|
||||
"properties": { "text": "" },
|
||||
"widgets_values": [
|
||||
"sd3.5_large.safetensors and sd3.5_medium.safetensors are files that do not contain any CLIP/text encoder weights so you need to load them separately.\n\nThey go in the ComfyUI/models/checkpoints directory."
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 43,
|
||||
"pos": [-96, 288],
|
||||
"mode": 0,
|
||||
"size": [315, 106],
|
||||
"type": "TripleCLIPLoader",
|
||||
"flags": {},
|
||||
"order": 4,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "CLIP",
|
||||
"type": "CLIP",
|
||||
"links": [103, 104],
|
||||
"shape": 3,
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": { "Node name for S&R": "TripleCLIPLoader" },
|
||||
"widgets_values": [
|
||||
"clip_l.safetensors",
|
||||
"clip_g.safetensors",
|
||||
"t5xxl_fp16.safetensors"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 42,
|
||||
"pos": [-96, 144],
|
||||
"mode": 0,
|
||||
"size": [315, 106],
|
||||
"type": "DualCLIPLoader",
|
||||
"flags": {},
|
||||
"order": 5,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "CLIP",
|
||||
"type": "CLIP",
|
||||
"links": [],
|
||||
"shape": 3,
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": { "Node name for S&R": "DualCLIPLoader" },
|
||||
"widgets_values": [
|
||||
"clip_l.safetensors",
|
||||
"clip_g.safetensors",
|
||||
"sd3",
|
||||
"default"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 40,
|
||||
"pos": [399.0046081542969, 337.009765625],
|
||||
"mode": 0,
|
||||
"size": [397.45977783203125, 151.2898406982422],
|
||||
"type": "CLIPTextEncode",
|
||||
"color": "#322",
|
||||
"flags": {},
|
||||
"order": 11,
|
||||
"title": "Negative Prompt",
|
||||
"inputs": [
|
||||
{ "link": 104, "name": "clip", "type": "CLIP" },
|
||||
{
|
||||
"link": 106,
|
||||
"name": "text",
|
||||
"type": "STRING",
|
||||
"widget": { "name": "text" }
|
||||
}
|
||||
],
|
||||
"bgcolor": "#533",
|
||||
"outputs": [
|
||||
{
|
||||
"name": "CONDITIONING",
|
||||
"type": "CONDITIONING",
|
||||
"links": [80],
|
||||
"shape": 3,
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": { "Node name for S&R": "CLIPTextEncode" },
|
||||
"widgets_values": [""]
|
||||
},
|
||||
{
|
||||
"id": 16,
|
||||
"pos": [398.5880432128906, 108.27188110351562],
|
||||
"mode": 0,
|
||||
"size": [397.21484375, 158.671875],
|
||||
"type": "CLIPTextEncode",
|
||||
"color": "#232",
|
||||
"flags": {},
|
||||
"order": 12,
|
||||
"title": "Positive Prompt",
|
||||
"inputs": [
|
||||
{ "link": 103, "name": "clip", "type": "CLIP" },
|
||||
{
|
||||
"link": 105,
|
||||
"name": "text",
|
||||
"type": "STRING",
|
||||
"widget": { "name": "text" }
|
||||
}
|
||||
],
|
||||
"bgcolor": "#353",
|
||||
"outputs": [
|
||||
{
|
||||
"name": "CONDITIONING",
|
||||
"type": "CONDITIONING",
|
||||
"links": [21],
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": { "Node name for S&R": "CLIPTextEncode" },
|
||||
"widgets_values": [
|
||||
"a bottle with a rainbow galaxy inside it on top of a wooden table on a snowy mountain top with the ocean and clouds in the background with a shot glass beside containing darkness beside a snow sculpture in the shape of a fox"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 57,
|
||||
"pos": [-1015.1683349609375, 980.396240234375],
|
||||
"mode": 0,
|
||||
"size": [453.5999755859375, 200],
|
||||
"type": "ComfyUIDeployExternalNumberInt",
|
||||
"flags": {},
|
||||
"order": 6,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{ "name": "value", "type": "INT", "links": [108], "slot_index": 0 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "ComfyUIDeployExternalNumberInt" },
|
||||
"widgets_values": ["height", 1024, "Height", "The height of the image. "]
|
||||
},
|
||||
{
|
||||
"id": 56,
|
||||
"pos": [-1014.532470703125, 732.8568725585938],
|
||||
"mode": 0,
|
||||
"size": [453.5999755859375, 200],
|
||||
"type": "ComfyUIDeployExternalNumberInt",
|
||||
"flags": {},
|
||||
"order": 7,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{ "name": "value", "type": "INT", "links": [107], "slot_index": 0 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "ComfyUIDeployExternalNumberInt" },
|
||||
"widgets_values": ["width", 1024, "Width", "The width of the image. "]
|
||||
},
|
||||
{
|
||||
"id": 55,
|
||||
"pos": [-1010.8035278320312, 487.404052734375],
|
||||
"mode": 0,
|
||||
"size": [400, 200],
|
||||
"type": "ComfyUIDeployExternalText",
|
||||
"flags": {},
|
||||
"order": 8,
|
||||
"inputs": [],
|
||||
"outputs": [{ "name": "text", "type": "STRING", "links": [106] }],
|
||||
"properties": { "Node name for S&R": "ComfyUIDeployExternalText" },
|
||||
"widgets_values": ["negative_prompt", "", "Negative Prompt", ""]
|
||||
},
|
||||
{
|
||||
"id": 54,
|
||||
"pos": [-1059.1072998046875, 127.12823486328125],
|
||||
"mode": 0,
|
||||
"size": [400, 200],
|
||||
"type": "ComfyUIDeployExternalText",
|
||||
"flags": {},
|
||||
"order": 9,
|
||||
"inputs": [],
|
||||
"outputs": [{ "name": "text", "type": "STRING", "links": [105] }],
|
||||
"properties": { "Node name for S&R": "ComfyUIDeployExternalText" },
|
||||
"widgets_values": [
|
||||
"prompt",
|
||||
"a bottle with a rainbow galaxy inside it on top of a wooden table on a snowy mountain top with the ocean and clouds in the background with a shot glass beside containing darkness beside a snow sculpture in the shape of a fox",
|
||||
"Prompt",
|
||||
"The prompt to generate an image from."
|
||||
]
|
||||
}
|
||||
],
|
||||
"config": {},
|
||||
"groups": [
|
||||
{
|
||||
"id": 1,
|
||||
"color": "#3f789e",
|
||||
"flags": {},
|
||||
"title": "Different Text Encoder Configurations",
|
||||
"bounding": [-144, -96, 480, 528],
|
||||
"font_size": 24
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"color": "#b06634",
|
||||
"flags": {},
|
||||
"title": "Additional",
|
||||
"bounding": [
|
||||
-1194.5233154296875, 388.3871154785156, 722.5393676757812,
|
||||
824.6746215820312
|
||||
],
|
||||
"font_size": 24
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"color": "#3f789e",
|
||||
"flags": {},
|
||||
"title": "Input",
|
||||
"bounding": [
|
||||
-1148.487060546875, 30.449382781982422, 552.3358764648438,
|
||||
329.3829040527344
|
||||
],
|
||||
"font_size": 24
|
||||
}
|
||||
],
|
||||
"version": 0.4,
|
||||
"last_link_id": 108,
|
||||
"last_node_id": 57
|
||||
}
|
||||
@@ -0,0 +1,452 @@
|
||||
{
|
||||
"extra": {
|
||||
"ds": {
|
||||
"scale": 0.6934334949441662,
|
||||
"offset": [276.7941771713029, -7.923387380923855]
|
||||
},
|
||||
"node_versions": {
|
||||
"comfy-core": "0.3.18",
|
||||
"comfyui-deploy": "b3df94d1affcf7ce05ee7eeda99989194bcd9159"
|
||||
}
|
||||
},
|
||||
"links": [
|
||||
[35, 3, 0, 8, 0, "LATENT"],
|
||||
[56, 8, 0, 28, 0, "IMAGE"],
|
||||
[74, 38, 0, 6, 0, "CLIP"],
|
||||
[75, 38, 0, 7, 0, "CLIP"],
|
||||
[76, 39, 0, 8, 1, "VAE"],
|
||||
[93, 8, 0, 47, 0, "IMAGE"],
|
||||
[94, 49, 0, 51, 0, "CLIP_VISION"],
|
||||
[97, 6, 0, 50, 0, "CONDITIONING"],
|
||||
[98, 7, 0, 50, 1, "CONDITIONING"],
|
||||
[99, 39, 0, 50, 2, "VAE"],
|
||||
[101, 50, 0, 3, 1, "CONDITIONING"],
|
||||
[102, 50, 1, 3, 2, "CONDITIONING"],
|
||||
[103, 50, 2, 3, 3, "LATENT"],
|
||||
[107, 51, 0, 50, 3, "CLIP_VISION_OUTPUT"],
|
||||
[110, 37, 0, 54, 0, "MODEL"],
|
||||
[111, 54, 0, 3, 0, "MODEL"],
|
||||
[112, 55, 0, 6, 1, "STRING"],
|
||||
[113, 56, 0, 7, 1, "STRING"],
|
||||
[115, 57, 0, 50, 4, "IMAGE"],
|
||||
[116, 57, 0, 51, 1, "IMAGE"],
|
||||
[117, 58, 0, 50, 5, "INT"],
|
||||
[118, 59, 0, 50, 6, "INT"]
|
||||
],
|
||||
"nodes": [
|
||||
{
|
||||
"id": 8,
|
||||
"pos": [1210, 190],
|
||||
"mode": 0,
|
||||
"size": [210, 46],
|
||||
"type": "VAEDecode",
|
||||
"flags": {},
|
||||
"order": 15,
|
||||
"inputs": [
|
||||
{ "link": 35, "name": "samples", "type": "LATENT" },
|
||||
{ "link": 76, "name": "vae", "type": "VAE" }
|
||||
],
|
||||
"outputs": [
|
||||
{ "name": "IMAGE", "type": "IMAGE", "links": [56, 93], "slot_index": 0 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "VAEDecode" },
|
||||
"widgets_values": []
|
||||
},
|
||||
{
|
||||
"id": 39,
|
||||
"pos": [866.3932495117188, 499.18597412109375],
|
||||
"mode": 0,
|
||||
"size": [306.36004638671875, 58],
|
||||
"type": "VAELoader",
|
||||
"flags": {},
|
||||
"order": 0,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{ "name": "VAE", "type": "VAE", "links": [76, 99], "slot_index": 0 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "VAELoader" },
|
||||
"widgets_values": ["wan_2.1_vae.safetensors"]
|
||||
},
|
||||
{
|
||||
"id": 28,
|
||||
"pos": [1460, 190],
|
||||
"mode": 0,
|
||||
"size": [870.8511352539062, 643.7430419921875],
|
||||
"type": "SaveAnimatedWEBP",
|
||||
"flags": {},
|
||||
"order": 16,
|
||||
"inputs": [{ "link": 56, "name": "images", "type": "IMAGE" }],
|
||||
"outputs": [],
|
||||
"properties": {},
|
||||
"widgets_values": ["ComfyUI", 16, false, 90, "default", ""]
|
||||
},
|
||||
{
|
||||
"id": 47,
|
||||
"pos": [2367.213134765625, 193.6114959716797],
|
||||
"mode": 4,
|
||||
"size": [315, 130],
|
||||
"type": "SaveWEBM",
|
||||
"flags": {},
|
||||
"order": 17,
|
||||
"inputs": [{ "link": 93, "name": "images", "type": "IMAGE" }],
|
||||
"outputs": [],
|
||||
"properties": { "Node name for S&R": "SaveWEBM" },
|
||||
"widgets_values": ["ComfyUI", "vp9", 24, 32]
|
||||
},
|
||||
{
|
||||
"id": 50,
|
||||
"pos": [673.0507202148438, 627.272705078125],
|
||||
"mode": 0,
|
||||
"size": [342.5999755859375, 250],
|
||||
"type": "WanImageToVideo",
|
||||
"flags": {},
|
||||
"order": 13,
|
||||
"inputs": [
|
||||
{ "link": 97, "name": "positive", "type": "CONDITIONING" },
|
||||
{ "link": 98, "name": "negative", "type": "CONDITIONING" },
|
||||
{ "link": 99, "name": "vae", "type": "VAE" },
|
||||
{
|
||||
"link": 107,
|
||||
"name": "clip_vision_output",
|
||||
"type": "CLIP_VISION_OUTPUT",
|
||||
"shape": 7
|
||||
},
|
||||
{ "link": 115, "name": "start_image", "type": "IMAGE", "shape": 7 },
|
||||
{
|
||||
"pos": [10, 116],
|
||||
"link": 117,
|
||||
"name": "width",
|
||||
"type": "INT",
|
||||
"widget": { "name": "width" }
|
||||
},
|
||||
{
|
||||
"pos": [10, 140],
|
||||
"link": 118,
|
||||
"name": "height",
|
||||
"type": "INT",
|
||||
"widget": { "name": "height" }
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "positive",
|
||||
"type": "CONDITIONING",
|
||||
"links": [101],
|
||||
"slot_index": 0
|
||||
},
|
||||
{
|
||||
"name": "negative",
|
||||
"type": "CONDITIONING",
|
||||
"links": [102],
|
||||
"slot_index": 1
|
||||
},
|
||||
{ "name": "latent", "type": "LATENT", "links": [103], "slot_index": 2 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "WanImageToVideo" },
|
||||
"widgets_values": [512, 512, 33, 1]
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"pos": [863, 187],
|
||||
"mode": 0,
|
||||
"size": [315, 262],
|
||||
"type": "KSampler",
|
||||
"flags": {},
|
||||
"order": 14,
|
||||
"inputs": [
|
||||
{ "link": 111, "name": "model", "type": "MODEL" },
|
||||
{ "link": 101, "name": "positive", "type": "CONDITIONING" },
|
||||
{ "link": 102, "name": "negative", "type": "CONDITIONING" },
|
||||
{ "link": 103, "name": "latent_image", "type": "LATENT" }
|
||||
],
|
||||
"outputs": [
|
||||
{ "name": "LATENT", "type": "LATENT", "links": [35], "slot_index": 0 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "KSampler" },
|
||||
"widgets_values": [
|
||||
55104841546759,
|
||||
"randomize",
|
||||
20,
|
||||
6,
|
||||
"uni_pc",
|
||||
"simple",
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 51,
|
||||
"pos": [360, 640],
|
||||
"mode": 0,
|
||||
"size": [253.60000610351562, 78],
|
||||
"type": "CLIPVisionEncode",
|
||||
"flags": {},
|
||||
"order": 12,
|
||||
"inputs": [
|
||||
{ "link": 94, "name": "clip_vision", "type": "CLIP_VISION" },
|
||||
{ "link": 116, "name": "image", "type": "IMAGE" }
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "CLIP_VISION_OUTPUT",
|
||||
"type": "CLIP_VISION_OUTPUT",
|
||||
"links": [107],
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": { "Node name for S&R": "CLIPVisionEncode" },
|
||||
"widgets_values": ["none"]
|
||||
},
|
||||
{
|
||||
"id": 54,
|
||||
"pos": [510, 70],
|
||||
"mode": 0,
|
||||
"size": [315, 58],
|
||||
"type": "ModelSamplingSD3",
|
||||
"flags": {},
|
||||
"order": 9,
|
||||
"inputs": [{ "link": 110, "name": "model", "type": "MODEL" }],
|
||||
"outputs": [
|
||||
{ "name": "MODEL", "type": "MODEL", "links": [111], "slot_index": 0 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "ModelSamplingSD3" },
|
||||
"widgets_values": [8]
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"pos": [415, 186],
|
||||
"mode": 0,
|
||||
"size": [422.84503173828125, 164.31304931640625],
|
||||
"type": "CLIPTextEncode",
|
||||
"color": "#232",
|
||||
"flags": {},
|
||||
"order": 10,
|
||||
"title": "CLIP Text Encode (Positive Prompt)",
|
||||
"inputs": [
|
||||
{ "link": 74, "name": "clip", "type": "CLIP" },
|
||||
{
|
||||
"pos": [10, 36],
|
||||
"link": 112,
|
||||
"name": "text",
|
||||
"type": "STRING",
|
||||
"widget": { "name": "text" }
|
||||
}
|
||||
],
|
||||
"bgcolor": "#353",
|
||||
"outputs": [
|
||||
{
|
||||
"name": "CONDITIONING",
|
||||
"type": "CONDITIONING",
|
||||
"links": [97],
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": { "Node name for S&R": "CLIPTextEncode" },
|
||||
"widgets_values": [
|
||||
"a cute anime girl with massive fennec ears and a big fluffy tail wearing a maid outfit turning around"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 55,
|
||||
"pos": [-672.6411743164062, 140.167724609375],
|
||||
"mode": 0,
|
||||
"size": [400, 200],
|
||||
"type": "ComfyUIDeployExternalText",
|
||||
"flags": {},
|
||||
"order": 1,
|
||||
"inputs": [],
|
||||
"outputs": [{ "name": "text", "type": "STRING", "links": [112] }],
|
||||
"properties": { "Node name for S&R": "ComfyUIDeployExternalText" },
|
||||
"widgets_values": [
|
||||
"positive_prompt",
|
||||
"a cute anime girl with massive fennec ears and a big fluffy tail wearing a maid outfit turning around",
|
||||
"Prompt",
|
||||
"The text prompt to guide video generation."
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 57,
|
||||
"pos": [-664.3828125, 405.5113525390625],
|
||||
"mode": 0,
|
||||
"size": [390.5999755859375, 366],
|
||||
"type": "ComfyUIDeployExternalImage",
|
||||
"flags": {},
|
||||
"order": 2,
|
||||
"inputs": [
|
||||
{ "link": null, "name": "default_value", "type": "IMAGE", "shape": 7 }
|
||||
],
|
||||
"outputs": [{ "name": "image", "type": "IMAGE", "links": [115, 116] }],
|
||||
"properties": { "Node name for S&R": "ComfyUIDeployExternalImage" },
|
||||
"widgets_values": [
|
||||
"image_url",
|
||||
"Image Url",
|
||||
"URL of the input image.",
|
||||
"https://comfy-deploy-output.s3.us-east-2.amazonaws.com/assets/img_GZMJYXDnLbYjWybu.png",
|
||||
""
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 56,
|
||||
"pos": [-674.42333984375, 953.0498046875],
|
||||
"mode": 0,
|
||||
"size": [400, 200],
|
||||
"type": "ComfyUIDeployExternalText",
|
||||
"flags": {},
|
||||
"order": 3,
|
||||
"inputs": [],
|
||||
"outputs": [{ "name": "text", "type": "STRING", "links": [113] }],
|
||||
"properties": { "Node name for S&R": "ComfyUIDeployExternalText" },
|
||||
"widgets_values": [
|
||||
"negative_prompt",
|
||||
"色调艳丽,过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走",
|
||||
"Negative Prompt",
|
||||
"The negative prompt to use. Use it to address details that you don't want in the video. This could be colors, objects, scenery and even the small details (e.g. moustache, blurry, low resolution). "
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 58,
|
||||
"pos": [-668.314453125, 1208.204833984375],
|
||||
"mode": 0,
|
||||
"size": [453.5999755859375, 200],
|
||||
"type": "ComfyUIDeployExternalNumberInt",
|
||||
"flags": {},
|
||||
"order": 4,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{ "name": "value", "type": "INT", "links": [117], "slot_index": 0 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "ComfyUIDeployExternalNumberInt" },
|
||||
"widgets_values": ["width", 512, "Width", "The width of the video. "]
|
||||
},
|
||||
{
|
||||
"id": 59,
|
||||
"pos": [-665.8831787109375, 1461.255126953125],
|
||||
"mode": 0,
|
||||
"size": [453.5999755859375, 200],
|
||||
"type": "ComfyUIDeployExternalNumberInt",
|
||||
"flags": {},
|
||||
"order": 5,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{ "name": "value", "type": "INT", "links": [118], "slot_index": 0 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "ComfyUIDeployExternalNumberInt" },
|
||||
"widgets_values": ["height", 512, "Height", "The Height of the video."]
|
||||
},
|
||||
{
|
||||
"id": 37,
|
||||
"pos": [-3.3700287342071533, 81.69654846191406],
|
||||
"mode": 0,
|
||||
"size": [346.7470703125, 82],
|
||||
"type": "UNETLoader",
|
||||
"flags": {},
|
||||
"order": 6,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{ "name": "MODEL", "type": "MODEL", "links": [110], "slot_index": 0 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "UNETLoader" },
|
||||
"widgets_values": ["wan2.1_i2v_480p_14B_bf16.safetensors", "default"]
|
||||
},
|
||||
{
|
||||
"id": 38,
|
||||
"pos": [-3.7316977977752686, 230.76495361328125],
|
||||
"mode": 0,
|
||||
"size": [390, 98],
|
||||
"type": "CLIPLoader",
|
||||
"flags": {},
|
||||
"order": 7,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{ "name": "CLIP", "type": "CLIP", "links": [74, 75], "slot_index": 0 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "CLIPLoader" },
|
||||
"widgets_values": [
|
||||
"umt5_xxl_fp8_e4m3fn_scaled.safetensors",
|
||||
"wan",
|
||||
"default"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 49,
|
||||
"pos": [16.57183265686035, 640.22314453125],
|
||||
"mode": 0,
|
||||
"size": [315, 58],
|
||||
"type": "CLIPVisionLoader",
|
||||
"flags": {},
|
||||
"order": 8,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "CLIP_VISION",
|
||||
"type": "CLIP_VISION",
|
||||
"links": [94],
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": { "Node name for S&R": "CLIPVisionLoader" },
|
||||
"widgets_values": ["clip_vision_h.safetensors"]
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"pos": [414.1811828613281, 393.8824768066406],
|
||||
"mode": 0,
|
||||
"size": [425.27801513671875, 180.6060791015625],
|
||||
"type": "CLIPTextEncode",
|
||||
"color": "#322",
|
||||
"flags": {},
|
||||
"order": 11,
|
||||
"title": "CLIP Text Encode (Negative Prompt)",
|
||||
"inputs": [
|
||||
{ "link": 75, "name": "clip", "type": "CLIP" },
|
||||
{
|
||||
"pos": [10, 36],
|
||||
"link": 113,
|
||||
"name": "text",
|
||||
"type": "STRING",
|
||||
"widget": { "name": "text" }
|
||||
}
|
||||
],
|
||||
"bgcolor": "#533",
|
||||
"outputs": [
|
||||
{
|
||||
"name": "CONDITIONING",
|
||||
"type": "CONDITIONING",
|
||||
"links": [98],
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": { "Node name for S&R": "CLIPTextEncode" },
|
||||
"widgets_values": [
|
||||
"色调艳丽,过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走"
|
||||
]
|
||||
}
|
||||
],
|
||||
"config": {},
|
||||
"groups": [
|
||||
{
|
||||
"id": 1,
|
||||
"color": "#3f789e",
|
||||
"flags": {},
|
||||
"title": "Input",
|
||||
"bounding": [
|
||||
-708.2940063476562, 47.549102783203125, 617.7969360351562,
|
||||
761.303955078125
|
||||
],
|
||||
"font_size": 24
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"color": "#b06634",
|
||||
"flags": {},
|
||||
"title": "Additional",
|
||||
"bounding": [
|
||||
-703.6196899414062, 861.310791015625, 625.998779296875,
|
||||
845.0675048828125
|
||||
],
|
||||
"font_size": 24
|
||||
}
|
||||
],
|
||||
"version": 0.4,
|
||||
"last_link_id": 118,
|
||||
"last_node_id": 59
|
||||
}
|
||||
@@ -0,0 +1,452 @@
|
||||
{
|
||||
"extra": {
|
||||
"ds": {
|
||||
"scale": 0.6303940863128795,
|
||||
"offset": [-209.31226203277674, -32.62073943929215]
|
||||
},
|
||||
"node_versions": {
|
||||
"comfy-core": "0.3.18",
|
||||
"comfyui-deploy": "b3df94d1affcf7ce05ee7eeda99989194bcd9159"
|
||||
}
|
||||
},
|
||||
"links": [
|
||||
[1, 6, 0, 1, 0, "LATENT"],
|
||||
[2, 2, 0, 1, 1, "VAE"],
|
||||
[3, 1, 0, 3, 0, "IMAGE"],
|
||||
[4, 1, 0, 4, 0, "IMAGE"],
|
||||
[5, 9, 0, 5, 0, "CONDITIONING"],
|
||||
[6, 18, 0, 5, 1, "CONDITIONING"],
|
||||
[7, 2, 0, 5, 2, "VAE"],
|
||||
[8, 7, 0, 5, 3, "CLIP_VISION_OUTPUT"],
|
||||
[9, 11, 0, 5, 4, "IMAGE"],
|
||||
[10, 13, 0, 5, 5, "INT"],
|
||||
[11, 14, 0, 5, 6, "INT"],
|
||||
[12, 8, 0, 6, 0, "MODEL"],
|
||||
[13, 5, 0, 6, 1, "CONDITIONING"],
|
||||
[14, 5, 1, 6, 2, "CONDITIONING"],
|
||||
[15, 5, 2, 6, 3, "LATENT"],
|
||||
[16, 17, 0, 7, 0, "CLIP_VISION"],
|
||||
[17, 11, 0, 7, 1, "IMAGE"],
|
||||
[18, 15, 0, 8, 0, "MODEL"],
|
||||
[19, 16, 0, 9, 0, "CLIP"],
|
||||
[20, 10, 0, 9, 1, "STRING"],
|
||||
[21, 16, 0, 18, 0, "CLIP"],
|
||||
[22, 12, 0, 18, 1, "STRING"]
|
||||
],
|
||||
"nodes": [
|
||||
{
|
||||
"id": 1,
|
||||
"pos": [1823.98876953125, 702.6244506835938],
|
||||
"mode": 0,
|
||||
"size": [210, 46],
|
||||
"type": "VAEDecode",
|
||||
"flags": {},
|
||||
"order": 15,
|
||||
"inputs": [
|
||||
{ "link": 1, "name": "samples", "type": "LATENT" },
|
||||
{ "link": 2, "name": "vae", "type": "VAE" }
|
||||
],
|
||||
"outputs": [
|
||||
{ "name": "IMAGE", "type": "IMAGE", "links": [3, 4], "slot_index": 0 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "VAEDecode" },
|
||||
"widgets_values": []
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"pos": [1480.382080078125, 1011.8104248046875],
|
||||
"mode": 0,
|
||||
"size": [306.36004638671875, 58],
|
||||
"type": "VAELoader",
|
||||
"flags": {},
|
||||
"order": 0,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{ "name": "VAE", "type": "VAE", "links": [2, 7], "slot_index": 0 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "VAELoader" },
|
||||
"widgets_values": ["wan_2.1_vae.safetensors"]
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"pos": [2073.98876953125, 702.6244506835938],
|
||||
"mode": 0,
|
||||
"size": [870.8511352539062, 643.7430419921875],
|
||||
"type": "SaveAnimatedWEBP",
|
||||
"flags": {},
|
||||
"order": 16,
|
||||
"inputs": [{ "link": 3, "name": "images", "type": "IMAGE" }],
|
||||
"outputs": [],
|
||||
"properties": {},
|
||||
"widgets_values": ["ComfyUI", 16, false, 90, "default", ""]
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"pos": [2981.201904296875, 706.2359008789062],
|
||||
"mode": 4,
|
||||
"size": [315, 130],
|
||||
"type": "SaveWEBM",
|
||||
"flags": {},
|
||||
"order": 17,
|
||||
"inputs": [{ "link": 4, "name": "images", "type": "IMAGE" }],
|
||||
"outputs": [],
|
||||
"properties": { "Node name for S&R": "SaveWEBM" },
|
||||
"widgets_values": ["ComfyUI", "vp9", 24, 32]
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"pos": [1287.03955078125, 1139.8970947265625],
|
||||
"mode": 0,
|
||||
"size": [342.5999755859375, 250],
|
||||
"type": "WanImageToVideo",
|
||||
"flags": {},
|
||||
"order": 13,
|
||||
"inputs": [
|
||||
{ "link": 5, "name": "positive", "type": "CONDITIONING" },
|
||||
{ "link": 6, "name": "negative", "type": "CONDITIONING" },
|
||||
{ "link": 7, "name": "vae", "type": "VAE" },
|
||||
{
|
||||
"link": 8,
|
||||
"name": "clip_vision_output",
|
||||
"type": "CLIP_VISION_OUTPUT",
|
||||
"shape": 7
|
||||
},
|
||||
{ "link": 9, "name": "start_image", "type": "IMAGE", "shape": 7 },
|
||||
{
|
||||
"pos": [10, 116],
|
||||
"link": 10,
|
||||
"name": "width",
|
||||
"type": "INT",
|
||||
"widget": { "name": "width" }
|
||||
},
|
||||
{
|
||||
"pos": [10, 140],
|
||||
"link": 11,
|
||||
"name": "height",
|
||||
"type": "INT",
|
||||
"widget": { "name": "height" }
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "positive",
|
||||
"type": "CONDITIONING",
|
||||
"links": [13],
|
||||
"slot_index": 0
|
||||
},
|
||||
{
|
||||
"name": "negative",
|
||||
"type": "CONDITIONING",
|
||||
"links": [14],
|
||||
"slot_index": 1
|
||||
},
|
||||
{ "name": "latent", "type": "LATENT", "links": [15], "slot_index": 2 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "WanImageToVideo" },
|
||||
"widgets_values": [512, 512, 33, 1]
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"pos": [1476.98876953125, 699.6244506835938],
|
||||
"mode": 0,
|
||||
"size": [315, 262],
|
||||
"type": "KSampler",
|
||||
"flags": {},
|
||||
"order": 14,
|
||||
"inputs": [
|
||||
{ "link": 12, "name": "model", "type": "MODEL" },
|
||||
{ "link": 13, "name": "positive", "type": "CONDITIONING" },
|
||||
{ "link": 14, "name": "negative", "type": "CONDITIONING" },
|
||||
{ "link": 15, "name": "latent_image", "type": "LATENT" }
|
||||
],
|
||||
"outputs": [
|
||||
{ "name": "LATENT", "type": "LATENT", "links": [1], "slot_index": 0 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "KSampler" },
|
||||
"widgets_values": [
|
||||
625624384968868,
|
||||
"randomize",
|
||||
20,
|
||||
6,
|
||||
"uni_pc",
|
||||
"simple",
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"pos": [973.98876953125, 1152.6243896484375],
|
||||
"mode": 0,
|
||||
"size": [253.60000610351562, 78],
|
||||
"type": "CLIPVisionEncode",
|
||||
"flags": {},
|
||||
"order": 10,
|
||||
"inputs": [
|
||||
{ "link": 16, "name": "clip_vision", "type": "CLIP_VISION" },
|
||||
{ "link": 17, "name": "image", "type": "IMAGE" }
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "CLIP_VISION_OUTPUT",
|
||||
"type": "CLIP_VISION_OUTPUT",
|
||||
"links": [8],
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": { "Node name for S&R": "CLIPVisionEncode" },
|
||||
"widgets_values": ["none"]
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"pos": [1123.98876953125, 582.6244506835938],
|
||||
"mode": 0,
|
||||
"size": [315, 58],
|
||||
"type": "ModelSamplingSD3",
|
||||
"flags": {},
|
||||
"order": 11,
|
||||
"inputs": [{ "link": 18, "name": "model", "type": "MODEL" }],
|
||||
"outputs": [
|
||||
{ "name": "MODEL", "type": "MODEL", "links": [12], "slot_index": 0 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "ModelSamplingSD3" },
|
||||
"widgets_values": [8]
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"pos": [1028.98876953125, 698.6244506835938],
|
||||
"mode": 0,
|
||||
"size": [422.84503173828125, 164.31304931640625],
|
||||
"type": "CLIPTextEncode",
|
||||
"color": "#232",
|
||||
"flags": {},
|
||||
"order": 12,
|
||||
"title": "CLIP Text Encode (Positive Prompt)",
|
||||
"inputs": [
|
||||
{ "link": 19, "name": "clip", "type": "CLIP" },
|
||||
{
|
||||
"pos": [10, 36],
|
||||
"link": 20,
|
||||
"name": "text",
|
||||
"type": "STRING",
|
||||
"widget": { "name": "text" }
|
||||
}
|
||||
],
|
||||
"bgcolor": "#353",
|
||||
"outputs": [
|
||||
{
|
||||
"name": "CONDITIONING",
|
||||
"type": "CONDITIONING",
|
||||
"links": [5],
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": { "Node name for S&R": "CLIPTextEncode" },
|
||||
"widgets_values": [
|
||||
"a cute anime girl with massive fennec ears and a big fluffy tail wearing a maid outfit turning around"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"pos": [-50.3940315246582, 918.1358032226562],
|
||||
"mode": 0,
|
||||
"size": [390.5999755859375, 366],
|
||||
"type": "ComfyUIDeployExternalImage",
|
||||
"flags": {},
|
||||
"order": 1,
|
||||
"inputs": [
|
||||
{ "link": null, "name": "default_value", "type": "IMAGE", "shape": 7 }
|
||||
],
|
||||
"outputs": [{ "name": "image", "type": "IMAGE", "links": [9, 17] }],
|
||||
"properties": { "Node name for S&R": "ComfyUIDeployExternalImage" },
|
||||
"widgets_values": [
|
||||
"image_url",
|
||||
"Image Url",
|
||||
"URL of the input image.",
|
||||
"https://comfy-deploy-output.s3.us-east-2.amazonaws.com/assets/img_GZMJYXDnLbYjWybu.png",
|
||||
""
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"pos": [-60.4345588684082, 1465.6741943359375],
|
||||
"mode": 0,
|
||||
"size": [400, 200],
|
||||
"type": "ComfyUIDeployExternalText",
|
||||
"flags": {},
|
||||
"order": 2,
|
||||
"inputs": [],
|
||||
"outputs": [{ "name": "text", "type": "STRING", "links": [22] }],
|
||||
"properties": { "Node name for S&R": "ComfyUIDeployExternalText" },
|
||||
"widgets_values": [
|
||||
"negative_prompt",
|
||||
"色调艳丽,过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走",
|
||||
"Negative Prompt",
|
||||
"The negative prompt to use. Use it to address details that you don't want in the video. This could be colors, objects, scenery and even the small details (e.g. moustache, blurry, low resolution). "
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 13,
|
||||
"pos": [-54.3256721496582, 1720.8292236328125],
|
||||
"mode": 0,
|
||||
"size": [453.5999755859375, 200],
|
||||
"type": "ComfyUIDeployExternalNumberInt",
|
||||
"flags": {},
|
||||
"order": 3,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{ "name": "value", "type": "INT", "links": [10], "slot_index": 0 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "ComfyUIDeployExternalNumberInt" },
|
||||
"widgets_values": ["width", 512, "Width", "The width of the video. "]
|
||||
},
|
||||
{
|
||||
"id": 14,
|
||||
"pos": [-51.8943977355957, 1973.8795166015625],
|
||||
"mode": 0,
|
||||
"size": [453.5999755859375, 200],
|
||||
"type": "ComfyUIDeployExternalNumberInt",
|
||||
"flags": {},
|
||||
"order": 4,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{ "name": "value", "type": "INT", "links": [11], "slot_index": 0 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "ComfyUIDeployExternalNumberInt" },
|
||||
"widgets_values": ["height", 512, "Height", "The Height of the video."]
|
||||
},
|
||||
{
|
||||
"id": 16,
|
||||
"pos": [610.257080078125, 743.389404296875],
|
||||
"mode": 0,
|
||||
"size": [390, 98],
|
||||
"type": "CLIPLoader",
|
||||
"flags": {},
|
||||
"order": 5,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{ "name": "CLIP", "type": "CLIP", "links": [19, 21], "slot_index": 0 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "CLIPLoader" },
|
||||
"widgets_values": [
|
||||
"umt5_xxl_fp8_e4m3fn_scaled.safetensors",
|
||||
"wan",
|
||||
"default"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 17,
|
||||
"pos": [630.5606079101562, 1152.8475341796875],
|
||||
"mode": 0,
|
||||
"size": [315, 58],
|
||||
"type": "CLIPVisionLoader",
|
||||
"flags": {},
|
||||
"order": 6,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "CLIP_VISION",
|
||||
"type": "CLIP_VISION",
|
||||
"links": [16],
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": { "Node name for S&R": "CLIPVisionLoader" },
|
||||
"widgets_values": ["clip_vision_h.safetensors"]
|
||||
},
|
||||
{
|
||||
"id": 18,
|
||||
"pos": [1028.169921875, 906.5068969726562],
|
||||
"mode": 0,
|
||||
"size": [425.27801513671875, 180.6060791015625],
|
||||
"type": "CLIPTextEncode",
|
||||
"color": "#322",
|
||||
"flags": {},
|
||||
"order": 9,
|
||||
"title": "CLIP Text Encode (Negative Prompt)",
|
||||
"inputs": [
|
||||
{ "link": 21, "name": "clip", "type": "CLIP" },
|
||||
{
|
||||
"pos": [10, 36],
|
||||
"link": 22,
|
||||
"name": "text",
|
||||
"type": "STRING",
|
||||
"widget": { "name": "text" }
|
||||
}
|
||||
],
|
||||
"bgcolor": "#533",
|
||||
"outputs": [
|
||||
{
|
||||
"name": "CONDITIONING",
|
||||
"type": "CONDITIONING",
|
||||
"links": [6],
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": { "Node name for S&R": "CLIPTextEncode" },
|
||||
"widgets_values": [
|
||||
"色调艳丽,过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 15,
|
||||
"pos": [610.6187744140625, 594.3209838867188],
|
||||
"mode": 0,
|
||||
"size": [346.7470703125, 82],
|
||||
"type": "UNETLoader",
|
||||
"flags": {},
|
||||
"order": 7,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{ "name": "MODEL", "type": "MODEL", "links": [18], "slot_index": 0 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "UNETLoader" },
|
||||
"widgets_values": ["wan2.1_i2v_720p_14B_bf16.safetensors", "default"]
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"pos": [-60.696964263916016, 649.5515747070312],
|
||||
"mode": 0,
|
||||
"size": [400, 200],
|
||||
"type": "ComfyUIDeployExternalText",
|
||||
"flags": {},
|
||||
"order": 8,
|
||||
"inputs": [],
|
||||
"outputs": [{ "name": "text", "type": "STRING", "links": [20] }],
|
||||
"properties": { "Node name for S&R": "ComfyUIDeployExternalText" },
|
||||
"widgets_values": [
|
||||
"positive_prompt",
|
||||
"a cute anime girl with massive fennec ears and a big fluffy tail wearing a maid outfit running towards front happily",
|
||||
"Prompt",
|
||||
"The text prompt to guide video generation."
|
||||
]
|
||||
}
|
||||
],
|
||||
"config": {},
|
||||
"groups": [
|
||||
{
|
||||
"id": 1,
|
||||
"color": "#3f789e",
|
||||
"flags": {},
|
||||
"title": "Input",
|
||||
"bounding": [
|
||||
-94.30522155761719, 560.1735229492188, 617.7969360351562,
|
||||
761.303955078125
|
||||
],
|
||||
"font_size": 24
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"color": "#b06634",
|
||||
"flags": {},
|
||||
"title": "Additional",
|
||||
"bounding": [
|
||||
-89.63090515136719, 1373.9351806640625, 625.998779296875,
|
||||
845.0675048828125
|
||||
],
|
||||
"font_size": 24
|
||||
}
|
||||
],
|
||||
"version": 0.4,
|
||||
"last_link_id": 22,
|
||||
"last_node_id": 18
|
||||
}
|
||||
@@ -0,0 +1,359 @@
|
||||
{
|
||||
"extra": {
|
||||
"ds": {
|
||||
"scale": 0.8390545288824369,
|
||||
"offset": [814.3725295729478, -347.90757575249455]
|
||||
},
|
||||
"node_versions": {
|
||||
"comfy-core": "0.3.18",
|
||||
"comfyui-deploy": "b3df94d1affcf7ce05ee7eeda99989194bcd9159"
|
||||
}
|
||||
},
|
||||
"links": [
|
||||
[35, 3, 0, 8, 0, "LATENT"],
|
||||
[46, 6, 0, 3, 1, "CONDITIONING"],
|
||||
[52, 7, 0, 3, 2, "CONDITIONING"],
|
||||
[56, 8, 0, 28, 0, "IMAGE"],
|
||||
[74, 38, 0, 6, 0, "CLIP"],
|
||||
[75, 38, 0, 7, 0, "CLIP"],
|
||||
[76, 39, 0, 8, 1, "VAE"],
|
||||
[91, 40, 0, 3, 3, "LATENT"],
|
||||
[93, 8, 0, 47, 0, "IMAGE"],
|
||||
[94, 37, 0, 48, 0, "MODEL"],
|
||||
[95, 48, 0, 3, 0, "MODEL"],
|
||||
[96, 49, 0, 6, 1, "STRING"],
|
||||
[97, 50, 0, 7, 1, "STRING"],
|
||||
[99, 52, 0, 40, 1, "INT"],
|
||||
[100, 51, 0, 40, 0, "INT"]
|
||||
],
|
||||
"nodes": [
|
||||
{
|
||||
"id": 8,
|
||||
"pos": [1210, 190],
|
||||
"mode": 0,
|
||||
"size": [210, 46],
|
||||
"type": "VAEDecode",
|
||||
"flags": {},
|
||||
"order": 12,
|
||||
"inputs": [
|
||||
{ "link": 35, "name": "samples", "type": "LATENT" },
|
||||
{ "link": 76, "name": "vae", "type": "VAE" }
|
||||
],
|
||||
"outputs": [
|
||||
{ "name": "IMAGE", "type": "IMAGE", "links": [56, 93], "slot_index": 0 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "VAEDecode" },
|
||||
"widgets_values": []
|
||||
},
|
||||
{
|
||||
"id": 39,
|
||||
"pos": [866.3932495117188, 499.18597412109375],
|
||||
"mode": 0,
|
||||
"size": [306.36004638671875, 58],
|
||||
"type": "VAELoader",
|
||||
"flags": {},
|
||||
"order": 0,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{ "name": "VAE", "type": "VAE", "links": [76], "slot_index": 0 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "VAELoader" },
|
||||
"widgets_values": ["wan_2.1_vae.safetensors"]
|
||||
},
|
||||
{
|
||||
"id": 47,
|
||||
"pos": [2367.213134765625, 193.6114959716797],
|
||||
"mode": 4,
|
||||
"size": [315, 130],
|
||||
"type": "SaveWEBM",
|
||||
"flags": {},
|
||||
"order": 14,
|
||||
"inputs": [{ "link": 93, "name": "images", "type": "IMAGE" }],
|
||||
"outputs": [],
|
||||
"properties": { "Node name for S&R": "SaveWEBM" },
|
||||
"widgets_values": ["ComfyUI", "vp9", 24, 32]
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"pos": [863, 187],
|
||||
"mode": 0,
|
||||
"size": [315, 262],
|
||||
"type": "KSampler",
|
||||
"flags": {},
|
||||
"order": 11,
|
||||
"inputs": [
|
||||
{ "link": 95, "name": "model", "type": "MODEL" },
|
||||
{ "link": 46, "name": "positive", "type": "CONDITIONING" },
|
||||
{ "link": 52, "name": "negative", "type": "CONDITIONING" },
|
||||
{ "link": 91, "name": "latent_image", "type": "LATENT" }
|
||||
],
|
||||
"outputs": [
|
||||
{ "name": "LATENT", "type": "LATENT", "links": [35], "slot_index": 0 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "KSampler" },
|
||||
"widgets_values": [
|
||||
577746309562741,
|
||||
"randomize",
|
||||
30,
|
||||
6,
|
||||
"uni_pc",
|
||||
"simple",
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 48,
|
||||
"pos": [440, 50],
|
||||
"mode": 0,
|
||||
"size": [210, 58],
|
||||
"type": "ModelSamplingSD3",
|
||||
"flags": {},
|
||||
"order": 7,
|
||||
"inputs": [{ "link": 94, "name": "model", "type": "MODEL" }],
|
||||
"outputs": [
|
||||
{ "name": "MODEL", "type": "MODEL", "links": [95], "slot_index": 0 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "ModelSamplingSD3" },
|
||||
"widgets_values": [8]
|
||||
},
|
||||
{
|
||||
"id": 37,
|
||||
"pos": [20, 40],
|
||||
"mode": 0,
|
||||
"size": [346.7470703125, 82],
|
||||
"type": "UNETLoader",
|
||||
"flags": {},
|
||||
"order": 1,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{ "name": "MODEL", "type": "MODEL", "links": [94], "slot_index": 0 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "UNETLoader" },
|
||||
"widgets_values": ["wan2.1_t2v_1.3B_fp16.safetensors", "default"]
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"pos": [415, 186],
|
||||
"mode": 0,
|
||||
"size": [422.84503173828125, 164.31304931640625],
|
||||
"type": "CLIPTextEncode",
|
||||
"color": "#232",
|
||||
"flags": {},
|
||||
"order": 8,
|
||||
"title": "CLIP Text Encode (Positive Prompt)",
|
||||
"inputs": [
|
||||
{ "link": 74, "name": "clip", "type": "CLIP" },
|
||||
{
|
||||
"pos": [10, 36],
|
||||
"link": 96,
|
||||
"name": "text",
|
||||
"type": "STRING",
|
||||
"widget": { "name": "text" }
|
||||
}
|
||||
],
|
||||
"bgcolor": "#353",
|
||||
"outputs": [
|
||||
{
|
||||
"name": "CONDITIONING",
|
||||
"type": "CONDITIONING",
|
||||
"links": [46],
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": { "Node name for S&R": "CLIPTextEncode" },
|
||||
"widgets_values": [
|
||||
"a fox moving quickly in a beautiful winter scenery nature trees mountains daytime tracking camera"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"pos": [413, 389],
|
||||
"mode": 0,
|
||||
"size": [425.27801513671875, 180.6060791015625],
|
||||
"type": "CLIPTextEncode",
|
||||
"color": "#322",
|
||||
"flags": {},
|
||||
"order": 9,
|
||||
"title": "CLIP Text Encode (Negative Prompt)",
|
||||
"inputs": [
|
||||
{ "link": 75, "name": "clip", "type": "CLIP" },
|
||||
{
|
||||
"pos": [10, 36],
|
||||
"link": 97,
|
||||
"name": "text",
|
||||
"type": "STRING",
|
||||
"widget": { "name": "text" }
|
||||
}
|
||||
],
|
||||
"bgcolor": "#533",
|
||||
"outputs": [
|
||||
{
|
||||
"name": "CONDITIONING",
|
||||
"type": "CONDITIONING",
|
||||
"links": [52],
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": { "Node name for S&R": "CLIPTextEncode" },
|
||||
"widgets_values": [
|
||||
"色调艳丽,过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 38,
|
||||
"pos": [-10.047812461853027, 187.37384033203125],
|
||||
"mode": 0,
|
||||
"size": [390, 98],
|
||||
"type": "CLIPLoader",
|
||||
"flags": {},
|
||||
"order": 2,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{ "name": "CLIP", "type": "CLIP", "links": [74, 75], "slot_index": 0 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "CLIPLoader" },
|
||||
"widgets_values": [
|
||||
"umt5_xxl_fp8_e4m3fn_scaled.safetensors",
|
||||
"wan",
|
||||
"default"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 49,
|
||||
"pos": [-535.2967529296875, 342.3277587890625],
|
||||
"mode": 0,
|
||||
"size": [400, 200],
|
||||
"type": "ComfyUIDeployExternalText",
|
||||
"flags": {},
|
||||
"order": 3,
|
||||
"inputs": [],
|
||||
"outputs": [{ "name": "text", "type": "STRING", "links": [96] }],
|
||||
"properties": { "Node name for S&R": "ComfyUIDeployExternalText" },
|
||||
"widgets_values": [
|
||||
"positive_prompt",
|
||||
"a fox moving quickly in a beautiful winter scenery nature trees mountains daytime tracking camera",
|
||||
"Prompt",
|
||||
"The text prompt to guide video generation. "
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 50,
|
||||
"pos": [-526.2716064453125, 703.8343505859375],
|
||||
"mode": 0,
|
||||
"size": [400, 200],
|
||||
"type": "ComfyUIDeployExternalText",
|
||||
"flags": {},
|
||||
"order": 4,
|
||||
"inputs": [],
|
||||
"outputs": [{ "name": "text", "type": "STRING", "links": [97] }],
|
||||
"properties": { "Node name for S&R": "ComfyUIDeployExternalText" },
|
||||
"widgets_values": [
|
||||
"negative_prompt",
|
||||
"色调艳丽,过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走",
|
||||
"Negative Prompt",
|
||||
"The negative prompt to use. Use it to address details that you don't want in the image. This could be colors, objects, scenery and even the small details (e.g. moustache, blurry, low resolution). "
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 40,
|
||||
"pos": [516.926513671875, 619.59716796875],
|
||||
"mode": 0,
|
||||
"size": [315, 150],
|
||||
"type": "EmptyHunyuanLatentVideo",
|
||||
"flags": {},
|
||||
"order": 10,
|
||||
"inputs": [
|
||||
{
|
||||
"pos": [10, 36],
|
||||
"link": 100,
|
||||
"name": "width",
|
||||
"type": "INT",
|
||||
"widget": { "name": "width" }
|
||||
},
|
||||
{
|
||||
"pos": [10, 60],
|
||||
"link": 99,
|
||||
"name": "height",
|
||||
"type": "INT",
|
||||
"widget": { "name": "height" }
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{ "name": "LATENT", "type": "LATENT", "links": [91], "slot_index": 0 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "EmptyHunyuanLatentVideo" },
|
||||
"widgets_values": [832, 480, 33, 1]
|
||||
},
|
||||
{
|
||||
"id": 28,
|
||||
"pos": [1460, 190],
|
||||
"mode": 0,
|
||||
"size": [870.8511352539062, 643.7430419921875],
|
||||
"type": "SaveAnimatedWEBP",
|
||||
"flags": {},
|
||||
"order": 13,
|
||||
"inputs": [{ "link": 56, "name": "images", "type": "IMAGE" }],
|
||||
"outputs": [],
|
||||
"properties": {},
|
||||
"widgets_values": ["ComfyUI", 16, false, 90, "default"]
|
||||
},
|
||||
{
|
||||
"id": 51,
|
||||
"pos": [-522.7415161132812, 959.3386840820312],
|
||||
"mode": 0,
|
||||
"size": [453.5999755859375, 200],
|
||||
"type": "ComfyUIDeployExternalNumberInt",
|
||||
"flags": {},
|
||||
"order": 5,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{ "name": "value", "type": "INT", "links": [100], "slot_index": 0 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "ComfyUIDeployExternalNumberInt" },
|
||||
"widgets_values": ["width", 832, "Width", "The Width of the Video. "]
|
||||
},
|
||||
{
|
||||
"id": 52,
|
||||
"pos": [-518.9917602539062, 1207.9444580078125],
|
||||
"mode": 0,
|
||||
"size": [453.5999755859375, 200],
|
||||
"type": "ComfyUIDeployExternalNumberInt",
|
||||
"flags": {},
|
||||
"order": 6,
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{ "name": "value", "type": "INT", "links": [99], "slot_index": 0 }
|
||||
],
|
||||
"properties": { "Node name for S&R": "ComfyUIDeployExternalNumberInt" },
|
||||
"widgets_values": ["height", 480, "Height", "The Height of the Video. "]
|
||||
}
|
||||
],
|
||||
"config": {},
|
||||
"groups": [
|
||||
{
|
||||
"id": 1,
|
||||
"color": "#3f789e",
|
||||
"flags": {},
|
||||
"title": "Inputs",
|
||||
"bounding": [
|
||||
-560.9110717773438, 255.1485595703125, 500.94989013671875,
|
||||
333.4786682128906
|
||||
],
|
||||
"font_size": 24
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"color": "#b06634",
|
||||
"flags": {},
|
||||
"title": "Additional",
|
||||
"bounding": [
|
||||
-556.5305786132812, 619.87548828125, 761.2673950195312,
|
||||
811.6837768554688
|
||||
],
|
||||
"font_size": 24
|
||||
}
|
||||
],
|
||||
"version": 0.4,
|
||||
"last_link_id": 100,
|
||||
"last_node_id": 52
|
||||
}
|
||||
+3
-3
@@ -1,9 +1,9 @@
|
||||
[project]
|
||||
name = "comfyui-deploy"
|
||||
description = "Open source comfyui deployment platform, a vercel for generative workflow infra."
|
||||
version = "1.1.0"
|
||||
license = "LICENSE"
|
||||
dependencies = ["aiofiles", "pydantic", "opencv-python", "imageio-ffmpeg"]
|
||||
version = "2.1.0"
|
||||
license = { file = "LICENSE" }
|
||||
dependencies = ["aiofiles", "pydantic", "opencv-python", "imageio-ffmpeg", "tabulate", "brotli"]
|
||||
|
||||
[project.urls]
|
||||
Repository = "https://github.com/BennyKok/comfyui-deploy"
|
||||
|
||||
@@ -3,4 +3,5 @@ pydantic
|
||||
opencv-python
|
||||
imageio-ffmpeg
|
||||
brotli
|
||||
tabulate
|
||||
# logfire
|
||||
@@ -1,4 +0,0 @@
|
||||
/** @typedef {import('../../../web/scripts/api.js').api} API*/
|
||||
import { api as _api } from '../../scripts/api.js';
|
||||
/** @type {API} */
|
||||
export const api = _api;
|
||||
@@ -1,4 +0,0 @@
|
||||
/** @typedef {import('../../../web/scripts/app.js').ComfyApp} ComfyApp*/
|
||||
import { app as _app } from '../../scripts/app.js';
|
||||
/** @type {ComfyApp} */
|
||||
export const app = _app;
|
||||
+750
-53
@@ -1,8 +1,44 @@
|
||||
import { app } from "./app.js";
|
||||
import { api } from "./api.js";
|
||||
import { ComfyWidgets, LGraphNode } from "./widgets.js";
|
||||
import { app } from "../../scripts/app.js";
|
||||
import { api } from "../../scripts/api.js";
|
||||
// import { LGraphNode } from "../../scripts/widgets.js";
|
||||
LGraphNode = LiteGraph.LGraphNode;
|
||||
import { ComfyDialog, $el } from "../../scripts/ui.js";
|
||||
|
||||
import { generateDependencyGraph } from "https://esm.sh/comfyui-json@0.1.25";
|
||||
import { ComfyDeploy } from "https://esm.sh/comfydeploy@0.0.19-beta.30";
|
||||
import { ComfyDeploy } from "https://esm.sh/comfydeploy@2.0.0-beta.69";
|
||||
|
||||
const styles = `
|
||||
.comfydeploy-menu-item {
|
||||
background: linear-gradient(to right, rgba(74, 144, 226, 0.9), rgba(103, 178, 111, 0.9)) !important;
|
||||
color: white !important;
|
||||
position: relative !important;
|
||||
padding-left: 20px !important;
|
||||
}
|
||||
|
||||
.comfydeploy-menu-item:hover {
|
||||
filter: brightness(1.1) !important;
|
||||
cursor: pointer !important;
|
||||
}
|
||||
|
||||
.comfydeploy-menu-item::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 4px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
background-image: url('https://www.comfydeploy.com/icon.svg');
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
}
|
||||
`;
|
||||
|
||||
// Add stylesheet to document
|
||||
const styleSheet = document.createElement("style");
|
||||
styleSheet.textContent = styles;
|
||||
document.head.appendChild(styleSheet);
|
||||
|
||||
const loadingIcon = `<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><g fill="none" stroke="#888888" stroke-linecap="round" stroke-width="2"><path stroke-dasharray="60" stroke-dashoffset="60" stroke-opacity=".3" d="M12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3Z"><animate fill="freeze" attributeName="stroke-dashoffset" dur="1.3s" values="60;0"/></path><path stroke-dasharray="15" stroke-dashoffset="15" d="M12 3C16.9706 3 21 7.02944 21 12"><animate fill="freeze" attributeName="stroke-dashoffset" dur="0.3s" values="15;0"/><animateTransform attributeName="transform" dur="1.5s" repeatCount="indefinite" type="rotate" values="0 12 12;360 12 12"/></path></g></svg>`;
|
||||
|
||||
@@ -14,6 +50,14 @@ function sendEventToCD(event, data) {
|
||||
window.parent.postMessage(JSON.stringify(message), "*");
|
||||
}
|
||||
|
||||
function sendDirectEventToCD(event, data) {
|
||||
const message = {
|
||||
type: event,
|
||||
data: data,
|
||||
};
|
||||
window.parent.postMessage(message, "*");
|
||||
}
|
||||
|
||||
function dispatchAPIEventData(data) {
|
||||
const msg = JSON.parse(data);
|
||||
|
||||
@@ -122,6 +166,146 @@ function setSelectedWorkflowInfo(info) {
|
||||
context.selectedWorkflowInfo = info;
|
||||
}
|
||||
|
||||
const VALID_TYPES = [
|
||||
"STRING",
|
||||
"combo",
|
||||
"number",
|
||||
"toggle",
|
||||
"BOOLEAN",
|
||||
"text",
|
||||
"string",
|
||||
];
|
||||
|
||||
function hideWidget(node, widget, suffix = "") {
|
||||
if (widget.type?.startsWith(CONVERTED_TYPE)) return;
|
||||
widget.origType = widget.type;
|
||||
widget.origComputeSize = widget.computeSize;
|
||||
widget.origSerializeValue = widget.serializeValue;
|
||||
widget.computeSize = () => [0, -4];
|
||||
widget.type = CONVERTED_TYPE + suffix;
|
||||
widget.serializeValue = () => {
|
||||
if (!node.inputs) {
|
||||
return void 0;
|
||||
}
|
||||
let node_input = node.inputs.find((i) => i.widget?.name === widget.name);
|
||||
if (!node_input || !node_input.link) {
|
||||
return void 0;
|
||||
}
|
||||
return widget.origSerializeValue
|
||||
? widget.origSerializeValue()
|
||||
: widget.value;
|
||||
};
|
||||
if (widget.linkedWidgets) {
|
||||
for (const w of widget.linkedWidgets) {
|
||||
hideWidget(node, w, ":" + widget.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getWidgetType(config) {
|
||||
let type = config[0];
|
||||
if (type instanceof Array) {
|
||||
type = "COMBO";
|
||||
}
|
||||
return { type };
|
||||
}
|
||||
|
||||
const GET_CONFIG = Symbol();
|
||||
|
||||
function convertToInput(node, widget, config) {
|
||||
console.log(node);
|
||||
if (node.type == "LoadImage") {
|
||||
var inputNode = LiteGraph.createNode("ComfyUIDeployExternalImage");
|
||||
console.log(widget);
|
||||
|
||||
const currentOutputsLinks = node.outputs[0].links;
|
||||
|
||||
// const index = node.inputs.findIndex((x) => x.name == widget.name);
|
||||
// console.log(node.widgets_values, index);
|
||||
// inputNode.configure({
|
||||
// widgets_values: ["input_text", widget.value],
|
||||
// });
|
||||
inputNode.pos = node.pos;
|
||||
inputNode.id = ++app.graph.last_node_id;
|
||||
// inputNode.pos[0] += node.size[0] + 40;
|
||||
node.pos[0] -= inputNode.size[0] + 20;
|
||||
console.log(inputNode);
|
||||
console.log(app.graph);
|
||||
app.graph.add(inputNode);
|
||||
|
||||
const links = app.graph.links;
|
||||
|
||||
console.log(currentOutputsLinks);
|
||||
|
||||
for (let i = 0; i < currentOutputsLinks.length; i++) {
|
||||
const link = currentOutputsLinks[i];
|
||||
const llink = links[link];
|
||||
console.log(links[link]);
|
||||
setTimeout(
|
||||
() => inputNode.connect(0, llink.target_id, llink.target_slot),
|
||||
100,
|
||||
);
|
||||
}
|
||||
|
||||
node.connect(0, inputNode, 0);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
hideWidget(node, widget);
|
||||
const { type } = getWidgetType(config);
|
||||
const sz = node.size;
|
||||
const inputIsOptional = !!widget.options?.inputIsOptional;
|
||||
const input = node.addInput(widget.name, type, {
|
||||
widget: { name: widget.name, [GET_CONFIG]: () => config },
|
||||
...(inputIsOptional ? { shape: LiteGraph.SlotShape.HollowCircle } : {}),
|
||||
});
|
||||
for (const widget2 of node.widgets) {
|
||||
widget2.last_y += LiteGraph.NODE_SLOT_HEIGHT;
|
||||
}
|
||||
node.setSize([Math.max(sz[0], node.size[0]), Math.max(sz[1], node.size[1])]);
|
||||
|
||||
if (type == "STRING") {
|
||||
var inputNode = LiteGraph.createNode("ComfyUIDeployExternalText");
|
||||
console.log(widget);
|
||||
const index = node.inputs.findIndex((x) => x.name == widget.name);
|
||||
console.log(node.widgets_values, index);
|
||||
inputNode.configure({
|
||||
widgets_values: ["input_text", widget.value],
|
||||
});
|
||||
inputNode.id = ++app.graph.last_node_id;
|
||||
inputNode.pos = node.pos;
|
||||
inputNode.pos[0] -= node.size[0] + 40;
|
||||
console.log(inputNode);
|
||||
console.log(app.graph);
|
||||
app.graph.add(inputNode);
|
||||
inputNode.connect(0, node, index);
|
||||
}
|
||||
|
||||
return input;
|
||||
}
|
||||
|
||||
const CONVERTED_TYPE = "converted-widget";
|
||||
|
||||
function getConfig(widgetName) {
|
||||
const { nodeData } = this.constructor;
|
||||
return (
|
||||
nodeData?.input?.required?.[widgetName] ??
|
||||
nodeData?.input?.optional?.[widgetName]
|
||||
);
|
||||
}
|
||||
|
||||
function isConvertibleWidget(widget, config) {
|
||||
return (
|
||||
(VALID_TYPES.includes(widget.type) || VALID_TYPES.includes(config[0])) &&
|
||||
!widget.options?.forceInput
|
||||
);
|
||||
}
|
||||
|
||||
var __defProp = Object.defineProperty;
|
||||
var __name = (target, value) =>
|
||||
__defProp(target, "name", { value, configurable: true });
|
||||
|
||||
/** @typedef {import('../../../web/types/comfy.js').ComfyExtension} ComfyExtension*/
|
||||
/** @type {ComfyExtension} */
|
||||
const ext = {
|
||||
@@ -232,6 +416,125 @@ const ext = {
|
||||
}
|
||||
},
|
||||
|
||||
async beforeRegisterNodeDef(nodeType, nodeData, app2) {
|
||||
const origGetExtraMenuOptions = nodeType.prototype.getExtraMenuOptions;
|
||||
nodeType.prototype.getExtraMenuOptions = function (_, options) {
|
||||
const r = origGetExtraMenuOptions
|
||||
? origGetExtraMenuOptions.apply(this, arguments)
|
||||
: void 0;
|
||||
if (this.widgets) {
|
||||
let toInput = [];
|
||||
let toWidget = [];
|
||||
for (const w of this.widgets) {
|
||||
if (w.options?.forceInput) {
|
||||
continue;
|
||||
}
|
||||
if (w.type === CONVERTED_TYPE) {
|
||||
toWidget.push({
|
||||
content: `Convert ${w.name} to widget`,
|
||||
callback: /* @__PURE__ */ __name(
|
||||
() => convertToWidget(this, w),
|
||||
"callback",
|
||||
),
|
||||
});
|
||||
} else {
|
||||
const config = getConfig.call(this, w.name) ?? [
|
||||
w.type,
|
||||
w.options || {},
|
||||
];
|
||||
if (isConvertibleWidget(w, config)) {
|
||||
toInput.push({
|
||||
content: `Convert ${w.name} to external input`,
|
||||
callback: /* @__PURE__ */ __name(
|
||||
() => convertToInput(this, w, config),
|
||||
"callback",
|
||||
),
|
||||
className: "comfydeploy-menu-item",
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
if (toInput.length) {
|
||||
if (true) {
|
||||
options.push();
|
||||
|
||||
let optionIndex = options.findIndex((o) => o.content === "Outputs");
|
||||
if (optionIndex === -1) optionIndex = options.length;
|
||||
else optionIndex++;
|
||||
options.splice(
|
||||
0,
|
||||
0,
|
||||
// {
|
||||
// content: "[ComfyDeploy] Convert to External Input",
|
||||
// submenu: {
|
||||
// options: toInput,
|
||||
// },
|
||||
// className: "comfydeploy-menu-item"
|
||||
// },
|
||||
...toInput,
|
||||
null,
|
||||
);
|
||||
} else {
|
||||
options.push(...toInput, null);
|
||||
}
|
||||
}
|
||||
// if (toWidget.length) {
|
||||
// if (useConversionSubmenusSetting.value) {
|
||||
// options.push({
|
||||
// content: "Convert Input to Widget",
|
||||
// submenu: {
|
||||
// options: toWidget,
|
||||
// },
|
||||
// });
|
||||
// } else {
|
||||
// options.push(...toWidget, null);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
return r;
|
||||
};
|
||||
|
||||
if (
|
||||
nodeData?.input?.optional?.default_value_url?.[1]?.image_preview === true
|
||||
) {
|
||||
nodeData.input.optional.default_value_url = ["IMAGEPREVIEW"];
|
||||
console.log(nodeData.input.optional.default_value_url);
|
||||
}
|
||||
|
||||
// const origonNodeCreated = nodeType.prototype.onNodeCreated;
|
||||
// nodeType.prototype.onNodeCreated = function () {
|
||||
// const r = origonNodeCreated
|
||||
// ? origonNodeCreated.apply(this, arguments)
|
||||
// : void 0;
|
||||
|
||||
// if (!this.widgets) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// console.log(this.widgets);
|
||||
|
||||
// this.widgets.forEach(element => {
|
||||
// if (element.type != "customtext") return
|
||||
|
||||
// console.log(element.element);
|
||||
|
||||
// const parent = element.element.parentElement
|
||||
|
||||
// console.log(element.element.parentElement)
|
||||
// const btn = document.createElement("button");
|
||||
// // const div = document.createElement("div");
|
||||
// // parent.removeChild(element.element)
|
||||
// // div.appendChild(element.element)
|
||||
// // parent.appendChild(div)
|
||||
// // element.element = div
|
||||
// // console.log(element.element);
|
||||
// // btn.style = element.element.style
|
||||
// });
|
||||
|
||||
// return r
|
||||
// };
|
||||
},
|
||||
|
||||
registerCustomNodes() {
|
||||
/** @type {LGraphNode}*/
|
||||
class ComfyDeploy extends LGraphNode {
|
||||
@@ -324,6 +627,78 @@ const ext = {
|
||||
ComfyDeploy.category = "deploy";
|
||||
},
|
||||
|
||||
getCustomWidgets() {
|
||||
return {
|
||||
IMAGEPREVIEW(node, inputName, inputData) {
|
||||
// Find or create the URL input widget
|
||||
const urlWidget = node.addWidget(
|
||||
"string",
|
||||
inputName,
|
||||
/* value=*/ "",
|
||||
() => { },
|
||||
{ serialize: true },
|
||||
);
|
||||
|
||||
const buttonWidget = node.addWidget(
|
||||
"button",
|
||||
"Open Assets Browser",
|
||||
/* value=*/ "",
|
||||
() => {
|
||||
sendEventToCD("assets", {
|
||||
node: node.id,
|
||||
inputName: inputName,
|
||||
});
|
||||
// console.log("load image");
|
||||
},
|
||||
{ serialize: false },
|
||||
);
|
||||
|
||||
console.log(node.widgets);
|
||||
|
||||
console.log("urlWidget", urlWidget);
|
||||
|
||||
// Add image preview functionality
|
||||
function showImage(url) {
|
||||
const img = new Image();
|
||||
img.onload = () => {
|
||||
node.imgs = [img];
|
||||
app.graph.setDirtyCanvas(true);
|
||||
node.setSizeForImage?.();
|
||||
};
|
||||
img.onerror = () => {
|
||||
node.imgs = [];
|
||||
app.graph.setDirtyCanvas(true);
|
||||
};
|
||||
img.src = url;
|
||||
}
|
||||
|
||||
// Set up URL widget value handling
|
||||
let default_value = urlWidget.value;
|
||||
Object.defineProperty(urlWidget, "value", {
|
||||
set: function (value) {
|
||||
this._real_value = value;
|
||||
// Preview image when URL changes
|
||||
if (value) {
|
||||
showImage(value);
|
||||
}
|
||||
},
|
||||
get: function () {
|
||||
return this._real_value || default_value;
|
||||
},
|
||||
});
|
||||
|
||||
// Show initial image if URL exists
|
||||
requestAnimationFrame(() => {
|
||||
if (urlWidget.value) {
|
||||
showImage(urlWidget.value);
|
||||
}
|
||||
});
|
||||
|
||||
return { widget: urlWidget };
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
async setup() {
|
||||
// const graphCanvas = document.getElementById("graph-canvas");
|
||||
|
||||
@@ -341,7 +716,7 @@ const ext = {
|
||||
try {
|
||||
await window["app"].ui.settings.setSettingValueAsync(
|
||||
"Comfy.Validation.Workflows",
|
||||
false,
|
||||
true,
|
||||
);
|
||||
} catch (error) {
|
||||
console.warning(
|
||||
@@ -351,6 +726,7 @@ const ext = {
|
||||
}
|
||||
console.log("loadGraphData");
|
||||
app.loadGraphData(comfyUIWorkflow);
|
||||
sendEventToCD("graph_loaded");
|
||||
}
|
||||
} else if (message.type === "deploy") {
|
||||
// deployWorkflow();
|
||||
@@ -365,11 +741,35 @@ const ext = {
|
||||
console.warn("api.handlePromptGenerated is not a function");
|
||||
}
|
||||
sendEventToCD("cd_plugin_onQueuePrompt", prompt);
|
||||
} else if (message.type === "configure_queue_buttons") {
|
||||
addQueueButtons(message.data);
|
||||
} else if (message.type === "configure_menu_right_buttons") {
|
||||
addMenuRightButtons(message.data);
|
||||
} else if (message.type === "configure_menu_buttons") {
|
||||
addMenuButtons(message.data);
|
||||
} else if (message.type === "get_prompt") {
|
||||
const prompt = await app.graphToPrompt();
|
||||
sendEventToCD("cd_plugin_onGetPrompt", prompt);
|
||||
} else if (message.type === "event") {
|
||||
dispatchAPIEventData(message.data);
|
||||
} else if (message.type === "update_widget") {
|
||||
// New handler for updating widget values
|
||||
const { nodeId, widgetName, value } = message.data;
|
||||
const node = app.graph.getNodeById(nodeId);
|
||||
|
||||
if (!node) {
|
||||
console.warn(`Node with ID ${nodeId} not found`);
|
||||
return;
|
||||
}
|
||||
|
||||
const widget = node.widgets?.find((w) => w.name === widgetName);
|
||||
if (!widget) {
|
||||
console.warn(`Widget ${widgetName} not found in node ${nodeId}`);
|
||||
return;
|
||||
}
|
||||
|
||||
widget.value = value;
|
||||
app.graph.setDirtyCanvas(true);
|
||||
} else if (message.type === "add_node") {
|
||||
console.log("add node", message.data);
|
||||
app.graph.beforeChange();
|
||||
@@ -463,13 +863,13 @@ const ext = {
|
||||
await app.ui.settings.setSettingValueAsync("Comfy.UseNewMenu", "Top");
|
||||
await app.ui.settings.setSettingValueAsync(
|
||||
"Comfy.Sidebar.Size",
|
||||
"small"
|
||||
"small",
|
||||
);
|
||||
await app.ui.settings.setSettingValueAsync(
|
||||
"Comfy.Sidebar.Location",
|
||||
"right"
|
||||
"left",
|
||||
);
|
||||
localStorage.setItem("Comfy.MenuPosition.Docked", "true");
|
||||
// localStorage.setItem("Comfy.MenuPosition.Docked", "true");
|
||||
console.log("native mode manmanman");
|
||||
} catch (error) {
|
||||
console.error("Error setting validation to false", error);
|
||||
@@ -520,10 +920,10 @@ function createDynamicUIHtml(data) {
|
||||
<h3 style="font-size: 14px; font-weight: semibold; margin-bottom: 8px;">Missing Nodes</h3>
|
||||
<p style="font-size: 12px;">These nodes are not found with any matching custom_nodes in the ComfyUI Manager Database</p>
|
||||
${data.missing_nodes
|
||||
.map((node) => {
|
||||
return `<p style="font-size: 14px; color: #d69e2e;">${node}</p>`;
|
||||
})
|
||||
.join("")}
|
||||
.map((node) => {
|
||||
return `<p style="font-size: 14px; color: #d69e2e;">${node}</p>`;
|
||||
})
|
||||
.join("")}
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
@@ -531,17 +931,14 @@ function createDynamicUIHtml(data) {
|
||||
Object.values(data.custom_nodes).forEach((node) => {
|
||||
html += `
|
||||
<div style="border-bottom: 1px solid #e2e8f0; padding-top: 16px;">
|
||||
<a href="${
|
||||
node.url
|
||||
}" target="_blank" style="font-size: 18px; font-weight: semibold; color: white; text-decoration: none;">${
|
||||
node.name
|
||||
}</a>
|
||||
<a href="${node.url
|
||||
}" target="_blank" style="font-size: 18px; font-weight: semibold; color: white; text-decoration: none;">${node.name
|
||||
}</a>
|
||||
<p style="font-size: 14px; color: #4b5563;">${node.hash}</p>
|
||||
${
|
||||
node.warning
|
||||
? `<p style="font-size: 14px; color: #d69e2e;">${node.warning}</p>`
|
||||
: ""
|
||||
}
|
||||
${node.warning
|
||||
? `<p style="font-size: 14px; color: #d69e2e;">${node.warning}</p>`
|
||||
: ""
|
||||
}
|
||||
</div>
|
||||
`;
|
||||
});
|
||||
@@ -555,9 +952,8 @@ function createDynamicUIHtml(data) {
|
||||
Object.entries(data.models).forEach(([section, items]) => {
|
||||
html += `
|
||||
<div style="border-bottom: 1px solid #e2e8f0; padding-top: 8px; padding-bottom: 8px;">
|
||||
<h3 style="font-size: 18px; font-weight: semibold; margin-bottom: 8px;">${
|
||||
section.charAt(0).toUpperCase() + section.slice(1)
|
||||
}</h3>`;
|
||||
<h3 style="font-size: 18px; font-weight: semibold; margin-bottom: 8px;">${section.charAt(0).toUpperCase() + section.slice(1)
|
||||
}</h3>`;
|
||||
items.forEach((item) => {
|
||||
html += `<p style="font-size: 14px; color: ${textColor};">${item.name}</p>`;
|
||||
});
|
||||
@@ -573,9 +969,8 @@ function createDynamicUIHtml(data) {
|
||||
Object.entries(data.files).forEach(([section, items]) => {
|
||||
html += `
|
||||
<div style="border-bottom: 1px solid #e2e8f0; padding-top: 8px; padding-bottom: 8px;">
|
||||
<h3 style="font-size: 18px; font-weight: semibold; margin-bottom: 8px;">${
|
||||
section.charAt(0).toUpperCase() + section.slice(1)
|
||||
}</h3>`;
|
||||
<h3 style="font-size: 18px; font-weight: semibold; margin-bottom: 8px;">${section.charAt(0).toUpperCase() + section.slice(1)
|
||||
}</h3>`;
|
||||
items.forEach((item) => {
|
||||
html += `<p style="font-size: 14px; color: ${textColor};">${item.name}</p>`;
|
||||
});
|
||||
@@ -1002,8 +1397,6 @@ function addButton() {
|
||||
|
||||
app.registerExtension(ext);
|
||||
|
||||
import { ComfyDialog, $el } from "../../scripts/ui.js";
|
||||
|
||||
export class InfoDialog extends ComfyDialog {
|
||||
constructor() {
|
||||
super();
|
||||
@@ -1095,14 +1488,12 @@ export class LoadingDialog extends ComfyDialog {
|
||||
showLoading(title, message) {
|
||||
this.show(`
|
||||
<div style="width: 400px; display: flex; gap: 18px; flex-direction: column; overflow: unset">
|
||||
<h3 style="margin: 0px; display: flex; align-items: center; justify-content: center; gap: 12px;">${title} ${
|
||||
this.loadingIcon
|
||||
}</h3>
|
||||
${
|
||||
message
|
||||
? `<label style="max-width: 100%; white-space: pre-wrap; word-wrap: break-word;">${message}</label>`
|
||||
: ""
|
||||
}
|
||||
<h3 style="margin: 0px; display: flex; align-items: center; justify-content: center; gap: 12px;">${title} ${this.loadingIcon
|
||||
}</h3>
|
||||
${message
|
||||
? `<label style="max-width: 100%; white-space: pre-wrap; word-wrap: break-word;">${message}</label>`
|
||||
: ""
|
||||
}
|
||||
</div>
|
||||
`);
|
||||
}
|
||||
@@ -1368,21 +1759,17 @@ export class ConfigDialog extends ComfyDialog {
|
||||
</label>
|
||||
<label style="color: white; width: 100%;">
|
||||
Endpoint:
|
||||
<input id="endpoint" style="margin-top: 8px; width: 100%; height:40px; box-sizing: border-box; padding: 0px 6px;" type="text" value="${
|
||||
data.endpoint
|
||||
}">
|
||||
<input id="endpoint" style="margin-top: 8px; width: 100%; height:40px; box-sizing: border-box; padding: 0px 6px;" type="text" value="${data.endpoint
|
||||
}">
|
||||
</label>
|
||||
<div style="color: white;">
|
||||
API Key: User / Org <button style="font-size: 18px;">${
|
||||
data.displayName ?? ""
|
||||
}</button>
|
||||
<input id="apiKey" style="margin-top: 8px; width: 100%; height:40px; box-sizing: border-box; padding: 0px 6px;" type="password" value="${
|
||||
data.apiKey
|
||||
}">
|
||||
API Key: User / Org <button style="font-size: 18px;">${data.displayName ?? ""
|
||||
}</button>
|
||||
<input id="apiKey" style="margin-top: 8px; width: 100%; height:40px; box-sizing: border-box; padding: 0px 6px;" type="password" value="${data.apiKey
|
||||
}">
|
||||
<button id="loginButton" style="margin-top: 8px; width: 100%; height:40px; box-sizing: border-box; padding: 0px 6px;">
|
||||
${
|
||||
data.apiKey ? "Re-login with ComfyDeploy" : "Login with ComfyDeploy"
|
||||
}
|
||||
${data.apiKey ? "Re-login with ComfyDeploy" : "Login with ComfyDeploy"
|
||||
}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1474,7 +1861,7 @@ app.extensionManager.registerSidebarTab({
|
||||
<div style="padding: 20px;">
|
||||
<h3>Comfy Deploy</h3>
|
||||
<div id="deploy-container" style="margin-bottom: 20px;"></div>
|
||||
<div id="workflows-container">
|
||||
<div id="workflows-container" style="display: none;">
|
||||
<h4>Your Workflows</h4>
|
||||
<div id="workflows-loading" style="display: flex; justify-content: center; align-items: center; height: 100px;">
|
||||
${loadingIcon}
|
||||
@@ -1562,7 +1949,7 @@ async function loadWorkflowApi(versionId) {
|
||||
console.log("Workflow API loaded:", response);
|
||||
await window["app"].ui.settings.setSettingValueAsync(
|
||||
"Comfy.Validation.Workflows",
|
||||
false,
|
||||
true,
|
||||
);
|
||||
app.loadGraphData(response.workflow);
|
||||
// You might want to update the UI or trigger some action in ComfyUI here
|
||||
@@ -1574,10 +1961,16 @@ async function loadWorkflowApi(versionId) {
|
||||
|
||||
const orginal_fetch_api = api.fetchApi;
|
||||
api.fetchApi = async (route, options) => {
|
||||
console.log("Fetch API called with args:", route, options, ext.native_mode);
|
||||
// console.log("Fetch API called with args:", route, options, ext.native_mode);
|
||||
|
||||
if (route.startsWith("/prompt") && ext.native_mode) {
|
||||
const info = await getSelectedWorkflowInfo();
|
||||
|
||||
if (!info.workflow_id) {
|
||||
console.log("No workflow id found, fallback to original fetch");
|
||||
return await orginal_fetch_api.call(api, route, options);
|
||||
}
|
||||
|
||||
console.log("info", info);
|
||||
if (info) {
|
||||
const body = JSON.parse(options.body);
|
||||
@@ -1591,6 +1984,7 @@ api.fetchApi = async (route, options) => {
|
||||
workflow_id: info.workflow_id,
|
||||
native_run_api_endpoint: info.native_run_api_endpoint,
|
||||
gpu_event_id: info.gpu_event_id,
|
||||
gpu: info.gpu,
|
||||
};
|
||||
|
||||
return await fetch("/comfyui-deploy/run", {
|
||||
@@ -1606,3 +2000,306 @@ api.fetchApi = async (route, options) => {
|
||||
|
||||
return await orginal_fetch_api.call(api, route, options);
|
||||
};
|
||||
|
||||
// Intercept window drag and drop events
|
||||
const originalDropHandler = document.ondrop;
|
||||
document.ondrop = async (e) => {
|
||||
console.log("Drop event intercepted:", e);
|
||||
|
||||
// Prevent default browser behavior
|
||||
e.preventDefault();
|
||||
|
||||
// Handle files if present
|
||||
if (e.dataTransfer?.files?.length > 0) {
|
||||
const files = Array.from(e.dataTransfer.files);
|
||||
|
||||
// Send file data to parent directly as JSON
|
||||
sendDirectEventToCD("file_drop", {
|
||||
files: files,
|
||||
x: e.clientX,
|
||||
y: e.clientY,
|
||||
timestamp: Date.now(),
|
||||
});
|
||||
}
|
||||
|
||||
// Call original handler if exists
|
||||
if (originalDropHandler) {
|
||||
originalDropHandler(e);
|
||||
}
|
||||
};
|
||||
|
||||
const originalDragEnterHandler = document.ondragenter;
|
||||
document.ondragenter = (e) => {
|
||||
// Prevent default to allow drop
|
||||
e.preventDefault();
|
||||
|
||||
// Send dragenter event to parent directly as JSON
|
||||
sendDirectEventToCD("file_dragenter", {
|
||||
x: e.clientX,
|
||||
y: e.clientY,
|
||||
timestamp: Date.now(),
|
||||
});
|
||||
|
||||
if (originalDragEnterHandler) {
|
||||
originalDragEnterHandler(e);
|
||||
}
|
||||
};
|
||||
|
||||
const originalDragLeaveHandler = document.ondragleave;
|
||||
document.ondragleave = (e) => {
|
||||
// Prevent default to allow drop
|
||||
e.preventDefault();
|
||||
|
||||
// Send dragleave event to parent directly as JSON
|
||||
sendDirectEventToCD("file_dragleave", {
|
||||
x: e.clientX,
|
||||
y: e.clientY,
|
||||
timestamp: Date.now(),
|
||||
});
|
||||
|
||||
if (originalDragLeaveHandler) {
|
||||
originalDragLeaveHandler(e);
|
||||
}
|
||||
};
|
||||
|
||||
const originalDragOverHandler = document.ondragover;
|
||||
document.ondragover = (e) => {
|
||||
// Prevent default to allow drop
|
||||
e.preventDefault();
|
||||
|
||||
// Send dragover event to parent directly as JSON
|
||||
sendDirectEventToCD("file_dragover", {
|
||||
x: e.clientX,
|
||||
y: e.clientY,
|
||||
timestamp: Date.now(),
|
||||
});
|
||||
|
||||
if (originalDragOverHandler) {
|
||||
originalDragOverHandler(e);
|
||||
}
|
||||
};
|
||||
|
||||
// Function to create a single button
|
||||
function createQueueButton(config) {
|
||||
const button = document.createElement("button");
|
||||
button.id = `cd-button-${config.id}`;
|
||||
button.className =
|
||||
"p-button p-component p-button-icon-only p-button-secondary p-button-text";
|
||||
button.innerHTML = `
|
||||
<span class="p-button-icon pi ${config.icon}"></span>
|
||||
<span class="p-button-label"> </span>
|
||||
`;
|
||||
button.onclick = () => {
|
||||
const eventData =
|
||||
typeof config.eventData === "function"
|
||||
? config.eventData()
|
||||
: config.eventData || {};
|
||||
sendEventToCD(config.event, eventData);
|
||||
};
|
||||
button.setAttribute("data-pd-tooltip", config.tooltip);
|
||||
return button;
|
||||
}
|
||||
|
||||
// Function to add buttons to queue group
|
||||
function addQueueButtons(buttonConfigs = DEFAULT_BUTTONS) {
|
||||
const queueButtonGroup = document.querySelector(".queue-button-group.flex");
|
||||
if (!queueButtonGroup) return;
|
||||
|
||||
// Remove any existing CD buttons
|
||||
const existingButtons =
|
||||
queueButtonGroup.querySelectorAll('[id^="cd-button-"]');
|
||||
existingButtons.forEach((button) => button.remove());
|
||||
|
||||
// Add new buttons
|
||||
buttonConfigs.forEach((config) => {
|
||||
const button = createQueueButton(config);
|
||||
queueButtonGroup.appendChild(button);
|
||||
});
|
||||
}
|
||||
|
||||
// addMenuRightButtons([
|
||||
// {
|
||||
// id: "cd-button-save-image",
|
||||
// icon: "pi-save",
|
||||
// label: "Snapshot",
|
||||
// tooltip: "Save the current image to your output directory.",
|
||||
// event: "save_image",
|
||||
// eventData: () => ({}),
|
||||
// },
|
||||
// ]);
|
||||
|
||||
// addMenuLeftButtons([
|
||||
// {
|
||||
// id: "cd-button-back",
|
||||
// icon: `<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
// <path d="M15 18L9 12L15 6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
// </svg>`,
|
||||
// tooltip: "Go back to the previous page.",
|
||||
// event: "back",
|
||||
// eventData: () => ({}),
|
||||
// },
|
||||
// ]);
|
||||
|
||||
// addMenuButtons({
|
||||
// containerSelector: "body > div.comfyui-body-top > div",
|
||||
// buttonConfigs: [
|
||||
// {
|
||||
// id: "cd-button-workflow-1",
|
||||
// icon: `<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m16 3l4 4l-4 4m-6-4h10M8 13l-4 4l4 4m-4-4h9"/></svg>`,
|
||||
// label: "Workflow",
|
||||
// tooltip: "Go to Workflow 1",
|
||||
// event: "workflow_1",
|
||||
// // btnClasses: "",
|
||||
// eventData: () => ({}),
|
||||
// },
|
||||
// {
|
||||
// id: "cd-button-workflow-3",
|
||||
// // icon: `<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m16 3l4 4l-4 4m-6-4h10M8 13l-4 4l4 4m-4-4h9"/></svg>`,
|
||||
// label: "v1",
|
||||
// tooltip: "Go to Workflow 1",
|
||||
// event: "workflow_1",
|
||||
// // btnClasses: "",
|
||||
// eventData: () => ({}),
|
||||
// },
|
||||
// {
|
||||
// id: "cd-button-workflow-2",
|
||||
// icon: `<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M12 3v6"/><circle cx="12" cy="12" r="3"/><path d="M12 15v6"/></g></svg>`,
|
||||
// label: "Commit",
|
||||
// tooltip: "Commit the current workflow",
|
||||
// event: "commit",
|
||||
// style: {
|
||||
// backgroundColor: "oklch(.476 .114 61.907)",
|
||||
// },
|
||||
// eventData: () => ({}),
|
||||
// },
|
||||
// ],
|
||||
// buttonIdPrefix: "cd-button-workflow-",
|
||||
// insertBefore:
|
||||
// "body > div.comfyui-body-top > div > div.flex-grow.min-w-0.app-drag.h-full",
|
||||
// // containerStyle: { order: "3" }
|
||||
// });
|
||||
|
||||
// addMenuButtons({
|
||||
// containerSelector:
|
||||
// "body > div.comfyui-body-top > div > div.flex-grow.min-w-0.app-drag.h-full",
|
||||
// clearContainer: true,
|
||||
// buttonConfigs: [],
|
||||
// buttonIdPrefix: "cd-button-p-",
|
||||
// containerStyle: { order: "-1" },
|
||||
// });
|
||||
|
||||
// Function to add buttons to a menu container
|
||||
function addMenuButtons(options) {
|
||||
const {
|
||||
containerSelector,
|
||||
buttonConfigs,
|
||||
buttonIdPrefix = "cd-button-",
|
||||
containerClass = "comfyui-button-group",
|
||||
containerStyle = {},
|
||||
clearContainer = false,
|
||||
insertBefore = null, // New option to specify selector for insertion point
|
||||
} = options;
|
||||
|
||||
const menuContainer = document.querySelector(containerSelector);
|
||||
|
||||
if (!menuContainer) return;
|
||||
|
||||
// Remove any existing CD buttons
|
||||
const existingButtons = document.querySelectorAll(
|
||||
`[id^="${buttonIdPrefix}"]`,
|
||||
);
|
||||
existingButtons.forEach((button) => button.remove());
|
||||
|
||||
const container = document.createElement("div");
|
||||
container.className = containerClass;
|
||||
|
||||
// Apply container styles
|
||||
Object.assign(container.style, containerStyle);
|
||||
|
||||
// Clear existing content if specified
|
||||
if (clearContainer) {
|
||||
menuContainer.innerHTML = "";
|
||||
}
|
||||
|
||||
// Create and add buttons
|
||||
buttonConfigs.forEach((config) => {
|
||||
const button = createMenuButton({
|
||||
...config,
|
||||
idPrefix: buttonIdPrefix,
|
||||
});
|
||||
container.appendChild(button);
|
||||
});
|
||||
|
||||
// Insert before specified element if provided, otherwise append
|
||||
if (insertBefore) {
|
||||
const targetElement = menuContainer.querySelector(insertBefore);
|
||||
if (targetElement) {
|
||||
menuContainer.insertBefore(container, targetElement);
|
||||
} else {
|
||||
menuContainer.appendChild(container);
|
||||
}
|
||||
} else {
|
||||
menuContainer.appendChild(container);
|
||||
}
|
||||
}
|
||||
|
||||
function createMenuButton(config) {
|
||||
const {
|
||||
id,
|
||||
icon,
|
||||
label,
|
||||
btnClasses = "",
|
||||
tooltip,
|
||||
event,
|
||||
eventData,
|
||||
idPrefix,
|
||||
style = {},
|
||||
} = config;
|
||||
|
||||
const button = document.createElement("button");
|
||||
button.id = `${idPrefix}${id}`;
|
||||
button.className = `comfyui-button ${btnClasses}`;
|
||||
Object.assign(button.style, style);
|
||||
|
||||
// Only add icon if provided
|
||||
const iconHtml = icon
|
||||
? icon.startsWith("<svg")
|
||||
? icon
|
||||
: `<span class="p-button-icon pi ${icon}"></span>`
|
||||
: "";
|
||||
|
||||
button.innerHTML = `
|
||||
${iconHtml}
|
||||
${label ? `<span class="p-button-label text-sm">${label}</span>` : ""}
|
||||
`;
|
||||
|
||||
button.onclick = () => {
|
||||
const data =
|
||||
typeof eventData === "function" ? eventData() : eventData || {};
|
||||
sendEventToCD(event, data);
|
||||
};
|
||||
|
||||
if (tooltip) {
|
||||
button.setAttribute("data-pd-tooltip", tooltip);
|
||||
}
|
||||
return button;
|
||||
}
|
||||
|
||||
// Refactored menu button functions
|
||||
function addMenuLeftButtons(buttonConfigs) {
|
||||
addMenuButtons({
|
||||
containerSelector: "body > div.comfyui-body-top > div",
|
||||
buttonConfigs,
|
||||
buttonIdPrefix: "cd-button-left-",
|
||||
containerStyle: { order: "-1" },
|
||||
});
|
||||
}
|
||||
|
||||
function addMenuRightButtons(buttonConfigs) {
|
||||
addMenuButtons({
|
||||
containerSelector: ".comfyui-menu-right .flex",
|
||||
buttonConfigs,
|
||||
buttonIdPrefix: "cd-button-",
|
||||
containerStyle: {},
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
// /** @typedef {import('../../../web/scripts/api.js').api} API*/
|
||||
// import { api as _api } from "../../scripts/api.js";
|
||||
// /** @type {API} */
|
||||
// export const api = _api;
|
||||
|
||||
/** @typedef {typeof import('../../../web/scripts/widgets.js').ComfyWidgets} Widgets*/
|
||||
import { ComfyWidgets as _ComfyWidgets } from "../../scripts/widgets.js";
|
||||
|
||||
/**
|
||||
* @type {Widgets}
|
||||
*/
|
||||
export const ComfyWidgets = _ComfyWidgets;
|
||||
|
||||
// import { LGraphNode as _LGraphNode } from "../../types/litegraph.js";
|
||||
|
||||
/** @typedef {typeof import('../../../web/types/litegraph.js').LGraphNode} LGraphNode*/
|
||||
/** @type {LGraphNode}*/
|
||||
export const LGraphNode = LiteGraph.LGraphNode;
|
||||
Reference in New Issue
Block a user