update readme

This commit is contained in:
Jimmy Wong
2024-08-28 23:03:29 +08:00
parent 84ee9d7d24
commit 600441bd25
6 changed files with 647 additions and 15 deletions
+46 -11
View File
@@ -1,6 +1,14 @@
<div align="center">
<h1>Comflowy 节点</h1>
![Version](https://img.shields.io/badge/node_version-0.1-lightblue?style=for-the-badge&labelColor=darkblue)
<img src="images/comflowy_banner.png" alt="banner"/>
# Comflowy 插件
<div>
![Version](https://img.shields.io/badge/node_version-0.1-lightblue)
<a href="https://discord.gg/cj623WvcVx">
<img src="https://dcbadge.vercel.app/api/server/cj623WvcVx?style=flat" />
</a>
</div>
在开发 Comflowy 产品的时候,我们发现虽然社区里有很多插件,但有不少节点更多的是为了解决特定的问题,或者实现某个特定的技术。在用户体验上,相对没那么友好。
@@ -9,6 +17,25 @@
## 一、节点列表
1. **Comflowy LLM 节点:** 这是一个调用 LLM 的节点。你可以用它来实现类似 Prompt Generator 的功能。它与市面上的 LLM 节点不同的是,它是通过调用 API 的方式获取结果,这就意味着你不需要安装 Ollama 就能调用 LLM 模型。不再需要担心你的电脑配置是否足够运行这些 LLM 模型。**同时它还是免费的**。
* 你可以使用我们的在线版 Comflowy 运行包含此节点的 [工作流](https://app.comflowy.com/template/84bea01c-e109-41f2-89c6-914fc999a1cf) 。
* 也可以下载 [工作流文件](workflows/LLM_CN.json) 并导入到 ComfyUI 里使用。
* <details>
<summary>工作流截图</summary>
<br/>
![image](images/LLM.png)
</detials>
2. **Comflowy Omost 节点:** [Omost](https://github.com/lllyasviel/Omost) 插件是一个能帮助你撰写 Prompt 的插件,但本地运行此插件,需要配置较高的电脑。我们基于对 Omost 的理解,实现了一款类似的节点,但与之稍微不同的是,我们并没有运行 Omost 官方的模型,而是通过 Prompt Engineering 的方式实现。这样运行的速度会更快一些。
* 在线版 [工作流](https://app.comflowy.com/template/1ce47688-4c85-42af-88ad-290f283eb9ec)。
* 本地版 [工作流文件](workflows/Omost_LLM.json) 。
* <details>
<summary>工作流截图</summary>
<br/>
![image](images/Omost_LLM.png)
</detials>
## 二、如何使用
> [!NOTE]
@@ -17,15 +44,19 @@
<details>
<summary>Step 1: 安装 Comflowy 插件</summary>
- 方法一:使用 [ComfyUI Manager](https://github.com/ltdrdata/ComfyUI-Manager) 安装(推荐)
- 方法二:Git 安装
CompyUI插件目录(例如“CompyUI\custom_nodes\”)中打开cmd窗口,键入以下命令:
- 方法一:使用 [ComfyUI Manager](https://github.com/ltdrdata/ComfyUI-Manager) 安装(推荐)
- 方法二:Git 安装
CompyUI插件目录(例如“CompyUI\custom_nodes\”)中打开cmd窗口,键入以下命令:
```shell
git clone https://github.com/chflame163/ComfyUI_LayerStyle.git
```
- 方法三:下载zip文件
- 方法三:下载zip文件
或者下载解压zip文件,将得到的文件夹复制到 ```ComfyUI\custom_nodes\``` 目录下。
</details>
<details>
@@ -44,12 +75,16 @@
![image](images/API_Key_Node.png)
</details>
## 更新记录
## 三、更新记录
* V0.1:支持 LLM 节点、Omost 节点、Http 节点。
## 四、感谢
## 感谢
1. 感谢 [SiliconFlow](https://siliconflow.cn/) 提供的免费 LLM 服务。
2. 感谢所有为此开源项目做出贡献的人:
2. 感谢 [Omost](https://github.com/lllyasviel/Omost) 作者以及 [ComfyUI-Omost](https://github.com/huchenlei/ComfyUI_omost?tab=readme-ov-file) 插件的作者。
3. 感谢所有为此开源项目做出贡献的人:
<a href="https://github.com/6174/comflowy-nodes/graphs/contributors">
<img src="https://contrib.rocks/image?repo=6174/comflowy-nodes" />
</a>
</a>
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 988 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 891 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 872 KiB

+4 -4
View File
@@ -390,7 +390,7 @@
"一艘古代战舰",
"# Role: Stable Diffusion prompt 助理\n你来充当一位有艺术气息的Stable Diffusion prompt 助理。\n\n## 任务\n我用自然语言告诉你要生成的prompt的主题,你的任务是根据这个主题想象一幅完整的画面,然后转化成一份详细的、高质量的prompt,让Stable Diffusion可以生成高质量的图像。\n\n## 背景介绍\nStable Diffusion是一款利用深度学习的文生图模型,支持通过使用 prompt 来产生新的图像,描述要包含或省略的元素。\n\n## prompt 概念\n- prompt 用来描述图像,由普通常见的单词构成,使用英文半角\",\"做为分隔符。\n- negative prompt用来描述你不想在生成的图像中出现的内容。\n- 以\",\"分隔的每个单词或词组称为 tag。所以prompt是由系列由\",\"分隔的tag组成的。\n\n## () 和 [] 语法\n调整关键字强度的等效方法是使用 () 和 []。 (keyword) 将tag的强度增加 1.1 倍,与 (keyword:1.1) 相同,最多可加三层。 [keyword] 将强度降低 0.9 倍,与 (keyword:0.9) 相同。\n\n## Prompt 格式要求\n下面我将说明 prompt 的生成步骤,这里的 prompt 可用于描述人物、风景、物体或抽象数字艺术图画。你可以根据需要添加合理的、但不少于5处的画面细节。\n\n### prompt 要求\n- prompt 内容包含画面主体、材质、附加细节、图像质量、艺术风格、色彩色调、灯光等部分,但你输出的 prompt 不能分段,例如类似\"medium:\"这样的分段描述是不需要的,也不能包含\":\"和\".\"。\n- 画面主体:不简短的英文描述画面主体, 如 A girl in a garden,主体细节概括(主体可以是人、事、物、景)画面核心内容。这部分根据我每次给你的主题来生成。你可以添加更多主题相关的合理的细节。\n- 对于人物主题,你必须描述人物的眼睛、鼻子、嘴唇,例如'beautiful detailed eyes,beautiful detailed lips,extremely detailed eyes and face,longeyelashes',以免Stable Diffusion随机生成变形的面部五官,这点非常重要。你还可以描述人物的外表、情绪、衣服、姿势、视角、动作、背景等。人物属性中,1girl表示一个女孩,2girls表示两个女孩。\n- 材质:用来制作艺术品的材料。 例如:插图、油画、3D 渲染和摄影。 Medium 有很强的效果,因为一个关键字就可以极大地改变风格。\n- 附加细节:画面场景细节,或人物细节,描述画面细节内容,让图像看起来更充实和合理。这部分是可选的,要注意画面的整体和谐,不能与主题冲突。\n- 图像质量:这部分内容开头永远要加上“(best quality,4k,8k,highres,masterpiece:1.2),ultra-detailed,(realistic,photorealistic,photo-realistic:1.37)”, 这是高质量的标志。其它常用的提高质量的tag还有,你可以根据主题的需求添加:HDR,UHD,studio lighting,ultra-fine painting,sharp focus,physically-based rendering,extreme detail description,professional,vivid colors,bokeh。\n- 艺术风格:这部分描述图像的风格。加入恰当的艺术风格,能提升生成的图像效果。常用的艺术风格例如:portraits,landscape,horror,anime,sci-fi,photography,concept artists等。\n- 色彩色调:颜色,通过添加颜色来控制画面的整体颜色。\n- 灯光:整体画面的光线效果。\n\n### 限制:\n- tag 内容用英语单词或短语来描述,并不局限于我给你的单词。注意只能包含关键词或词组。\n- 注意不要输出句子,不要有任何解释。\n- tag数量限制40个以内,单词数量限制在60个以内。\n- tag不要带引号(\"\")。\n- 使用英文半角\",\"做分隔符。\n- tag 按重要性从高到低的顺序排列。\n- 我给你的主题可能是用中文描述,你给出的prompt和negative prompt只用英文,不要包含中文。",
"THUDM/glm-4-9b-chat",
"b27f6e3a981156a0ccc4d5a1106f206c",
"",
28799307290994,
"randomize",
false,
@@ -492,10 +492,10 @@
"config": {},
"extra": {
"ds": {
"scale": 0.9090909090909091,
"scale": 0.8264462809917354,
"offset": [
230.4790014253979,
403.7018017828828
255.78564012490165,
461.2748835297254
]
}
},
+597
View File
@@ -0,0 +1,597 @@
{
"last_node_id": 23,
"last_link_id": 20,
"nodes": [
{
"id": 5,
"type": "EmptyLatentImage",
"pos": [
473,
609
],
"size": {
"0": 315,
"1": 106
},
"flags": {},
"order": 0,
"mode": 0,
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
2
],
"slot_index": 0,
"label": "LATENT"
}
],
"properties": {
"Node name for S&R": "EmptyLatentImage"
},
"widgets_values": [
512,
512,
1
]
},
{
"id": 8,
"type": "VAEDecode",
"pos": [
1209,
188
],
"size": {
"0": 210,
"1": 46
},
"flags": {},
"order": 9,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 7,
"label": "samples"
},
{
"name": "vae",
"type": "VAE",
"link": 8,
"label": "vae"
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
9
],
"slot_index": 0,
"label": "IMAGE"
}
],
"properties": {
"Node name for S&R": "VAEDecode"
}
},
{
"id": 3,
"type": "KSampler",
"pos": [
863,
186
],
"size": {
"0": 338.0391540527344,
"1": 571.4179077148438
},
"flags": {},
"order": 7,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 1,
"label": "model"
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 16,
"label": "positive"
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 6,
"label": "negative"
},
{
"name": "latent_image",
"type": "LATENT",
"link": 2,
"label": "latent_image"
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
7
],
"slot_index": 0,
"label": "LATENT"
}
],
"properties": {
"Node name for S&R": "KSampler"
},
"widgets_values": [
222261456855657,
"randomize",
20,
8,
"dpmpp_2m",
"karras",
1
]
},
{
"id": 9,
"type": "SaveImage",
"pos": [
1451,
189
],
"size": {
"0": 239.60360717773438,
"1": 334.3671569824219
},
"flags": {},
"order": 10,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 9,
"label": "images"
}
],
"properties": {
"Node name for S&R": "SaveImage"
},
"widgets_values": [
"ComfyUI"
]
},
{
"id": 17,
"type": "Comflowy_Omost_To_Conditioning",
"pos": [
400,
122
],
"size": {
"0": 317.4000244140625,
"1": 126
},
"flags": {},
"order": 4,
"mode": 0,
"inputs": [
{
"name": "canvas_conds",
"type": "OMOST_CANVAS_CONDITIONING",
"link": 15,
"label": "canvas_conds"
},
{
"name": "clip",
"type": "CLIP",
"link": 14,
"label": "clip"
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
16
],
"slot_index": 0,
"shape": 3,
"label": "CONDITIONING"
}
],
"properties": {
"Node name for S&R": "Comflowy_Omost_To_Conditioning"
},
"widgets_values": [
0.2,
0.8,
"average"
]
},
{
"id": 7,
"type": "CLIPTextEncode",
"pos": [
408,
348
],
"size": {
"0": 425.27801513671875,
"1": 180.6060791015625
},
"flags": {},
"order": 3,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 5,
"label": "clip"
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
6
],
"slot_index": 0,
"label": "CONDITIONING"
}
],
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
"text, watermark",
false
]
},
{
"id": 4,
"type": "CheckpointLoaderSimple",
"pos": [
-127,
394
],
"size": {
"0": 315,
"1": 98
},
"flags": {},
"order": 1,
"mode": 0,
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"links": [
1
],
"slot_index": 0,
"label": "MODEL"
},
{
"name": "CLIP",
"type": "CLIP",
"links": [
5,
14
],
"slot_index": 1,
"label": "CLIP"
},
{
"name": "VAE",
"type": "VAE",
"links": [
8
],
"slot_index": 2,
"label": "VAE"
}
],
"properties": {
"Node name for S&R": "CheckpointLoaderSimple"
},
"widgets_values": [
"dreamshaper_8.safetensors"
]
},
{
"id": 22,
"type": "Comflowy_Omost_Preview",
"pos": [
-198,
148
],
"size": {
"0": 229.20001220703125,
"1": 46
},
"flags": {},
"order": 5,
"mode": 0,
"inputs": [
{
"name": "canvas_conds",
"type": "OMOST_CANVAS_CONDITIONING",
"link": 19,
"label": "canvas_conds"
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
20
],
"slot_index": 0,
"shape": 3,
"label": "IMAGE"
},
{
"name": "JSON",
"type": "JSON",
"links": null,
"shape": 3,
"label": "JSON"
}
],
"properties": {
"Node name for S&R": "Comflowy_Omost_Preview"
}
},
{
"id": 14,
"type": "ShowText|pysssss",
"pos": [
-216,
-299
],
"size": [
328.5512870484456,
374.97700441128086
],
"flags": {},
"order": 6,
"mode": 0,
"inputs": [
{
"name": "text",
"type": "STRING",
"link": 13,
"widget": {
"name": "text"
},
"label": "text"
}
],
"outputs": [
{
"name": "STRING",
"type": "STRING",
"links": null,
"shape": 6,
"label": "STRING"
}
],
"properties": {
"Node name for S&R": "ShowText|pysssss"
},
"widgets_values": [
"",
"\n\n{\n \"global_description\": {\n \"description\": \"An ancient warship, weathered by time, dominates the center of the canvas.\",\n \"detailed_descriptions\": [\n \"The hull is covered in barnacles and moss, hinting at its long journey across the seas.\",\n \"The sails are tattered and faded, yet they still hold a sense of grandeur.\",\n \"The ship's rigging is intricate, showcasing the craftsmanship of a bygone era.\"\n ],\n \"tags\": \"ancient, warship, sea, weathered, barnacles, moss, sails, rigging\",\n \"HTML_web_color_name\": \"navy\"\n },\n \"local_descriptions\": [\n {\n \"location\": \"center\",\n \"offset\": \"no\",\n \"area\": \"a large square area\",\n \"distance_to_viewer\": 10.0,\n \"description\": \"An ancient warship stands prominently, its silhouette against the horizon.\",\n \"detailed_descriptions\": [\n \"The warship's silhouette is defined by its towering masts and the curve of its hull.\",\n \"The ship is adorned with intricate carvings and symbols of ancient cultures.\"\n ],\n \"tags\": \"ancient, warship, silhouette, masts, hull, carvings, symbols\",\n \"atmosphere\": \"nostalgic, mysterious\",\n \"style\": \"realistic\",\n \"quality_meta\": \"vivid\",\n \"HTML_web_color_name\": \"navy\"\n },\n {\n \"location\": \"top-right\",\n \"offset\": \"upper-right\",\n \"area\": \"a small square area\",\n \"distance_to_viewer\": 7.0,\n \"description\": \"A distant view of the ship's stern, with a flag waving in the breeze.\",\n \"detailed_descriptions\": [\n \"The flag is a deep red, symbolizing the bravery of the crew who once sailed this vessel.\"\n ],\n \"tags\": \"ship's stern, flag, red, bravery\",\n \"atmosphere\": \"victorious, nostalgic\",\n \"style\": \"realistic\",\n \"quality_meta\": \"vivid\",\n \"HTML_web_color_name\": \"crimson\"\n }\n ]\n}\n"
]
},
{
"id": 23,
"type": "PreviewImage",
"pos": [
138,
87
],
"size": [
210,
246
],
"flags": {},
"order": 8,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 20,
"label": "images"
}
],
"properties": {
"Node name for S&R": "PreviewImage"
}
},
{
"id": 16,
"type": "Comflowy_Omost_LLM",
"pos": [
-695,
-31
],
"size": {
"0": 400,
"1": 200
},
"flags": {},
"order": 2,
"mode": 0,
"outputs": [
{
"name": "canvas_conds",
"type": "OMOST_CANVAS_CONDITIONING",
"links": [
15,
19
],
"slot_index": 0,
"shape": 3,
"label": "canvas_conds"
},
{
"name": "generated_text",
"type": "STRING",
"links": [
13
],
"slot_index": 1,
"shape": 3,
"label": "generated_text"
}
],
"properties": {
"Node name for S&R": "Comflowy_Omost_LLM"
},
"widgets_values": [
"An ancient warship",
"THUDM/glm-4-9b-chat",
"",
673046078093462,
"randomize",
false
]
}
],
"links": [
[
1,
4,
0,
3,
0,
"MODEL"
],
[
2,
5,
0,
3,
3,
"LATENT"
],
[
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"
],
[
13,
16,
1,
14,
0,
"STRING"
],
[
14,
4,
1,
17,
1,
"CLIP"
],
[
15,
16,
0,
17,
0,
"OMOST_CANVAS_CONDITIONING"
],
[
16,
17,
0,
3,
1,
"CONDITIONING"
],
[
19,
16,
0,
22,
0,
"OMOST_CANVAS_CONDITIONING"
],
[
20,
22,
0,
23,
0,
"IMAGE"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 0.6209213230591554,
"offset": [
739.9752097484295,
420.49411898715607
]
}
},
"version": 0.4
}