Initial clean commit

This commit is contained in:
Satadal Dhara
2025-08-31 19:31:38 +05:30
commit 2dfcdff463
19 changed files with 567 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
__pycache__/
nodes/__pycache__/
*.pyc
*.pth
*.pt
*.onnx
.env/
.vscode/
.idea/
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2025 Satadal Dhara
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+115
View File
@@ -0,0 +1,115 @@
# SATA Utility Node Suite for ComfyUI
**Author:** Satadal
**Version:** 1.0
**License:** MIT
**Repository:** https://github.com/SatadalAI/SATA_UtilityNode
---
## 🚀 Overview
SATA Utility Node Suite is a collection of custom nodes for [ComfyUI](https://github.com/comfyanonymous/ComfyUI) designed to enhance your image processing and workflow experience.
It includes:
- **Upscale Machine:** High-quality model-based image upscaling with aspect-ratio preserving rescale.
- **Prompt Machine:** Easy prompt selection from a CSV for positive/negative prompt workflows.
- **Touchpad Pan & Zoom:** Seamless navigation for large images in the ComfyUI preview panel.
---
## 🧩 Node Features
### 🖼️ Upscale Machine
- **Model-based Upscaling:** Uses custom or pre-trained models from the `upscale_models` folder.
- **Aspect Ratio Preserving Rescale:** Output size is always original size × rescale factor.
- **CPU-based Rescaling:** Efficient resizing using OpenCV.
- **Supersampling:** Optional detail preservation for downscaling/fractional resizing.
- **Rounding Modulus:** Ensures output dimensions align with model/UI constraints.
- **Dual Output:** Returns both the processed image and a help/documentation link.
### 💬 Prompt Machine
- **CSV-based Prompt Selection:** Select prompt sets from a CSV file (`prompts.csv`).
- **Positive/Negative Output:** Outputs both positive and negative prompts as strings.
- **Easy Integration:** Designed for use in prompt-driven workflows.
### 🖱️ Touchpad Pan & Zoom
- **Preview Navigation:** Enables smooth pan and zoom for large images in the ComfyUI preview panel.
- **User Experience:** Makes inspecting high-res outputs fast and intuitive.
---
## 📦 Installation
1. Clone or download this repository into your ComfyUI `custom_nodes` directory:
```sh
git clone https://github.com/SatadalAI/SATA_UtilityNode.git
```
2. (Optional) Install dependencies if not already present:
```sh
pip install -r requirements.txt
```
3. Restart ComfyUI.
---
## 📚 Node Inputs & Outputs
### Upscale Machine
| Name | Type | Description |
|------------------|--------|--------------------------------------------------|
| `image` | IMAGE | Input image tensor |
| `upscale_model` | STRING | Model filename from `upscale_models` folder |
| `rescale_factor` | FLOAT | Scaling factor (aspect ratio preserved) |
| `supersample` | STRING | `"true"` or `"false"` |
| `rounding_modulus` | INT | Ensures dimensions are divisible by this value |
**Outputs:**
| Name | Type | Description |
|-------------|--------|------------------------------------|
| `IMAGE` | IMAGE | The upscaled and resized image |
| `show_help` | STRING | Link to documentation/help |
---
### Prompt Machine
| Name | Type | Description |
|-------------|--------|------------------------------------|
| `selection` | STRING | Prompt set name from CSV |
**Outputs:**
| Name | Type | Description |
|-------------|--------|------------------------------------|
| `positive` | STRING | Positive prompt |
| `negative` | STRING | Negative prompt |
---
### Touchpad Pan & Zoom
- **No node configuration required.**
- Enables pan/zoom in the ComfyUI preview panel for large images.
---
## 📝 License
MIT License
---
## 🔗 Links
- [ComfyUI](https://github.com/comfyanonymous/ComfyUI)
- [SATA Utility Node GitHub](https://github.com/SatadalAI/SATA_UtilityNode)
+17
View File
@@ -0,0 +1,17 @@
from .nodes.upscale_machine import Upscale_Machine
from .nodes.prompt_machine import Prompt_Machine
NODE_CLASS_MAPPINGS = {
"Upscale_Machine": Upscale_Machine,
"Prompt_Machine": Prompt_Machine,
}
NODE_DISPLAY_NAME_MAPPINGS = {
"Upscale_Machine": "Upscale Machine",
"Prompt_Machine": "Prompt Machine",
}
WEB_DIRECTORY = "./web"
__all__ = ["WEB_DIRECTORY", "NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS"]
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+90
View File
@@ -0,0 +1,90 @@
import os
import csv
from server import PromptServer
from aiohttp import web
CSV_DIR = os.path.join(os.path.dirname(__file__), "..", "prompts")
def list_csv_files():
return sorted([f for f in os.listdir(CSV_DIR) if f.endswith(".csv")])
def read_names_from_csv(filename):
path = os.path.join(CSV_DIR, filename)
if not os.path.exists(path):
return []
with open(path, "r", encoding="utf-8-sig") as f:
reader = csv.DictReader(f)
if not reader.fieldnames:
return []
field_map = {fn.strip().lower(): fn for fn in reader.fieldnames}
if "name" not in field_map:
return []
name_field = field_map["name"]
return [row[name_field] for row in reader if row.get(name_field)]
class Prompt_Machine:
def __init__(self):
csvs = list_csv_files()
if csvs:
self.default_csv = csvs[0]
names = read_names_from_csv(self.default_csv)
self.default_name = names[0] if names else "None"
else:
self.default_csv = "None"
self.default_name = "None"
@classmethod
def INPUT_TYPES(cls):
csvs = list_csv_files()
default_csv = csvs[0] if csvs else "None"
names = read_names_from_csv(default_csv) if csvs else []
default_name = names[0] if names else "None"
return {
"required": {
"csv_file": (csvs if csvs else ["None"], {"default": default_csv}),
"name": (names if names else ["None"], {"default": default_name}),
}
}
RETURN_TYPES = ("STRING", "STRING")
RETURN_NAMES = ("positive", "negative")
FUNCTION = "get_prompts"
CATEGORY = "SATA_UtilityNode"
def get_prompts(self, csv_file, name):
if csv_file == "None" or name == "None":
return ("", "")
path = os.path.join(CSV_DIR, csv_file)
if not os.path.exists(path):
print(f"[PromptMachine] CSV file not found: {path}")
return ("", "")
with open(path, "r", encoding="utf-8-sig") as f:
reader = csv.DictReader(f)
if not reader.fieldnames:
print(f"[PromptMachine] CSV has no header: {csv_file}")
return ("", "")
print(f"[PromptMachine] CSV header in {csv_file}: {reader.fieldnames}")
field_map = {fn.strip().lower(): fn for fn in reader.fieldnames}
if "name" not in field_map:
print(f"[PromptMachine] 'name' column missing in CSV: {csv_file}")
return ("", "")
name_field = field_map["name"]
pos_field = field_map.get("positive", "positive")
neg_field = field_map.get("negative", "negative")
for row in reader:
if row.get(name_field) == name:
return (row.get(pos_field, ""), row.get(neg_field, ""))
return ("", "")
# REST endpoints for frontend refresh
@PromptServer.instance.routes.get("/sata/prompt_machine/csvs")
async def list_csvs(request):
return web.json_response({"csvs": list_csv_files()})
@PromptServer.instance.routes.get("/sata/prompt_machine/names")
async def list_names(request):
csv_file = request.query.get("csv")
return web.json_response({"names": read_names_from_csv(csv_file)} if csv_file else {"names": []})
+158
View File
@@ -0,0 +1,158 @@
import torch
import cv2
import numpy as np
import folder_paths
import comfy.utils
from comfy import model_management
from spandrel import ModelLoader
def resize_tensor_opencv(tensor_chw, target_width, target_height, supersample='true', factor=2.0):
"""
CPU-based resizing using OpenCV for 'rescale' mode.
Input: tensor_chw -> torch.FloatTensor (C,H,W) in [0,1]
Output: torch.FloatTensor (C,H,W) in [0,1], guaranteed 3-channel RGB
"""
new_width = max(1, int(target_width))
new_height = max(1, int(target_height))
interp = cv2.INTER_LANCZOS4 if factor > 1.0 else cv2.INTER_AREA
np_img = tensor_chw.permute(1, 2, 0).detach().cpu().numpy()
np_img = (np.clip(np_img, 0.0, 1.0) * 255.0).astype(np.uint8)
if np_img.ndim == 2:
np_img = cv2.cvtColor(np_img, cv2.COLOR_GRAY2RGB)
elif np_img.shape[2] == 1:
np_img = cv2.cvtColor(np_img, cv2.COLOR_GRAY2RGB)
elif np_img.shape[2] == 4:
np_img = cv2.cvtColor(np_img, cv2.COLOR_RGBA2RGB)
elif np_img.shape[2] > 3:
np_img = np_img[:, :, :3]
if np_img.shape[0] == 0 or np_img.shape[1] == 0:
raise ValueError("Input image for OpenCV resize has zero width or height.")
if supersample == 'true':
ss_width = max(1, new_width * 8)
ss_height = max(1, new_height * 8)
np_img = cv2.resize(np_img, (ss_width, ss_height), interpolation=interp)
if np_img.shape[0] == 0 or np_img.shape[1] == 0:
raise ValueError("Image became empty after supersample resize.")
resized = cv2.resize(np_img, (new_width, new_height), interpolation=interp)
tensor_out = torch.from_numpy(resized).float().div(255.0).permute(2, 0, 1)
return tensor_out
class Upscale_Machine:
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"image": ("IMAGE",),
"upscale_model": (folder_paths.get_filename_list("upscale_models"),),
"rescale_factor": ("FLOAT", {"default": 2.0, "min": 0.01, "max": 16.0, "step": 0.01}),
"supersample": (["true", "false"],),
"rounding_modulus": ("INT", {"default": 8, "min": 1, "max": 1024, "step": 1}),
}
}
RETURN_TYPES = ("IMAGE", "STRING",)
RETURN_NAMES = ("IMAGE", "show_help",)
FUNCTION = "upscale"
CATEGORY = "SATA_UtilityNode"
def load_model(self, model_name):
"""Load ESRGAN/RealESRGAN/AESRGAN via spandrel"""
model_path = folder_paths.get_full_path("upscale_models", model_name)
model_loader = ModelLoader()
model = model_loader.load_from_file(model_path)
if model is None:
raise RuntimeError(f"Failed to load upscale model: {model_name}")
model.eval()
return model
def upscale_with_model(self, upscale_model, image_bhwc):
"""
Run tiled upscale with spandrel model.
Input: image_bhwc -> (B,H,W,C) float [0,1]
Output: (B,C,H',W') float [0,1]
"""
device = model_management.get_torch_device()
upscale_model.to(device)
in_img = image_bhwc.movedim(-1, -3).to(device)
tile = 512
overlap = 32
oom = True
while oom:
try:
steps = in_img.shape[0] * comfy.utils.get_tiled_scale_steps(
in_img.shape[3], in_img.shape[2], tile_x=tile, tile_y=tile, overlap=overlap
)
pbar = comfy.utils.ProgressBar(steps)
s = comfy.utils.tiled_scale(
in_img,
lambda a: upscale_model(a),
tile_x=tile,
tile_y=tile,
overlap=overlap,
upscale_amount=getattr(upscale_model, "scale", 4),
pbar=pbar
)
oom = False
except model_management.OOM_EXCEPTION as e:
tile //= 2
if tile < 128:
raise e
upscale_model.cpu()
s = torch.clamp(s, min=0.0, max=1.0)
return s
def _round_to_modulus(self, value, modulus):
if modulus is None or modulus <= 1:
return int(max(1, round(value)))
return max(modulus, int(round(value / modulus)) * modulus)
def upscale(self, image, upscale_model, rounding_modulus=8, supersample='true',
rescale_factor=2.0):
if image.ndim != 4:
raise ValueError("Expected IMAGE tensor with 4 dims (B,H,W,C).")
original_height = int(image.shape[1])
original_width = int(image.shape[2])
target_width = self._round_to_modulus(original_width * rescale_factor, rounding_modulus)
target_height = self._round_to_modulus(original_height * rescale_factor, rounding_modulus)
up_model = self.load_model(upscale_model)
up_bchw = self.upscale_with_model(up_model, image)
batch_out = []
for i in range(up_bchw.shape[0]):
chw = up_bchw[i]
resized_chw = resize_tensor_opencv(
chw, target_width=target_width, target_height=target_height,
supersample=supersample, factor=rescale_factor
)
if resized_chw.shape[0] == 1:
resized_chw = resized_chw.repeat(3, 1, 1)
elif resized_chw.shape[0] > 3:
resized_chw = resized_chw[:3, :, :]
batch_out.append(resized_chw.unsqueeze(0))
out_bchw = torch.cat(batch_out, dim=0)
images_out = out_bchw.movedim(1, -1).contiguous()
show_help = "https://github.com/SatadalAI/help_image"
return (images_out, show_help)
+74
View File
@@ -0,0 +1,74 @@
name,positive,negative
Photon1,,"cartoon, painting, illustration, (worst quality, low quality, normal quality:2)"
RealVis,"RAW photo, subject, 8k uhd, dslr, soft lighting, high quality, film grain, Fujifilm XT3","(deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime, mutated hands and fingers:1.4), (deformed, distorted, disfigured:1.3), poorly drawn, bad anatomy, wrong anatomy, extra limb, missing limb, floating limbs, disconnected limbs, mutation, mutated, ugly, disgusting, amputation, UnrealisticDream"
RevAnime,"((best quality)), ((masterpiece)), (detailed) ",
Chibi,"full body, chibi, highly detailed","photo, black and white, low contrast"
Default_Negative,,"Watermark, Text, censored, deformed, bad anatomy, disfigured, poorly drawn face, mutated, extra limb, ugly, poorly drawn hands, missing limb, floating limbs, disconnected limbs, disconnected head, malformed hands, long neck, mutated hands and fingers, bad hands, missing fingers, cropped, worst quality, low quality, mutation, poorly drawn, huge calf, bad hands, fused hand, missing hand, disappearing arms, disappearing thigh, disappearing calf, disappearing legs, missing fingers, fused fingers, abnormal eye proportion, Abnormal hands, abnormal legs, abnormal feet, abnormal fingers"
Default_Negative (sfw),,"NSFW, Cleavage, Pubic Hair, Nudity, Naked, Au naturel, Watermark, Text, censored, deformed, bad anatomy, disfigured, poorly drawn face, mutated, extra limb, ugly, poorly drawn hands, missing limb, floating limbs, disconnected limbs, disconnected head, malformed hands, long neck, mutated hands and fingers, bad hands, missing fingers, cropped, worst quality, low quality, mutation, poorly drawn, huge calf, bad hands, fused hand, missing hand, disappearing arms, disappearing thigh, disappearing calf, disappearing legs, missing fingers, fused fingers, abnormal eye proportion, Abnormal hands, abnormal legs, abnormal feet, abnormal fingers"
Default_Negative (Low Token),,"lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry"
3d-model,"professional 3d model {prompt}, octane render, highly detailed, volumetric, dramatic lighting","ugly, deformed, noisy, low poly, blurry, painting"
Analog film,"analog film photo {prompt}, faded film, desaturated, 35mm photo, grainy, vignette, vintage, Kodachrome, Lomography, stained, highly detailed, found footage","painting, drawing, illustration, glitch, deformed, mutated, cross-eyed, ugly, disfigured"
Anime,"anime artwork {prompt}, anime style, key visual, vibrant, studio anime, highly detailed","photo, deformed, black and white, realism, disfigured, low contrast"
Biomechanical,"biomechanical style {prompt}, blend of organic and mechanical elements, futuristic, cybernetic, detailed, intricate","natural, rustic, primitive, organic, simplistic"
Cinematic,"cinematic film still {prompt}, shallow depth of field, vignette, highly detailed, high budget Hollywood film, bokeh, cinemascope, moody, epic, gorgeous, film grain","anime, cartoon, graphic, text, painting, crayon, graphite, abstract, glitch"
Comic book,"comic {prompt}, graphic illustration, comic art, graphic novel art, vibrant, highly detailed","photograph, deformed, glitch, noisy, realistic, stock photo"
Cyberpunk,"neonpunk style {prompt}, cyberpunk, vaporwave, neon, vibes, vibrant, stunningly beautiful, crisp, detailed, sleek, ultramodern, magenta highlights, dark purple shadows, high contrast, cinematic, ultra detailed, intricate, professional","painting, drawing, illustration, glitch, deformed, mutated, cross-eyed, ugly, disfigured"
Digital art,"concept art {prompt}, digital artwork, illustrative, painterly, matte painting, highly detailed","photo, photorealistic, realism, ugly"
Dreamscape,"dreamscape {prompt}, surreal, ethereal, dreamy, mysterious, fantasy, highly detailed","realistic, concrete, ordinary, mundane"
Dystopian,"dystopian style {prompt}, bleak, post-apocalyptic, somber, dramatic, highly detailed","ugly, deformed, noisy, blurry, low contrast, cheerful, optimistic, vibrant, colorful"
Fantasy art,"ethereal fantasy concept art of {prompt}, magnificent, celestial, ethereal, painterly, epic, majestic, magical, fantasy art, cover art, dreamy","photographic, realistic, realism, 35mm film, dslr, cropped, frame, text, deformed, glitch, noise, noisy, off-center, deformed, cross-eyed, closed eyes, bad anatomy, ugly, disfigured, sloppy, duplicate, mutated, black and white"
Futuristic,"futuristic style {prompt}, sleek, modern, ultramodern, high tech, detailed","ugly, deformed, noisy, blurry, low contrast, realism, photorealistic, vintage, antique"
Horror,"horror-themed {prompt}, eerie, unsettling, dark, spooky, suspenseful, grim, highly detailed","cheerful, bright, vibrant, light-hearted, cute"
Isometric,"isometric style {prompt}, vibrant, beautiful, crisp, detailed, ultra detailed, intricate","deformed, mutated, ugly, disfigured, blur, blurry, noise, noisy, realistic, photographic"
Manga,"manga style {prompt}, vibrant, high-energy, detailed, iconic, Japanese comic style","ugly, deformed, noisy, blurry, low contrast, realism, photorealistic, Western comic style"
Photo with Bokeh,"cinematic photo {prompt}, 35mm photograph, film, bokeh, professional, 4k, highly detailed","drawing, painting, crayon, sketch, graphite, impressionist, noisy, blurry, soft, deformed, ugly"
Photo without Bokeh,"cinematic photo {prompt}, 35mm photograph, film, professional, 4k, highly detailed","bokeh, drawing, painting, crayon, sketch, graphite, impressionist, noisy, blurry, soft, deformed, ugly"
Photo Long Exposure,"long exposure photo of {prompt}, Blurred motion, streaks of light, surreal, dreamy, ghosting effect, highly detailed","static, noisy, deformed, shaky, abrupt, flat"
Photo Film Noir,"film noir style {prompt}, monochrome, high contrast, dramatic shadows, 1940s style, mysterious, cinematic","ugly, deformed, noisy, blurry, low contrast, vibrant, colorful"
Pixel Art,"pixel-art {prompt}, low-res, blocky, pixel art style, 8-bit graphics","sloppy, messy, blurry, noisy, highly detailed, ultra textured, photo, realistic"
Pixar Style,"pixar style render, caricature, {prompt}, looking at viewer, flat colors, 4k, professional, award-winning, highly detailed, volumetric, dramatic lighting","low poly, painting, realistic, photo, line drawing"
Sci-fi,"sci-fi style {prompt}, futuristic, technological, space themes, advanced civilizations, light leaks, lens flares","ugly, deformed, noisy, blurry, low contrast, historical, medieval"
Steampunk,"steampunk style {prompt}, antique, mechanical, brass and copper tones, gears, intricate, detailed","deformed, glitch, noisy, low contrast, anime, photorealistic"
Watercolor,"watercolor painting {prompt}, vibrant, beautiful, painterly, detailed, textural, artistic","anime, photorealistic, 35mm film, deformed, glitch, low contrast, noisy"
Character Reference Sheet,"character reference sheet {prompt}, turnaround views, detailed anatomy, color palette, multiple poses, highly detailed","simplistic, minimalist, vague, incomplete"
Enhancer,"breathtaking {prompt}, masterpiece, award-winning, professional, highly detailed","ugly, deformed, noisy, blurry, distorted, grainy"
Lighting: Artificial,artificial light,
Lighting: Back,back lighting,
Lighting: Bottom,bottom lighting,
Lighting: Chiaroscuro,chiaroscuro lighting,
Lighting: Cinematic,cinematic lighting,
Lighting: Dramatic,dramatic lighting,
Lighting: High key,high key lighting,
Lighting: Low key,low key lighting,
Lighting: Natural,natural light,
Lighting: Rembrandt,Rembrandt lighting,
Lighting: Rim,rim lighting,
Lighting: Side,side lighting,
Lighting: Split,split lighting,
Lighting: Top,top lighting,
"Cotton, Fine","{prompt} in fine cotton fabric, highly detailed, gorgeous, matte fabric","anime, graphic, text, painting, crayon, graphite, glitch, cartoon, ugly, deformed, noisy, blurry, distorted"
"Cotton, Regular","{prompt} dress in heavy knit cotton fabric, matte fabric, gorgeous cloth, highly detailed, cinematic","wrinkles, linen, seethrough, transparent, anime, graphic, text, painting, crayon, graphite, glitch, cartoon, ugly, deformed, noisy, blurry, distorted"
Denim,"{prompt} in heavy japanese (denim fabric), highly detailed, hard drape","anime, graphic, text, painting, crayon, graphite, glitch, cartoon, ugly, deformed, noisy, blurry, distorted"
"Flannel, Brushed","{prompt} in soft woven brushed flannel, highly detailed, fuzzy flannel cloth, cashmere flannel","anime, graphic, text, painting, crayon, graphite, glitch, cartoon, ugly, deformed, noisy, blurry, distorted"
Latex/Plastic,"{prompt} dress in shiny latex plastic material, expensive exquisite latex fabric, tight fitting","metallic, nude, naked, fabric wrinkles, anime, graphic, text, painting, crayon, graphite, glitch, cartoon, ugly, deformed, noisy, blurry, distorted"
"Latex/Plastic, Glossy","{prompt} in shiny wet glossy latex material, hard lighting, expensive exquisite latex fabric, tight fitting","metallic, nude, naked, fabric wrinkles, anime, graphic, text, painting, crayon, graphite, glitch, cartoon, ugly, deformed, noisy, blurry, distorted"
Leather,"{prompt} in smooth thin leather, highly detailed, expensive exquisite leather","anime, graphic, text, painting, crayon, graphite, glitch, cartoon, ugly, deformed, noisy, blurry, distorted"
Linen,"{prompt} in linen fabric, loosely woven, gorgeous cloth, highly detailed","anime, graphic, text, painting, crayon, graphite, glitch, cartoon, ugly, deformed, noisy, blurry, distorted"
Silk,"{prompt} in silk cloth, highly detailed, gorgeous, sheen lustre","anime, graphic, text, painting, crayon, graphite, glitch, cartoon, ugly, deformed, noisy, blurry, distorted"
Velvet,"{prompt} in smooth velvet fabric, gorgeous exquisite cloth, highly detailed, fuzzy velvet cloth, expensive","anime, graphic, text, painting, crayon, graphite, glitch, cartoon, ugly, deformed, noisy, blurry, distorted"
"Wool, Fine knit","{prompt} in wool cloth, highly detailed, gorgeous, fine knit cashmere wool fabric","anime, graphic, text, painting, crayon, graphite, glitch, cartoon, ugly, deformed, noisy, blurry, distorted"
"Wool, Heavy knit","{prompt} in chunky heavy wool yarn, highly detailed, heavy knit large wool fabric, sailor's wool","anime, graphic, text, painting, crayon, graphite, glitch, cartoon, ugly, deformed, noisy, blurry, distorted"
"Wool, Cable knit","{prompt} in chunky heavy cable knit wool yarn, highly detailed, cable knit large wool fabric","anime, graphic, text, painting, crayon, graphite, glitch, cartoon, ugly, deformed, noisy, blurry, distorted"
Ghibli,"(Studio ghibli style, Art by Hayao Miyazaki:1.2), Anime Style, Manga Style, Hand drawn, cinematic, Sharp focus, humorous illustration, big depth of field, Masterpiece, concept art, trending on artstation, Vivid colors, Simplified style, trending on ArtStation, trending on CGSociety, Intricate, Vibrant colors, Soft Shading, Simplistic Features, Sharp Angles, Playful",
Vector Illustrations,"Vector art, Vivid colors, Clean lines, Sharp edges, Minimalist, Precise geometry, Simplistic, Smooth curves, Bold outlines, Crisp shapes, Flat colors, Illustration art piece, High contrast shadows, Technical illustration, Graphic design, Vector graphics, High contrast, Precision artwork, Linear compositions, Scalable artwork, Digital art",
Digital Painting,"glow effects, godrays, Hand drawn, render, 8k, octane render, cinema 4d, blender, dark, atmospheric 4k ultra detailed, cinematic, Sharp focus, big depth of field, Masterpiece, colors, 3d octane render, 4k, concept art, trending on artstation, hyperrealistic, Vivid colors, extremely detailed CG unity 8k wallpaper, trending on CGSociety, Intricate, High Detail, dramatic",
Indie Game,"Indie game art, Vector Art, Borderlands style, Arcane style, Cartoon style, Line art, Disctinct features, Hand drawn, Technical illustration, Graphic design, Vector graphics, High contrast, Precision artwork, Linear compositions, Scalable artwork, Digital art, cinematic sensual, Sharp focus, humorous illustration, big depth of field, Masterpiece, trending on artstation, Vivid colors, trending on ArtStation, trending on CGSociety, Intricate, Low Detail, dramatic",
Original Photo Style,"Photorealistic, Hyperrealistic, Hyperdetailed, analog style, soft lighting, subsurface scattering, realistic, heavy shadow, masterpiece, best quality, ultra realistic, 8k, golden ratio, Intricate, High Detail, film photography, soft focus",
Black and White Film Noir,"(b&w, Monochromatic, Film Photography:1.3), Photorealistic, Hyperrealistic, Hyperdetailed, film noir, analog style, soft lighting, subsurface scattering, realistic, heavy shadow, masterpiece, best quality, ultra realistic, 8k, golden ratio, Intricate, High Detail, film photography, soft focus",
Isometric Rooms,"Tiny cute isometric in a cutaway box, soft smooth lighting, soft colors, 100mm lens, 3d blender render",
Space Hologram,"hologram floating in space, a vibrant digital illustration, dribbble, quantum wavetracing, black background, behance hd",
Cute Creatures,"3d fluffy, closeup cute and adorable, cute big circular reflective eyes, long fuzzy fur, Pixar render, unreal engine cinematic smooth, intricate detail, cinematic",
Realistic Photo Portraits,"RAW candid cinema, 16mm, color graded portra 400 film, remarkable color, ultra realistic, textured skin, remarkable detailed pupils, realistic dull skin noise, visible skin detail, skin fuzz, dry skin, shot with cinematic camera",
Professional Scenic Photographs,"long shot scenic professional photograph of {prompt}, perfect viewpoint, highly detailed, wide-angle lens, hyper realistic, with dramatic sky, polarizing filter, natural lighting, vivid colors, everything in sharp focus, HDR, UHD, 64K",
Skin Enhancer,"detailed skin texture, (blush:0.5), (goosebumps:0.5), subsurface scattering, dry skin, fuzzy skin",
Skin Enhancer (clean),"detailed skin texture, (blush:0.2), (goosebumps:0.3), subsurface scattering, dry skin, fuzzy skin",
1 name positive negative
2 Photon1 cartoon, painting, illustration, (worst quality, low quality, normal quality:2)
3 RealVis RAW photo, subject, 8k uhd, dslr, soft lighting, high quality, film grain, Fujifilm XT3 (deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime, mutated hands and fingers:1.4), (deformed, distorted, disfigured:1.3), poorly drawn, bad anatomy, wrong anatomy, extra limb, missing limb, floating limbs, disconnected limbs, mutation, mutated, ugly, disgusting, amputation, UnrealisticDream
4 RevAnime ((best quality)), ((masterpiece)), (detailed)
5 Chibi full body, chibi, highly detailed photo, black and white, low contrast
6 Default_Negative Watermark, Text, censored, deformed, bad anatomy, disfigured, poorly drawn face, mutated, extra limb, ugly, poorly drawn hands, missing limb, floating limbs, disconnected limbs, disconnected head, malformed hands, long neck, mutated hands and fingers, bad hands, missing fingers, cropped, worst quality, low quality, mutation, poorly drawn, huge calf, bad hands, fused hand, missing hand, disappearing arms, disappearing thigh, disappearing calf, disappearing legs, missing fingers, fused fingers, abnormal eye proportion, Abnormal hands, abnormal legs, abnormal feet, abnormal fingers
7 Default_Negative (sfw) NSFW, Cleavage, Pubic Hair, Nudity, Naked, Au naturel, Watermark, Text, censored, deformed, bad anatomy, disfigured, poorly drawn face, mutated, extra limb, ugly, poorly drawn hands, missing limb, floating limbs, disconnected limbs, disconnected head, malformed hands, long neck, mutated hands and fingers, bad hands, missing fingers, cropped, worst quality, low quality, mutation, poorly drawn, huge calf, bad hands, fused hand, missing hand, disappearing arms, disappearing thigh, disappearing calf, disappearing legs, missing fingers, fused fingers, abnormal eye proportion, Abnormal hands, abnormal legs, abnormal feet, abnormal fingers
8 Default_Negative (Low Token) lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry
9 3d-model professional 3d model {prompt}, octane render, highly detailed, volumetric, dramatic lighting ugly, deformed, noisy, low poly, blurry, painting
10 Analog film analog film photo {prompt}, faded film, desaturated, 35mm photo, grainy, vignette, vintage, Kodachrome, Lomography, stained, highly detailed, found footage painting, drawing, illustration, glitch, deformed, mutated, cross-eyed, ugly, disfigured
11 Anime anime artwork {prompt}, anime style, key visual, vibrant, studio anime, highly detailed photo, deformed, black and white, realism, disfigured, low contrast
12 Biomechanical biomechanical style {prompt}, blend of organic and mechanical elements, futuristic, cybernetic, detailed, intricate natural, rustic, primitive, organic, simplistic
13 Cinematic cinematic film still {prompt}, shallow depth of field, vignette, highly detailed, high budget Hollywood film, bokeh, cinemascope, moody, epic, gorgeous, film grain anime, cartoon, graphic, text, painting, crayon, graphite, abstract, glitch
14 Comic book comic {prompt}, graphic illustration, comic art, graphic novel art, vibrant, highly detailed photograph, deformed, glitch, noisy, realistic, stock photo
15 Cyberpunk neonpunk style {prompt}, cyberpunk, vaporwave, neon, vibes, vibrant, stunningly beautiful, crisp, detailed, sleek, ultramodern, magenta highlights, dark purple shadows, high contrast, cinematic, ultra detailed, intricate, professional painting, drawing, illustration, glitch, deformed, mutated, cross-eyed, ugly, disfigured
16 Digital art concept art {prompt}, digital artwork, illustrative, painterly, matte painting, highly detailed photo, photorealistic, realism, ugly
17 Dreamscape dreamscape {prompt}, surreal, ethereal, dreamy, mysterious, fantasy, highly detailed realistic, concrete, ordinary, mundane
18 Dystopian dystopian style {prompt}, bleak, post-apocalyptic, somber, dramatic, highly detailed ugly, deformed, noisy, blurry, low contrast, cheerful, optimistic, vibrant, colorful
19 Fantasy art ethereal fantasy concept art of {prompt}, magnificent, celestial, ethereal, painterly, epic, majestic, magical, fantasy art, cover art, dreamy photographic, realistic, realism, 35mm film, dslr, cropped, frame, text, deformed, glitch, noise, noisy, off-center, deformed, cross-eyed, closed eyes, bad anatomy, ugly, disfigured, sloppy, duplicate, mutated, black and white
20 Futuristic futuristic style {prompt}, sleek, modern, ultramodern, high tech, detailed ugly, deformed, noisy, blurry, low contrast, realism, photorealistic, vintage, antique
21 Horror horror-themed {prompt}, eerie, unsettling, dark, spooky, suspenseful, grim, highly detailed cheerful, bright, vibrant, light-hearted, cute
22 Isometric isometric style {prompt}, vibrant, beautiful, crisp, detailed, ultra detailed, intricate deformed, mutated, ugly, disfigured, blur, blurry, noise, noisy, realistic, photographic
23 Manga manga style {prompt}, vibrant, high-energy, detailed, iconic, Japanese comic style ugly, deformed, noisy, blurry, low contrast, realism, photorealistic, Western comic style
24 Photo with Bokeh cinematic photo {prompt}, 35mm photograph, film, bokeh, professional, 4k, highly detailed drawing, painting, crayon, sketch, graphite, impressionist, noisy, blurry, soft, deformed, ugly
25 Photo without Bokeh cinematic photo {prompt}, 35mm photograph, film, professional, 4k, highly detailed bokeh, drawing, painting, crayon, sketch, graphite, impressionist, noisy, blurry, soft, deformed, ugly
26 Photo Long Exposure long exposure photo of {prompt}, Blurred motion, streaks of light, surreal, dreamy, ghosting effect, highly detailed static, noisy, deformed, shaky, abrupt, flat
27 Photo Film Noir film noir style {prompt}, monochrome, high contrast, dramatic shadows, 1940s style, mysterious, cinematic ugly, deformed, noisy, blurry, low contrast, vibrant, colorful
28 Pixel Art pixel-art {prompt}, low-res, blocky, pixel art style, 8-bit graphics sloppy, messy, blurry, noisy, highly detailed, ultra textured, photo, realistic
29 Pixar Style pixar style render, caricature, {prompt}, looking at viewer, flat colors, 4k, professional, award-winning, highly detailed, volumetric, dramatic lighting low poly, painting, realistic, photo, line drawing
30 Sci-fi sci-fi style {prompt}, futuristic, technological, space themes, advanced civilizations, light leaks, lens flares ugly, deformed, noisy, blurry, low contrast, historical, medieval
31 Steampunk steampunk style {prompt}, antique, mechanical, brass and copper tones, gears, intricate, detailed deformed, glitch, noisy, low contrast, anime, photorealistic
32 Watercolor watercolor painting {prompt}, vibrant, beautiful, painterly, detailed, textural, artistic anime, photorealistic, 35mm film, deformed, glitch, low contrast, noisy
33 Character Reference Sheet character reference sheet {prompt}, turnaround views, detailed anatomy, color palette, multiple poses, highly detailed simplistic, minimalist, vague, incomplete
34 Enhancer breathtaking {prompt}, masterpiece, award-winning, professional, highly detailed ugly, deformed, noisy, blurry, distorted, grainy
35 Lighting: Artificial artificial light
36 Lighting: Back back lighting
37 Lighting: Bottom bottom lighting
38 Lighting: Chiaroscuro chiaroscuro lighting
39 Lighting: Cinematic cinematic lighting
40 Lighting: Dramatic dramatic lighting
41 Lighting: High key high key lighting
42 Lighting: Low key low key lighting
43 Lighting: Natural natural light
44 Lighting: Rembrandt Rembrandt lighting
45 Lighting: Rim rim lighting
46 Lighting: Side side lighting
47 Lighting: Split split lighting
48 Lighting: Top top lighting
49 Cotton, Fine {prompt} in fine cotton fabric, highly detailed, gorgeous, matte fabric anime, graphic, text, painting, crayon, graphite, glitch, cartoon, ugly, deformed, noisy, blurry, distorted
50 Cotton, Regular {prompt} dress in heavy knit cotton fabric, matte fabric, gorgeous cloth, highly detailed, cinematic wrinkles, linen, seethrough, transparent, anime, graphic, text, painting, crayon, graphite, glitch, cartoon, ugly, deformed, noisy, blurry, distorted
51 Denim {prompt} in heavy japanese (denim fabric), highly detailed, hard drape anime, graphic, text, painting, crayon, graphite, glitch, cartoon, ugly, deformed, noisy, blurry, distorted
52 Flannel, Brushed {prompt} in soft woven brushed flannel, highly detailed, fuzzy flannel cloth, cashmere flannel anime, graphic, text, painting, crayon, graphite, glitch, cartoon, ugly, deformed, noisy, blurry, distorted
53 Latex/Plastic {prompt} dress in shiny latex plastic material, expensive exquisite latex fabric, tight fitting metallic, nude, naked, fabric wrinkles, anime, graphic, text, painting, crayon, graphite, glitch, cartoon, ugly, deformed, noisy, blurry, distorted
54 Latex/Plastic, Glossy {prompt} in shiny wet glossy latex material, hard lighting, expensive exquisite latex fabric, tight fitting metallic, nude, naked, fabric wrinkles, anime, graphic, text, painting, crayon, graphite, glitch, cartoon, ugly, deformed, noisy, blurry, distorted
55 Leather {prompt} in smooth thin leather, highly detailed, expensive exquisite leather anime, graphic, text, painting, crayon, graphite, glitch, cartoon, ugly, deformed, noisy, blurry, distorted
56 Linen {prompt} in linen fabric, loosely woven, gorgeous cloth, highly detailed anime, graphic, text, painting, crayon, graphite, glitch, cartoon, ugly, deformed, noisy, blurry, distorted
57 Silk {prompt} in silk cloth, highly detailed, gorgeous, sheen lustre anime, graphic, text, painting, crayon, graphite, glitch, cartoon, ugly, deformed, noisy, blurry, distorted
58 Velvet {prompt} in smooth velvet fabric, gorgeous exquisite cloth, highly detailed, fuzzy velvet cloth, expensive anime, graphic, text, painting, crayon, graphite, glitch, cartoon, ugly, deformed, noisy, blurry, distorted
59 Wool, Fine knit {prompt} in wool cloth, highly detailed, gorgeous, fine knit cashmere wool fabric anime, graphic, text, painting, crayon, graphite, glitch, cartoon, ugly, deformed, noisy, blurry, distorted
60 Wool, Heavy knit {prompt} in chunky heavy wool yarn, highly detailed, heavy knit large wool fabric, sailor's wool anime, graphic, text, painting, crayon, graphite, glitch, cartoon, ugly, deformed, noisy, blurry, distorted
61 Wool, Cable knit {prompt} in chunky heavy cable knit wool yarn, highly detailed, cable knit large wool fabric anime, graphic, text, painting, crayon, graphite, glitch, cartoon, ugly, deformed, noisy, blurry, distorted
62 Ghibli (Studio ghibli style, Art by Hayao Miyazaki:1.2), Anime Style, Manga Style, Hand drawn, cinematic, Sharp focus, humorous illustration, big depth of field, Masterpiece, concept art, trending on artstation, Vivid colors, Simplified style, trending on ArtStation, trending on CGSociety, Intricate, Vibrant colors, Soft Shading, Simplistic Features, Sharp Angles, Playful
63 Vector Illustrations Vector art, Vivid colors, Clean lines, Sharp edges, Minimalist, Precise geometry, Simplistic, Smooth curves, Bold outlines, Crisp shapes, Flat colors, Illustration art piece, High contrast shadows, Technical illustration, Graphic design, Vector graphics, High contrast, Precision artwork, Linear compositions, Scalable artwork, Digital art
64 Digital Painting glow effects, godrays, Hand drawn, render, 8k, octane render, cinema 4d, blender, dark, atmospheric 4k ultra detailed, cinematic, Sharp focus, big depth of field, Masterpiece, colors, 3d octane render, 4k, concept art, trending on artstation, hyperrealistic, Vivid colors, extremely detailed CG unity 8k wallpaper, trending on CGSociety, Intricate, High Detail, dramatic
65 Indie Game Indie game art, Vector Art, Borderlands style, Arcane style, Cartoon style, Line art, Disctinct features, Hand drawn, Technical illustration, Graphic design, Vector graphics, High contrast, Precision artwork, Linear compositions, Scalable artwork, Digital art, cinematic sensual, Sharp focus, humorous illustration, big depth of field, Masterpiece, trending on artstation, Vivid colors, trending on ArtStation, trending on CGSociety, Intricate, Low Detail, dramatic
66 Original Photo Style Photorealistic, Hyperrealistic, Hyperdetailed, analog style, soft lighting, subsurface scattering, realistic, heavy shadow, masterpiece, best quality, ultra realistic, 8k, golden ratio, Intricate, High Detail, film photography, soft focus
67 Black and White Film Noir (b&w, Monochromatic, Film Photography:1.3), Photorealistic, Hyperrealistic, Hyperdetailed, film noir, analog style, soft lighting, subsurface scattering, realistic, heavy shadow, masterpiece, best quality, ultra realistic, 8k, golden ratio, Intricate, High Detail, film photography, soft focus
68 Isometric Rooms Tiny cute isometric in a cutaway box, soft smooth lighting, soft colors, 100mm lens, 3d blender render
69 Space Hologram hologram floating in space, a vibrant digital illustration, dribbble, quantum wavetracing, black background, behance hd
70 Cute Creatures 3d fluffy, closeup cute and adorable, cute big circular reflective eyes, long fuzzy fur, Pixar render, unreal engine cinematic smooth, intricate detail, cinematic
71 Realistic Photo Portraits RAW candid cinema, 16mm, color graded portra 400 film, remarkable color, ultra realistic, textured skin, remarkable detailed pupils, realistic dull skin noise, visible skin detail, skin fuzz, dry skin, shot with cinematic camera
72 Professional Scenic Photographs long shot scenic professional photograph of {prompt}, perfect viewpoint, highly detailed, wide-angle lens, hyper realistic, with dramatic sky, polarizing filter, natural lighting, vivid colors, everything in sharp focus, HDR, UHD, 64K
73 Skin Enhancer detailed skin texture, (blush:0.5), (goosebumps:0.5), subsurface scattering, dry skin, fuzzy skin
74 Skin Enhancer (clean) detailed skin texture, (blush:0.2), (goosebumps:0.3), subsurface scattering, dry skin, fuzzy skin
+3
View File
@@ -0,0 +1,3 @@
name,positive,negative
Futuristic,"futuristic style {prompt}, sleek, modern, high tech","ugly, deformed, noisy, blurry"
Fantasy,"fantasy {prompt}, magical, vibrant","muddy, poorly lit, low detail"
1 name positive negative
2 Futuristic futuristic style {prompt}, sleek, modern, high tech ugly, deformed, noisy, blurry
3 Fantasy fantasy {prompt}, magical, vibrant muddy, poorly lit, low detail
+2
View File
@@ -0,0 +1,2 @@
opencv-python>=4.5.0
spandrel
+30
View File
@@ -0,0 +1,30 @@
import { app } from "../../../scripts/app.js";
app.registerExtension({
name: "SATA_UtilityNode.PromptMachine",
async nodeCreated(node) {
if (node.comfyClass === "Prompt_Machine") {
// When csv_file changes, refresh names list
const widget = node.widgets.find(w => w.name === "csv_file");
if (widget) {
widget.callback = async (value) => {
try {
const resp = await fetch(`/sata/prompt_machine/names?csv=${encodeURIComponent(value)}`);
const data = await resp.json();
const names = Array.isArray(data.names) && data.names.length > 0 ? data.names : ["None"];
const nameWidget = node.widgets.find(w => w.name === "name");
if (nameWidget) {
if (!nameWidget.options) nameWidget.options = {};
nameWidget.options.values = names;
nameWidget.value = names[0];
if (typeof node.setDirtyCanvas === "function") node.setDirtyCanvas(true);
if (typeof node.onWidgetChanged === "function") node.onWidgetChanged(nameWidget, nameWidget.value, null, 0);
}
} catch (e) {
console.error("[PromptMachine] Failed to fetch names:", e);
}
};
}
}
}
});
+40
View File
@@ -0,0 +1,40 @@
/**
* Enhanced smooth scrolling and zooming for touchpad gestures
* Overrides LGraphCanvas.prototype.processMouseWheel
*/
LGraphCanvas.prototype.processMouseWheel = function (/** @type {WheelEvent} */ event) {
if (!this.graph || !this.allow_dragcanvas) return;
const { clientX: x, clientY: y, deltaX, deltaY, ctrlKey, metaKey } = event;
// Check if the event occurred inside the canvas viewport
if (this.viewport) {
const [vx, vy, vw, vh] = this.viewport;
const insideX = x >= vx && x < vx + vw;
const insideY = y >= vy && y < vy + vh;
if (!(insideX && insideY)) return;
}
const currentScale = this.ds.scale;
// Configurable sensitivity
const ZOOM_SENSITIVITY = this.zoomSensitivity || 0.005;
const PAN_SENSITIVITY = this.panSensitivity || 1.0;
const MIN_SCALE = 0.1;
const MAX_SCALE = 4.0;
if (ctrlKey || metaKey) {
// Zoom mode
const zoomDirection = Math.sign(deltaY);
const zoomAmount = zoomDirection * Math.abs(deltaY) * ZOOM_SENSITIVITY;
const newScale = Math.max(MIN_SCALE, Math.min(MAX_SCALE, currentScale - zoomAmount));
this.ds.changeScale(newScale, [x, y]);
} else {
// Pan mode
this.ds.mouseDrag(-deltaX * PAN_SENSITIVITY, -deltaY * PAN_SENSITIVITY);
}
this.graph.change();
event.preventDefault();
return false;
};