From 4e2cb62b9fa03e23fd1c3807caaec0635306038d Mon Sep 17 00:00:00 2001 From: Alex Cong Date: Sun, 22 Sep 2024 17:15:43 +0000 Subject: [PATCH] update readme --- README.md | 4 +- workflow/qwen25.json | 543 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 546 insertions(+), 1 deletion(-) create mode 100644 workflow/qwen25.json diff --git a/README.md b/README.md index bcb09f2..47e8c0f 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,15 @@ # ComfyUI Qwen2-VL wrapper ## Sample workflow -You can find a sample [workflow](workflow/Qwen2VL.jsonQwen2VL.json) here. +You can find a sample [workflow](workflow/Qwen2VL.json) here. ![alt text](workflow/comfy_workflow.png) Additionally, you can use Qwen2.5 for text generation ![alt text](workflow/comfy_workflow2.png) +A sample [workflow](workflow/qwen25.json) using both nodes + ## Installation Install from ComfyUI Manager, search for `Qwen2-VL wrapper for ComfyUI` diff --git a/workflow/qwen25.json b/workflow/qwen25.json new file mode 100644 index 0000000..a787530 --- /dev/null +++ b/workflow/qwen25.json @@ -0,0 +1,543 @@ +{ + "last_node_id": 11, + "last_link_id": 13, + "nodes": [ + { + "id": 2, + "type": "Qwen2VL", + "pos": { + "0": 897.4804077148438, + "1": 353.77813720703125 + }, + "size": { + "0": 400, + "1": 244 + }, + "flags": {}, + "order": 7, + "mode": 0, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 11 + } + ], + "outputs": [ + { + "name": "STRING", + "type": "STRING", + "links": [ + 2 + ], + "shape": 3, + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "Qwen2VL" + }, + "widgets_values": [ + "describe this image", + "Qwen2-VL-7B-Instruct", + "8bit", + false, + 0.7, + 512, + 390, + "randomize" + ] + }, + { + "id": 3, + "type": "ShowText|pysssss", + "pos": { + "0": 1344.575439453125, + "1": 396.733154296875 + }, + "size": [ + 395.0648518417968, + 287.97998693191516 + ], + "flags": {}, + "order": 9, + "mode": 0, + "inputs": [ + { + "name": "text", + "type": "STRING", + "link": 2, + "widget": { + "name": "text" + } + } + ], + "outputs": [ + { + "name": "STRING", + "type": "STRING", + "links": null, + "shape": 6 + } + ], + "properties": { + "Node name for S&R": "ShowText|pysssss" + }, + "widgets_values": [ + "", + "This image depicts a vibrant and colorful landscape scene. The sky is filled with a mix of warm and cool colors, transitioning from a bright yellow near the horizon to deeper shades of orange, red, and purple as it moves upwards. The clouds are depicted in various shades of gray, adding depth and texture to the sky.\n\nBelow the sky, there is a lush, green landscape with rolling hills and valleys. The hills are covered in grass and trees, with the trees appearing in shades of green, brown, and orange, suggesting a mix of different types of vegetation. The overall scene has a pixelated, digital art style, giving it a unique and stylized appearance. The landscape extends into the distance, where the hills gradually blend into a more distant, mountainous area." + ] + }, + { + "id": 5, + "type": "EmptyLatentImage", + "pos": { + "0": -110, + "1": 631 + }, + "size": { + "0": 315, + "1": 106 + }, + "flags": {}, + "order": 0, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 3 + ], + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "EmptyLatentImage" + }, + "widgets_values": [ + 512, + 512, + 1 + ] + }, + { + "id": 6, + "type": "CheckpointLoaderSimple", + "pos": { + "0": -206, + "1": 320 + }, + "size": { + "0": 315, + "1": 98 + }, + "flags": {}, + "order": 1, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [ + 4 + ], + "shape": 3 + }, + { + "name": "CLIP", + "type": "CLIP", + "links": [ + 6, + 8 + ], + "shape": 3, + "slot_index": 1 + }, + { + "name": "VAE", + "type": "VAE", + "links": [ + 10 + ], + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "CheckpointLoaderSimple" + }, + "widgets_values": [ + "cyberrealisticPony_v63.safetensors" + ] + }, + { + "id": 8, + "type": "CLIPTextEncode", + "pos": { + "0": 183, + "1": 367 + }, + "size": { + "0": 400, + "1": 200 + }, + "flags": { + "collapsed": true + }, + "order": 3, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 8 + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 7 + ], + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "CLIPTextEncode" + }, + "widgets_values": [ + "" + ] + }, + { + "id": 4, + "type": "KSampler", + "pos": { + "0": 309.4204406738281, + "1": 415.4881591796875 + }, + "size": [ + 315, + 474 + ], + "flags": {}, + "order": 5, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 4 + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": 5 + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": 7 + }, + { + "name": "latent_image", + "type": "LATENT", + "link": 3 + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 9 + ], + "shape": 3, + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "KSampler" + }, + "widgets_values": [ + 648445925704472, + "randomize", + 20, + 8, + "euler", + "normal", + 1 + ] + }, + { + "id": 9, + "type": "VAEDecode", + "pos": { + "0": 609, + "1": 344 + }, + "size": { + "0": 210, + "1": 46 + }, + "flags": { + "collapsed": false + }, + "order": 6, + "mode": 0, + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 9 + }, + { + "name": "vae", + "type": "VAE", + "link": 10 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 11, + 12 + ], + "shape": 3, + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "VAEDecode" + } + }, + { + "id": 10, + "type": "easy cleanGpuUsed", + "pos": { + "0": 657, + "1": 492 + }, + "size": { + "0": 210, + "1": 26 + }, + "flags": {}, + "order": 8, + "mode": 0, + "inputs": [ + { + "name": "anything", + "type": "*", + "link": 12 + } + ], + "outputs": [], + "properties": { + "Node name for S&R": "easy cleanGpuUsed" + } + }, + { + "id": 7, + "type": "CLIPTextEncode", + "pos": { + "0": 204, + "1": 125 + }, + "size": [ + 400, + 200 + ], + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 6 + }, + { + "name": "text", + "type": "STRING", + "link": 13, + "widget": { + "name": "text" + } + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 5 + ], + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "CLIPTextEncode" + }, + "widgets_values": [ + "a landscape" + ] + }, + { + "id": 11, + "type": "Qwen2.5", + "pos": { + "0": -314, + "1": -54 + }, + "size": { + "0": 400, + "1": 294 + }, + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "STRING", + "type": "STRING", + "links": [ + 13 + ], + "shape": 3, + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "Qwen2.5" + }, + "widgets_values": [ + "output image prompt", + "output image prompt of a landscape painting start with a oil landscape painting ", + "Qwen2.5-7B-Instruct", + "8bit", + false, + 0.7, + 512, + 1158, + "randomize" + ] + } + ], + "links": [ + [ + 2, + 2, + 0, + 3, + 0, + "STRING" + ], + [ + 3, + 5, + 0, + 4, + 3, + "LATENT" + ], + [ + 4, + 6, + 0, + 4, + 0, + "MODEL" + ], + [ + 5, + 7, + 0, + 4, + 1, + "CONDITIONING" + ], + [ + 6, + 6, + 1, + 7, + 0, + "CLIP" + ], + [ + 7, + 8, + 0, + 4, + 2, + "CONDITIONING" + ], + [ + 8, + 6, + 1, + 8, + 0, + "CLIP" + ], + [ + 9, + 4, + 0, + 9, + 0, + "LATENT" + ], + [ + 10, + 6, + 2, + 9, + 1, + "VAE" + ], + [ + 11, + 9, + 0, + 2, + 0, + "IMAGE" + ], + [ + 12, + 9, + 0, + 10, + 0, + "*" + ], + [ + 13, + 11, + 0, + 7, + 1, + "STRING" + ] + ], + "groups": [], + "config": {}, + "extra": { + "ds": { + "scale": 0.5131581182307069, + "offset": [ + 887.3532556488585, + 410.7320872804534 + ] + } + }, + "version": 0.4 +} \ No newline at end of file