feat: 增强Kontext预设系统 - 添加数字肖像漫画风格 - 改进经典艺术风格模仿 - 改进动漫风格转绘 - 改进模仿影视作品风格 - 改进手绘模仿大师 - 删除像素艺术和油画风格预设

This commit is contained in:
Cyber Dick Lang
2025-07-25 15:43:40 +08:00
parent 866942ae34
commit c4580b252e
5 changed files with 96 additions and 23 deletions
+29 -4
View File
@@ -1,6 +1,6 @@
# ComfyUI-UniversalToolkit
[![Version](https://img.shields.io/badge/version-1.2.6-blue.svg)](https://github.com/whmc76/ComfyUI-UniversalToolkit)
[![Version](https://img.shields.io/badge/version-1.2.8-blue.svg)](https://github.com/whmc76/ComfyUI-UniversalToolkit)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
[![ComfyUI](https://img.shields.io/badge/ComfyUI-v3+-orange.svg)](https://github.com/comfyanonymous/ComfyUI)
@@ -12,7 +12,7 @@
- **🎵 音频处理**:音频加载、裁剪、重采样、增益调节等
- **🎭 掩码操作**:掩码运算、填充、裁剪、预览等
- **🛠️ 实用工具**:数学表达式、文本处理、显存清理、预设加载等
- **📱 智能预设**:30种Kontext VLM系统预设,支持动态场景描述
- **📱 智能预设**:32种Kontext VLM系统预设,支持动态场景描述
- **🔧 模块化设计**:按功能分类,易于维护和扩展
- **⚡ 高性能**:支持批量处理,优化内存使用
@@ -117,11 +117,13 @@ tqdm
- Furniture Removal (清空家具) - 移除房间内的所有家具
- Interior Design (室内设计) - 重新设计室内空间风格
**📷 摄影技术类 (7个)**
**📷 摄影技术类 (9个)**
- Camera Movement (移动镜头) - 戏剧性的镜头移动效果
- Relighting (重新布光) - 完全改变图像的光照和氛围
- Camera Zoom (画面缩放) - 有目的的缩放效果
- Professional Product Photography (专业产品图) - 商业级产品摄影效果
- Product Lifestyle Scene (产品生活场景图) - 产品在生活场景中的展示
- Model Hand Product Close-Up (模特手持特写) - 模特手持产品的特写摄影
- Tilt-Shift Miniature (微缩世界) - 倾斜移轴微缩效果
- Reflection Addition (添加倒影) - 添加反射表面增强构图
- Character Pose & Viewpoint Change (角色姿势视角变换) - 改变角色视角保持特征一致
@@ -174,7 +176,30 @@ AudioCropProcess_UTK
## 📋 版本历史
### v1.2.6 (最新)
### v1.2.8 (最新)
- 新增模特手持特写预设和优化产品摄影预设
- 新增Photo-Model Hand Product Close-Up (模特手持特写)预设,专门用于生成模特手持产品的特写摄影场景
- 将Photo-Model Product Trial改名为Photo-Product Lifestyle Scene (产品生活场景图),更准确反映功能
- 升级Photo-Professional Product Photography (专业产品图)预设,强调场景驱动环境优先级
- 优化专业产品图预设:严格遵循用户场景要求,避免默认影棚背景
- 改进场景匹配:提供购物中心橱窗、咖啡厅、户外公园等具体场景示例
- 增强环境匹配灯光:根据场景使用商场环境光、户外自然光、室内温暖灯光
- 提升构图焦点:强调自然前景/背景整合,保持产品作为明确焦点
- 完善输出要求:详细描述场景设置、相机角度、背景元素、灯光风格和构图
- 保持所有预设的完整功能,总数达到32个,覆盖更全面的图像处理需求
### v1.2.7
- 升级专业产品摄影和模特试用产品图预设
- 新增Photo-Model Product Trial (模特试用产品图)预设,专门用于生成模特使用商品的场景图
- 升级Photo-Professional Product Photography (专业产品图)预设,使用更精确的商业摄影指令
- 优化专业产品图预设:增强场景响应式环境、专业灯光阴影控制、构图焦点卓越性
- 改进模特试用产品图预设:强调模特产品互动、生活化环境整合、专业模特呈现
- 提升商业摄影质量标准:确保锐利对焦、准确曝光、专业调色
- 增强真实故事叙述:创造既真实又令人向往的生活方式故事
- 完善输出要求:详细描述摄影设置、灯光安排、背景处理、相机角度和构图风格
- 保持所有预设的完整功能,总数达到31个,覆盖更全面的图像处理需求
### v1.2.6
- 进一步优化角色姿势视角变换预设
- 使用更精确的提示词结构,提升指令的准确性
- 明确指定相机角度、位置和角色动作的描述要求
+24 -1
View File
@@ -8,13 +8,36 @@ A comprehensive toolkit for ComfyUI that provides various utility nodes for imag
:license: MIT, see LICENSE for more details.
"""
__version__ = "1.2.6"
__version__ = "1.2.8"
__author__ = "CyberDickLang"
__email__ = "286878701@qq.com"
__url__ = "https://github.com/whmc76"
# 更新日志
CHANGELOG = {
"1.2.8": [
"新增模特手持特写预设和优化产品摄影预设:",
"- 新增Photo-Model Hand Product Close-Up (模特手持特写)预设,专门用于生成模特手持产品的特写摄影场景",
"- 将Photo-Model Product Trial改名为Photo-Product Lifestyle Scene (产品生活场景图),更准确反映功能",
"- 升级Photo-Professional Product Photography (专业产品图)预设,强调场景驱动环境优先级",
"- 优化专业产品图预设:严格遵循用户场景要求,避免默认影棚背景",
"- 改进场景匹配:提供购物中心橱窗、咖啡厅、户外公园等具体场景示例",
"- 增强环境匹配灯光:根据场景使用商场环境光、户外自然光、室内温暖灯光",
"- 提升构图焦点:强调自然前景/背景整合,保持产品作为明确焦点",
"- 完善输出要求:详细描述场景设置、相机角度、背景元素、灯光风格和构图",
"- 保持所有预设的完整功能,总数达到32个,覆盖更全面的图像处理需求",
],
"1.2.7": [
"升级专业产品摄影和模特试用产品图预设:",
"- 新增Photo-Model Product Trial (模特试用产品图)预设,专门用于生成模特使用商品的场景图",
"- 升级Photo-Professional Product Photography (专业产品图)预设,使用更精确的商业摄影指令",
"- 优化专业产品图预设:增强场景响应式环境、专业灯光阴影控制、构图焦点卓越性",
"- 改进模特试用产品图预设:强调模特产品互动、生活化环境整合、专业模特呈现",
"- 提升商业摄影质量标准:确保锐利对焦、准确曝光、专业调色",
"- 增强真实故事叙述:创造既真实又令人向往的生活方式故事",
"- 完善输出要求:详细描述摄影设置、灯光安排、背景处理、相机角度和构图风格",
"- 保持所有预设的完整功能,总数达到31个,覆盖更全面的图像处理需求",
],
"1.2.6": [
"进一步优化角色姿势视角变换预设:",
"- 使用更精确的提示词结构,提升指令的准确性",
+21 -17
View File
@@ -55,7 +55,15 @@ class LoadKontextPresets_UTK:
},
{
"name": "Photo-Professional Product Photography (专业产品图)",
"brief": "Place the product in $user_prompt$, ensuring its shape, texture, colors, and surface details remain unchanged. This professional photography transformation can include: 1. **Studio Environment Setup**: Create high-end commercial photography settings with professional lighting, backdrops, and staging elements. 2. **Lifestyle Integration**: Place the product in realistic lifestyle contexts like home environments, office settings, outdoor scenes, or social situations. 3. **Commercial Presentation**: Transform into catalog-style photography with clean backgrounds, product-focused composition, and professional styling. 4. **Atmospheric Contexts**: Integrate products into mood-setting environments like luxury settings, minimalist spaces, or themed atmospheres. 5. **Seasonal Campaigns**: Adapt the scene for seasonal marketing contexts while maintaining product prominence. 6. **Brand Storytelling**: Create narrative-driven scenes that tell a story about the product's use or benefits. Adjust lighting, shadows, and reflections to match the new environment while keeping the product as the visual focus. Do not alter any features of the product itself, only integrate it naturally into the specified scene. Specify the professional photography setup, including studio lighting arrangement, background treatment, composition style, and any props or lifestyle elements that enhance the product's appeal.",
"brief": "Transform the product into a professional photography scene based on $user_prompt$, ensuring the product's shape, texture, colors, and surface details remain completely unchanged. The scene description from $user_prompt$ has the highest priority, and the environment must accurately reflect this specified context (e.g., shopping mall window display, cozy café table, outdoor park bench) rather than defaulting to a studio backdrop. Apply a commercial-grade transformation with the following principles: 1. **Scene-Driven Environment Priority**: Strictly follow the environment specified in $user_prompt$. Only use a clean studio backdrop if explicitly requested. For other contexts, create a professional setting that matches the scene while maintaining commercial photography quality and visual clarity. 2. **Professional Lighting & Shadow Control**: Use lighting setups that match the requested environment (e.g., mall ambient lighting with soft reflections, natural sunlight for outdoor, warm interior lighting for lifestyle). Adjust shadows and highlights to enhance the product while ensuring the lighting feels authentic to the scene. 3. **Composition & Focus Excellence**: Frame the product using professional photography principles (e.g., rule of thirds, depth of field, natural foreground/background integration), keeping the product as the clear focal point. 4. **High-Quality Standards**: Ensure sharp focus, correct exposure, and professional color grading that enhances the product's design and integrates seamlessly with the scene's tone. 5. **Seamless Context Integration**: The product must appear naturally placed in the requested scene (e.g., within a shop display or lifestyle surface), with consistent reflections, shadows, and scale. 6. **Brand-Ready Presentation**: Final output must meet e-commerce and marketing standards, suitable for online catalogs, ads, or promotional images. Describe the exact scene setup, including camera angle, background elements, lighting style, and composition, ensuring it matches $user_prompt$ and avoids default studio interpretations unless explicitly mentioned.",
},
{
"name": "Photo-Product Lifestyle Scene (产品生活场景图)",
"brief": "Transform the scene into a professional lifestyle photography setup as described in $user_prompt$, featuring a model naturally interacting with the product. The transformation must meet commercial-grade lifestyle photography standards and include: 1. **Model-Product Interaction**: Ensure the model engages with the product naturally (e.g., holding, using, wearing, or demonstrating it) in a realistic and appealing way that highlights its functionality and value. 2. **Lifestyle Environment Integration**: Place the model and product in the requested environment (e.g., home, outdoor, office, or urban lifestyle) with believable interactions and spatial coherence, ensuring the scene enhances the product's narrative. 3. **Professional Model Presentation**: Present the model with confident yet natural body language, realistic poses, and relatable expressions, ensuring all gestures and styling look authentic while meeting professional photography standards. 4. **Product Prominence**: Keep the product clearly visible, well-lit, and integrated into the action flow without being overshadowed by other elements. The product must remain the visual focal point. 5. **Commercial Photography Quality**: Use studio-level or natural lighting setups suitable for the environment, maintain sharp focus, clean composition (rule of thirds, depth of field), and professional color grading suitable for advertising or e-commerce. 6. **Authentic Storytelling**: Design the scene to tell a genuine and aspirational lifestyle story that feels both relatable and inspiring, showing how the product fits into everyday life. Describe the model's position, product interaction details, environmental elements, lighting setup, and any props or styling that enhance the product's commercial appeal while maintaining authenticity and consistency with $user_prompt$.",
},
{
"name": "Photo-Model Hand Product Close-Up (模特手持特写)",
"brief": "Transform the scene into a professional close-up lifestyle photography setup as described in $user_prompt$, focusing on the model's hands and product interaction. The transformation must meet commercial-grade close-up photography standards and include: 1. **Close-Up Composition**: Frame the shot tightly around the model's hands and the product, minimizing distracting background elements while keeping the product as the clear focal point. 2. **Model-Product Interaction**: Ensure the model's hands hold, use, or interact with the product naturally, showcasing its texture, design, and key features with authentic hand positioning and gesture. 3. **Professional Lighting**: Apply soft, directional lighting (e.g., studio softbox or natural window light) to highlight product surfaces and create realistic shadows and reflections that enhance depth. 4. **Product Emphasis**: Keep the product sharply in focus with macro or medium close-up framing, ensuring its shape, texture, and color remain unchanged and professionally presented. 5. **Lifestyle Touch**: Add subtle lifestyle elements (e.g., a table surface, partial props) to create context without overpowering the product, ensuring the scene looks realistic and engaging. 6. **Commercial Quality**: Use proper color grading, balanced contrast, and a professional finish suitable for e-commerce, social media marketing, or print ads. Describe hand positions, product angle, lighting setup, background tone, and any minimal props that enhance the visual storytelling while keeping the product as the hero element.",
},
{
"name": "Photo-Tilt-Shift Miniature (微缩世界)",
@@ -92,33 +100,29 @@ class LoadKontextPresets_UTK:
"brief": "Describe a specific artistic style for colorizing a black and white image. Based on the user's specific request: $user_prompt$, detail the colorization approach. Specify color palette choices, artistic style influences, mood considerations, and any special effects that enhance the colorization. Go beyond simple colorization to create an artistic interpretation.",
},
{
"name": "Art-Cartoon/Anime Style (卡通漫画化)",
"brief": "Redraw the entire image in a specific animated or illustrated style. Based on the user's specific request: $user_prompt$, describe the cartoon/anime transformation. Specify the artistic style, visual characteristics, color treatment, and any stylistic elements that define the chosen animation or illustration approach.",
"name": "Art-Anime Style Redraw (动漫风格转绘)",
"brief": "Redraw the entire image in a distinct cartoon or anime illustration style, adapting to $user_prompt$. Reinterpret the subject with a consistent anime/cartoon aesthetic while maintaining the core visual identity and proportions. The transformation should include: 1. **Adaptation to Recognizable Anime/Manga Styles**: Automatically match or blend the requested style with well-known influences (e.g., Studio Ghibli's painterly warmth, Makoto Shinkai's realistic lighting, CLAMP's elegant character designs, Tezuka Osamu's retro manga line art, or Akira Toriyama's dynamic shapes). 2. **Distinct Visual Characteristics**: Define line work (thin, delicate outlines or bold, thick manga strokes), shading style (cel shading, painterly anime, or retro halftones), and overall drawing techniques consistent with the chosen style. 3. **Color Treatment**: Apply color palettes suited to the style, such as high-saturation tones for shounen anime, soft pastel shades for slice-of-life, or muted cinematic colors for dramatic anime films. Ensure color grading matches the emotional tone. 4. **Character Redesign**: Adjust character proportions and facial features (e.g., large expressive eyes, simplified shapes, or stylized anatomy) while keeping the subject recognizable and respecting the specified style. 5. **Background & Composition**: Simplify, stylize, or repaint the background in the chosen anime/cartoon style (e.g., hand-painted Ghibli-like landscapes, flat-colored comic panels, or vibrant cityscapes). 6. **Stylistic Detailing**: Add stylistic effects like anime light flares, manga speed lines, screentones, or iconic art motifs when suitable for the scene. Provide a single paragraph describing the transformed image, detailing the chosen anime/cartoon style, line work, shading, color palette, background treatment, and stylistic elements, all tailored to $user_prompt$.",
},
{
"name": "Art-Artistic Style Imitation (艺术风格模仿)",
"brief": "Repaint the entire image in the style of a famous art movement. Based on the user's specific request: $user_prompt$, describe the artistic style transformation. Specify the art movement, its defining characteristics, brushwork techniques, color palette, and any other stylistic elements that capture the essence of the chosen artistic style.",
"name": "Art-Classic Art Movement Style (经典艺术风格模仿)",
"brief": "Repaint the entire image by transforming it into the style of a famous art movement or artistic genre, adapting to $user_prompt$. Analyze the requested style and apply the defining visual characteristics of the chosen art movement, including: 1. **Art Movement Adaptation**: Automatically match the requested artistic style (e.g., Art Nouveau, Impressionism, Abstract Expressionism, Pop Art, Cubism, Surrealism, Renaissance, Bauhaus, Minimalism). If multiple styles are mentioned, blend them cohesively. 2. **Defining Characteristics**: Capture the key visual features of the style: line work, shapes, and composition approaches. For example, flowing organic lines and floral motifs for Art Nouveau, bold flat colors and comic-like outlines for Pop Art, or soft light and loose brushwork for Impressionism. 3. **Brushwork & Texture**: Apply brushstroke techniques and textural qualities characteristic of the style, such as visible impasto strokes for Impressionism or geometric precision for Cubism. 4. **Color Palette & Tone**: Use color schemes that align with the chosen style, e.g., pastel tones for Rococo, vivid primary colors for De Stijl, or deep contrasting hues for Baroque. 5. **Mood & Atmosphere**: Adjust lighting, shading, and overall ambiance to fully reflect the artistic mood of the movement. 6. **Faithful Transformation**: Maintain the subject's recognizability and key visual elements while fully reinterpreting them through the chosen style's lens. Provide a single paragraph describing the transformed image, specifying the art movement, brushstroke technique, color palette, compositional elements, and mood that define the style, all tailored to $user_prompt$.",
},
{
"name": "Art-Pixel Art (像素艺术)",
"brief": "Deconstruct the image into pixel art aesthetic. Based on the user's specific request: $user_prompt$, describe the pixel art transformation. Specify color palette limitations, pixel resolution, dithering techniques, and any retro gaming influences that create authentic pixel art appearance.",
"name": "Art-Hand-Drawn Master Style (手绘模仿大师)",
"brief": "Transform the image into a hand-drawn artistic style, adapting to $user_prompt$. Apply the following principles to ensure an authentic hand-rendered appearance: 1. **Flexible Hand-Drawn Style**: Support multiple drawing approaches such as realistic pencil sketch, manga line art, loose doodles, architectural linework, traditional Chinese gongbi (工笔画), or expressive charcoal drawings, depending on $user_prompt$. 2. **Line Quality & Contour Work**: Adjust line density, thickness, and sharpness to reflect the chosen style (e.g., clean, fine outlines for manga; freehand, rough strokes for doodles; precise contour lines for gongbi). 3. **Shading & Texture Techniques**: Apply appropriate shading methods—cross-hatching, stippling, smooth gradients, or tonal layering—to create depth and dimension. Ensure the shading matches the intended hand-drawn aesthetic. 4. **Surface & Medium Effects**: Simulate realistic paper texture, smudging, or brush marks, depending on the chosen medium (e.g., coarse grain for charcoal, smooth rice paper texture for Chinese brush drawings). 5. **Artistic Composition**: Preserve the subject's proportions and structure while simplifying or abstracting details according to the selected hand-drawn style. 6. **Authentic Artistic Feel**: The final image should look like a hand-rendered artwork, as if created by an artist using traditional tools, with all marks and strokes intentionally placed. Provide one clear paragraph describing the chosen hand-drawn style, line quality, shading technique, texture effects, and overall artistic feel, tailored to $user_prompt$.",
},
{
"name": "Art-Pencil Sketch (铅笔手绘)",
"brief": "Transform the image into a pencil sketch style. Based on the user's specific request: $user_prompt$, describe the pencil sketch transformation. Specify line quality, shading techniques, paper texture effects, and any artistic considerations that create an authentic hand-drawn pencil sketch appearance.",
},
{
"name": "Art-Oil Painting (油画风格)",
"brief": "Transform the image into an oil painting style. Based on the user's specific request: $user_prompt$, describe the oil painting transformation. Specify brushwork techniques, color palette choices, texture effects, and any artistic elements that create an authentic oil painting aesthetic.",
},
{
"name": "Art-Movie Poster (电影海报)",
"brief": "Transform the image into a compelling movie poster. Based on the user's specific request: $user_prompt$, describe the movie poster transformation. Specify the film genre, visual treatment, typography elements, and any cinematic effects that create an authentic movie poster appearance.",
"name": "Art-Cinematic Style Imitation (模仿影视作品风格)",
"brief": "Transform the image into a cinematic movie poster inspired by $user_prompt$, ensuring the result captures the authentic look and feel of a professional film poster. The transformation should include: 1. **Film Genre & Scene Adaptation**: Adapt the poster's mood and elements to match the film genre specified in $user_prompt$ (e.g., action, sci-fi, fantasy, romance, noir, horror, or documentary). If a particular movie or director's style is mentioned, replicate its cinematic aesthetic (e.g., Quentin Tarantino's retro style, Blade Runner's cyberpunk tone, Marvel's vibrant composition). 2. **Cinematic Visual Treatment**: Use dramatic color grading, depth of field, and cinematic lighting to give the poster a high-production-value look. Apply atmospheric effects when needed (e.g., fog, lens flares, film grain) to enhance the movie vibe. 3. **Poster Composition**: Arrange the elements with a clear visual hierarchy: main characters or product as the focal point, supporting elements arranged around it, and a balanced composition inspired by authentic movie posters. 4. **Typography & Title Design**: Add stylized typography elements (e.g., film title, tagline, director name) with fonts and placement consistent with the genre (e.g., bold sans-serif for action, handwritten script for romance, retro serif for vintage films). 5. **Movie Aesthetic Consistency**: If $user_prompt$ specifies a famous film or franchise, match its poster style (e.g., Star Wars space opera layout, Studio Ghibli's illustrated minimalism, or vintage Hollywood posters). 6. **Authentic Storytelling**: Convey the essence of a movie narrative by integrating visual clues (e.g., key props, character poses, environment details) that hint at the film's plot or emotional tone. Provide a single paragraph describing the poster's visual style, genre, typography, composition, and cinematic effects, all tailored to $user_prompt$ while maintaining a professional movie poster appearance.",
},
{
"name": "Art-Technical Blueprint (蓝图视角)",
"brief": "Convert the image into a technical blueprint. Based on the user's specific request: $user_prompt$, describe the blueprint transformation. Specify the technical drawing style, measurement annotations, schematic elements, and any architectural or engineering details that create an authentic technical blueprint appearance.",
},
{
"name": "Art-Digital Caricature Portrait (数字肖像漫画)",
"brief": "Transform the image into a digital painting caricature style based on $user_prompt$, incorporating playful yet appealing exaggerations while maintaining the subject's recognizable identity. Apply the following principles: 1. **Caricature Style & Exaggeration**: Create tasteful exaggerations (larger eyes, expressive facial features, dynamic gestures) while keeping the subject identifiable, adjusting intensity to suit $user_prompt$ (softer stylization for elegant themes, more expressive for humorous themes). 2. **Painterly Aesthetic**: Apply visible brushstrokes, layered color blending, and painterly shading with textured hand-painted finish, adapting color tone and brush style to match $user_prompt$ (pastel tones, dark fantasy, warm retro). 3. **Background & Environment**: Generate a background environment based on $user_prompt$ (sunset cityscape, whimsical forest, vintage café) with semi-stylized look that complements the caricature subject without distraction. 4. **Lighting & Depth**: Use soft cinematic lighting and clear highlights to emphasize depth and texture, adjusting light direction and mood to match the environment described in $user_prompt$. 5. **Detail Preservation**: Maintain the subject's hairstyle, clothing details, and key facial traits while translating them into caricature style without distorting essential attributes. 6. **Composition & Quality**: Ensure the subject remains the main focal point with simplified painterly background, creating a professional digital caricature painting with vibrant colors, sharp focus on the subject, and clean visual storytelling. Describe the final image including caricature intensity, background environment, color palette, brush style, and lighting, all adapted to $user_prompt$ while preserving subject identity.",
},
# === 实用功能类 ===
{
"name": "Utility-Material Transformation (材质置换)",
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,7 +1,7 @@
[project]
name = "universaltoolkit"
description = "A comprehensive toolkit based on ComfyUI, providing image, mask, audio, and tools nodes, fully modular and v3 compatible."
version = "1.2.6"
version = "1.2.8"
license = {file = "LICENSE"}
dependencies = [
"torch",