diff --git a/README.md b/README.md index 0cced85..dba4b8b 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,10 @@ -# HuggingFace Diffusers for ComfyUI +# HuggingFace Diffusers (and Transformers) for ComfyUI A lot of custom nodes for ComfyUI are really just bindings to HuggingFace -Diffusers, but overly constrained to use them in very particular ways. This set -of custom nodes is intended to be a generic set of bindings for HuggingFace -Diffusers, in theory allowing you to use any pipeline supported by HuggingFace. +Diffusers and/or Transformers, but overly constrained to use them in very +particular ways. This set of custom nodes is intended to be a generic set of +bindings for HuggingFace Diffusers and Transformers, in theory allowing you to +use any pipeline supported by HuggingFace. It also supports bitsandbytes quantization, automatic device mapping, and the other advantages unique to HuggingFace. @@ -17,7 +18,9 @@ I recommend ## Philosophy I've tried to make everything work fairly generically, as unopinionated as I -can manage. +can manage. There are no nodes for specialized tasks. For example, while this +node set is capable of being used for prompt enhancement, there is no “prompt +enhancement” node, because that's simply built from a text-to-text pipeline. Every node that loads a component has some default class that it loads, but you can replace the class simply by its name. For instance, the pipeline loader @@ -42,23 +45,18 @@ set them to `null` (`None`). These are some example workflows, in simple and exploded forms (where by “exploded” I mean “each step done separately”). -[GLM-Image](workflows/hf_glm_image.json) ([exploded])(workflows/hf_glm_image_exploded.json)) +[GLM-Image](workflows/hf_glm_image.json) ([exploded](workflows/hf_glm_image_exploded.json)) (Note: As of the writing of this README, requires the git version of both Diffusers and Transformers.) ![GLM-Image](workflows/hf_glm_image.webp) ![GLM-Image, exploded](workflows/hf_glm_image_exploded.webp) -[LongCat Image](workflows/hf_longcat_image.json) ([exploded](workflows/hf_longcat_image_exploded.json)) -(Note: Requires [my PR](https://github.com/huggingface/diffusers/pull/12963) to + * [Prompt enhancer](workflows/hf_prompt_enhancer.json) ([image](workflows/hf_prompt_enhancer.webp)) + * [LongCat Image](workflows/hf_longcat_image.json) ([exploded](workflows/hf_longcat_image_exploded.json), [image](workflows/hf_longcat_image.webp), [image exploded](workflows/hf_longcat_image_exploded.webp)) + * (Note: Requires [my PR](https://github.com/huggingface/diffusers/pull/12963) to use quantization.) - -![LongCat Image](workflows/hf_longcat_image.webp) -![LongCat Image, exploded](workflows/hf_longcat_image_exploded.webp) - -[SDXL](workflows/hf_sdxl.json) ([exploded](workflows/hf_sdxl_exploded.json)) - -![SDXL](workflows/hf_sdxl.webp) -![SDXL, exploded](workflows/hf_sdxl_exploded.webp) + * [SDXL](workflows/hf_sdxl.json) ([exploded](workflows/hf_sdxl_exploded.json), [image](workflows/hf_sdxl.webp), [image exploded](workflows/hf_sdxl_exploded.webp)) + * [AI trash converter](workflows/hf_make_ai_trash.json) ([image](workflows/hf_make_ai_trash.webp)) ## Nodes @@ -131,3 +129,28 @@ Some examples: Use these to decode/encode HuggingFace latents using HuggingFace VAEs. Automatic if pipelines are run in PIL mode. + +### HF Transformers load pipeline + +Load a HuggingFace *Transformers* (not Diffusers) pipeline. Useful for using an +LLM or VLM as part of a larger workflow, such as prompt enhancement or image +description. + +### HF Transformers create conversation + +Create or extend a conversation in the style used by HuggingFace Transformers. +Can include text or images. To create a multi-turn conversation, create +multiple “create conversation” nodes and chain them together. + +### HF Transformers unpack conversation + +Unpack a part of a conversation in HuggingFace Transformers format. Mostly +useful for unpacking the output of a Transformers pipeline. + +### HF Transformers run pipeline + +Run a HuggingFace Transformers pipeline. Takes anything as input, but for most +pipelines, you want a conversation as input. Outputs the raw result, and if a +conversation was generated, also outputs the extracted conversation. In most +cases, you will want to pass that conversation into an “unpack conversation” +node. diff --git a/workflows/hf_make_ai_trash.json b/workflows/hf_make_ai_trash.json new file mode 100644 index 0000000..bffa5a2 --- /dev/null +++ b/workflows/hf_make_ai_trash.json @@ -0,0 +1,1102 @@ +{ + "id": "cb3a9f62-0c68-4a23-b143-7ffeca8a3d24", + "revision": 0, + "last_node_id": 24, + "last_link_id": 25, + "nodes": [ + { + "id": 10, + "type": "ImageScale", + "pos": [ + 1170, + 450 + ], + "size": [ + 270, + 130 + ], + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 6 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 7 + ] + } + ], + "properties": { + "Node name for S&R": "ImageScale" + }, + "widgets_values": [ + "lanczos", + 512, + 512, + "center" + ] + }, + { + "id": 6, + "type": "HFTRunPipeline", + "pos": [ + 1150, + 280 + ], + "size": [ + 292.8333343505859, + 126 + ], + "flags": {}, + "order": 9, + "mode": 0, + "inputs": [ + { + "name": "pipeline", + "type": "HFT_PIPELINE", + "link": 3 + }, + { + "name": "input", + "shape": 7, + "type": "*", + "link": 4 + } + ], + "outputs": [ + { + "name": "raw_result", + "type": "HFT_RESULT", + "links": null + }, + { + "name": "conversation", + "type": "HFT_CONVERSATION", + "links": [ + 5 + ] + } + ], + "properties": { + "Node name for S&R": "HFTRunPipeline" + }, + "widgets_values": [ + 1, + "fixed", + "{\"max_new_tokens\": 128}" + ] + }, + { + "id": 20, + "type": "ImageScaleToTotalPixels", + "pos": [ + 660, + 300 + ], + "size": [ + 270, + 106 + ], + "flags": {}, + "order": 5, + "mode": 0, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 17 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 18 + ] + } + ], + "properties": { + "Node name for S&R": "ImageScaleToTotalPixels" + }, + "widgets_values": [ + "lanczos", + 1, + 1 + ] + }, + { + "id": 5, + "type": "ImageToPIL", + "pos": [ + 690, + 480 + ], + "size": [ + 147.48333358764648, + 26 + ], + "flags": {}, + "order": 7, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 18 + } + ], + "outputs": [ + { + "name": "PIL_IMAGE", + "type": "PIL_IMAGE", + "links": [ + 2 + ] + } + ], + "properties": { + "Node name for S&R": "ImageToPIL" + }, + "widgets_values": [] + }, + { + "id": 2, + "type": "HFTLoadPipeline", + "pos": [ + 300, + 330 + ], + "size": [ + 299.3666595458984, + 202 + ], + "flags": {}, + "order": 0, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "HFT_PIPELINE", + "type": "HFT_PIPELINE", + "links": [ + 3 + ] + } + ], + "properties": { + "Node name for S&R": "HFTLoadPipeline" + }, + "widgets_values": [ + "image-text-to-text", + "", + "Qwen/Qwen3-VL-2B-Instruct", + "default", + "default", + "{\"attn_implementation\": \"flash_attention_2\"}", + "" + ] + }, + { + "id": 3, + "type": "HFTCreateConversation", + "pos": [ + 650, + 590 + ], + "size": [ + 400, + 200 + ], + "flags": {}, + "order": 8, + "mode": 0, + "inputs": [ + { + "name": "previous", + "shape": 7, + "type": "HFT_CONVERSATION", + "link": null + }, + { + "name": "image", + "shape": 7, + "type": "PIL_IMAGE", + "link": 2 + } + ], + "outputs": [ + { + "name": "HFT_CONVERSATION", + "type": "HFT_CONVERSATION", + "links": [ + 4 + ] + } + ], + "properties": { + "Node name for S&R": "HFTCreateConversation" + }, + "widgets_values": [ + "user", + "Caption this image." + ] + }, + { + "id": 7, + "type": "HFTUnpackConversation", + "pos": [ + 1460, + 330 + ], + "size": [ + 353.3333343505859, + 98 + ], + "flags": {}, + "order": 10, + "mode": 0, + "inputs": [ + { + "name": "conversation", + "type": "HFT_CONVERSATION", + "link": 5 + } + ], + "outputs": [ + { + "name": "role", + "type": "STRING", + "links": null + }, + { + "name": "text", + "type": "STRING", + "links": [ + 10, + 15, + 19 + ] + }, + { + "name": "image", + "type": "PIL_IMAGE", + "links": null + } + ], + "properties": { + "Node name for S&R": "HFTUnpackConversation" + }, + "widgets_values": [ + -1 + ] + }, + { + "id": 8, + "type": "HFDLoadPipeline", + "pos": [ + 1500, + 470 + ], + "size": [ + 314.6333312988281, + 198 + ], + "flags": {}, + "order": 1, + "mode": 0, + "inputs": [ + { + "name": "vae", + "shape": 7, + "type": "HFD_AUTOENCODERKL", + "link": null + }, + { + "name": "text_encoder", + "shape": 7, + "type": "HFT_MODEL", + "link": null + } + ], + "outputs": [ + { + "name": "HFD_PIPELINE", + "type": "HFD_PIPELINE", + "links": [ + 9, + 20 + ] + }, + { + "name": "HFD_AUTOENCODERKL", + "type": "HFD_AUTOENCODERKL", + "links": null + } + ], + "properties": { + "Node name for S&R": "HFDLoadPipeline" + }, + "widgets_values": [ + "AmusedImg2ImgPipeline", + "amused/amused-512", + "default", + false, + "default", + "" + ] + }, + { + "id": 11, + "type": "ImageToPIL", + "pos": [ + 1290, + 630 + ], + "size": [ + 147.48333358764648, + 26 + ], + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 7 + } + ], + "outputs": [ + { + "name": "PIL_IMAGE", + "type": "PIL_IMAGE", + "links": [ + 8, + 21 + ] + } + ], + "properties": { + "Node name for S&R": "ImageToPIL" + }, + "widgets_values": [] + }, + { + "id": 12, + "type": "PILToImage", + "pos": [ + 2220, + 330 + ], + "size": [ + 140, + 26 + ], + "flags": {}, + "order": 14, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "PIL_IMAGE", + "link": 11 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 13 + ] + } + ], + "properties": { + "Node name for S&R": "PILToImage" + }, + "widgets_values": [] + }, + { + "id": 14, + "type": "ImageUpscaleWithModel", + "pos": [ + 2500, + 330 + ], + "size": [ + 233.53333129882813, + 46 + ], + "flags": {}, + "order": 16, + "mode": 0, + "inputs": [ + { + "name": "upscale_model", + "type": "UPSCALE_MODEL", + "link": 12 + }, + { + "name": "image", + "type": "IMAGE", + "link": 13 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 14 + ] + } + ], + "properties": { + "Node name for S&R": "ImageUpscaleWithModel" + }, + "widgets_values": [] + }, + { + "id": 23, + "type": "ImageUpscaleWithModel", + "pos": [ + 2500, + 790 + ], + "size": [ + 233.53333129882813, + 46 + ], + "flags": {}, + "order": 17, + "mode": 0, + "inputs": [ + { + "name": "upscale_model", + "type": "UPSCALE_MODEL", + "link": 25 + }, + { + "name": "image", + "type": "IMAGE", + "link": 22 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 23 + ] + } + ], + "properties": { + "Node name for S&R": "ImageUpscaleWithModel" + }, + "widgets_values": [] + }, + { + "id": 24, + "type": "SaveImage", + "pos": [ + 2750, + 790 + ], + "size": [ + 270, + 270 + ], + "flags": {}, + "order": 19, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 23 + } + ], + "outputs": [], + "properties": {}, + "widgets_values": [ + "ComfyUI" + ] + }, + { + "id": 22, + "type": "PILToImage", + "pos": [ + 2220, + 790 + ], + "size": [ + 140, + 26 + ], + "flags": {}, + "order": 15, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "PIL_IMAGE", + "link": 24 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 22 + ] + } + ], + "properties": { + "Node name for S&R": "PILToImage" + }, + "widgets_values": [] + }, + { + "id": 13, + "type": "UpscaleModelLoader", + "pos": [ + 2220, + 540 + ], + "size": [ + 270, + 58 + ], + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "UPSCALE_MODEL", + "type": "UPSCALE_MODEL", + "links": [ + 12, + 25 + ] + } + ], + "properties": { + "Node name for S&R": "UpscaleModelLoader" + }, + "widgets_values": [ + "002_lightweightSR_DIV2K_s64w8_SwinIR-S_x2.pth" + ] + }, + { + "id": 15, + "type": "SaveImage", + "pos": [ + 2750, + 330 + ], + "size": [ + 270, + 270 + ], + "flags": {}, + "order": 18, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 14 + } + ], + "outputs": [], + "properties": {}, + "widgets_values": [ + "ComfyUI" + ] + }, + { + "id": 9, + "type": "HFDRunPipeline", + "pos": [ + 1840, + 330 + ], + "size": [ + 357.61667251586914, + 420 + ], + "flags": {}, + "order": 11, + "mode": 0, + "inputs": [ + { + "name": "pipeline", + "type": "HFD_PIPELINE", + "link": 9 + }, + { + "name": "image", + "shape": 7, + "type": "PIL_IMAGE", + "link": 8 + }, + { + "name": "mask_image", + "shape": 7, + "type": "PIL_IMAGE", + "link": null + }, + { + "name": "latents", + "shape": 7, + "type": "LATENT", + "link": null + }, + { + "name": "prompt_embeds", + "shape": 7, + "type": "TENSOR", + "link": null + }, + { + "name": "pooled_prompt_embeds", + "shape": 7, + "type": "TENSOR", + "link": null + }, + { + "name": "negative_prompt_embeds", + "shape": 7, + "type": "TENSOR", + "link": null + }, + { + "name": "negative_pooled_prompt_embeds", + "shape": 7, + "type": "TENSOR", + "link": null + }, + { + "name": "prompt", + "type": "STRING", + "widget": { + "name": "prompt" + }, + "link": 10 + } + ], + "outputs": [ + { + "name": "PIL_IMAGE", + "type": "PIL_IMAGE", + "links": [ + 11 + ] + }, + { + "name": "LATENT", + "type": "LATENT", + "links": null + } + ], + "properties": { + "Node name for S&R": "HFDRunPipeline" + }, + "widgets_values": [ + "a photo of an astronaut riding a horse on mars", + "", + 0, + 0, + 1, + "fixed", + 0, + "pil", + "{\"strength\": 0.25}" + ] + }, + { + "id": 18, + "type": "PreviewAny", + "pos": [ + 1850, + 110 + ], + "size": [ + 210, + 166 + ], + "flags": {}, + "order": 12, + "mode": 0, + "inputs": [ + { + "name": "source", + "type": "*", + "link": 15 + } + ], + "outputs": [], + "properties": { + "Node name for S&R": "PreviewAny" + }, + "widgets_values": [ + null, + null, + null + ] + }, + { + "id": 21, + "type": "HFDRunPipeline", + "pos": [ + 1840, + 790 + ], + "size": [ + 357.61667251586914, + 420 + ], + "flags": {}, + "order": 13, + "mode": 0, + "inputs": [ + { + "name": "pipeline", + "type": "HFD_PIPELINE", + "link": 20 + }, + { + "name": "image", + "shape": 7, + "type": "PIL_IMAGE", + "link": 21 + }, + { + "name": "mask_image", + "shape": 7, + "type": "PIL_IMAGE", + "link": null + }, + { + "name": "latents", + "shape": 7, + "type": "LATENT", + "link": null + }, + { + "name": "prompt_embeds", + "shape": 7, + "type": "TENSOR", + "link": null + }, + { + "name": "pooled_prompt_embeds", + "shape": 7, + "type": "TENSOR", + "link": null + }, + { + "name": "negative_prompt_embeds", + "shape": 7, + "type": "TENSOR", + "link": null + }, + { + "name": "negative_pooled_prompt_embeds", + "shape": 7, + "type": "TENSOR", + "link": null + }, + { + "name": "prompt", + "type": "STRING", + "widget": { + "name": "prompt" + }, + "link": 19 + } + ], + "outputs": [ + { + "name": "PIL_IMAGE", + "type": "PIL_IMAGE", + "links": [ + 24 + ] + }, + { + "name": "LATENT", + "type": "LATENT", + "links": null + } + ], + "properties": { + "Node name for S&R": "HFDRunPipeline" + }, + "widgets_values": [ + "a photo of an astronaut riding a horse on mars", + "", + 0, + 0, + 1, + "fixed", + 0, + "pil", + "{\"strength\": 0.5}" + ] + }, + { + "id": 4, + "type": "LoadImageFromPath", + "pos": [ + 300, + 580 + ], + "size": [ + 270, + 78 + ], + "flags": {}, + "order": 3, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 6, + 17 + ] + }, + { + "name": "MASK", + "type": "MASK", + "links": null + } + ], + "properties": { + "Node name for S&R": "LoadImageFromPath" + }, + "widgets_values": [ + "peace-treaty.png" + ] + } + ], + "links": [ + [ + 2, + 5, + 0, + 3, + 1, + "PIL_IMAGE" + ], + [ + 3, + 2, + 0, + 6, + 0, + "HFT_PIPELINE" + ], + [ + 4, + 3, + 0, + 6, + 1, + "HFT_CONVERSATION" + ], + [ + 5, + 6, + 1, + 7, + 0, + "HFT_CONVERSATION" + ], + [ + 6, + 4, + 0, + 10, + 0, + "IMAGE" + ], + [ + 7, + 10, + 0, + 11, + 0, + "IMAGE" + ], + [ + 8, + 11, + 0, + 9, + 1, + "PIL_IMAGE" + ], + [ + 9, + 8, + 0, + 9, + 0, + "HFD_PIPELINE" + ], + [ + 10, + 7, + 1, + 9, + 8, + "STRING" + ], + [ + 11, + 9, + 0, + 12, + 0, + "PIL_IMAGE" + ], + [ + 12, + 13, + 0, + 14, + 0, + "UPSCALE_MODEL" + ], + [ + 13, + 12, + 0, + 14, + 1, + "IMAGE" + ], + [ + 14, + 14, + 0, + 15, + 0, + "IMAGE" + ], + [ + 15, + 7, + 1, + 18, + 0, + "STRING" + ], + [ + 17, + 4, + 0, + 20, + 0, + "IMAGE" + ], + [ + 18, + 20, + 0, + 5, + 0, + "IMAGE" + ], + [ + 19, + 7, + 1, + 21, + 8, + "STRING" + ], + [ + 20, + 8, + 0, + 21, + 0, + "HFD_PIPELINE" + ], + [ + 21, + 11, + 0, + 21, + 1, + "PIL_IMAGE" + ], + [ + 22, + 22, + 0, + 23, + 1, + "IMAGE" + ], + [ + 23, + 23, + 0, + 24, + 0, + "IMAGE" + ], + [ + 24, + 21, + 0, + 22, + 0, + "PIL_IMAGE" + ], + [ + 25, + 13, + 0, + 23, + 0, + "UPSCALE_MODEL" + ] + ], + "groups": [], + "config": {}, + "extra": { + "ds": { + "scale": 0.578102189781022, + "offset": [ + 0.6060606060602822, + 141.19318181818164 + ] + }, + "workflowRendererVersion": "LG", + "frontendVersion": "1.35.9", + "VHS_latentpreview": false, + "VHS_latentpreviewrate": 0, + "VHS_MetadataImage": true, + "VHS_KeepIntermediate": true + }, + "version": 0.4 +} \ No newline at end of file diff --git a/workflows/hf_make_ai_trash.webp b/workflows/hf_make_ai_trash.webp new file mode 100644 index 0000000..1fa425d Binary files /dev/null and b/workflows/hf_make_ai_trash.webp differ diff --git a/workflows/hf_prompt_enhancer.json b/workflows/hf_prompt_enhancer.json new file mode 100644 index 0000000..81fb547 --- /dev/null +++ b/workflows/hf_prompt_enhancer.json @@ -0,0 +1,690 @@ +{ + "id": "ec755963-7a99-4853-a631-e26edbd62658", + "revision": 0, + "last_node_id": 14, + "last_link_id": 15, + "nodes": [ + { + "id": 6, + "type": "HFTUnpackConversation", + "pos": [ + 1750, + 290 + ], + "size": [ + 353.3333343505859, + 98 + ], + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [ + { + "name": "conversation", + "type": "HFT_CONVERSATION", + "link": 4 + } + ], + "outputs": [ + { + "name": "role", + "type": "STRING", + "links": null + }, + { + "name": "text", + "type": "STRING", + "links": [ + 5, + 6 + ] + }, + { + "name": "image", + "type": "PIL_IMAGE", + "links": null + } + ], + "properties": { + "Node name for S&R": "HFTUnpackConversation" + }, + "widgets_values": [ + -1 + ] + }, + { + "id": 11, + "type": "ConditioningZeroOut", + "pos": [ + 2180, + 520 + ], + "size": [ + 204.0999984741211, + 26 + ], + "flags": {}, + "order": 9, + "mode": 0, + "inputs": [ + { + "name": "conditioning", + "type": "CONDITIONING", + "link": 10 + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 11 + ] + } + ], + "properties": { + "Node name for S&R": "ConditioningZeroOut" + }, + "widgets_values": [] + }, + { + "id": 12, + "type": "EmptyLatentImage", + "pos": [ + 2110, + 590 + ], + "size": [ + 270, + 106 + ], + "flags": {}, + "order": 0, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 12 + ] + } + ], + "properties": { + "Node name for S&R": "EmptyLatentImage" + }, + "widgets_values": [ + 1152, + 896, + 1 + ] + }, + { + "id": 14, + "type": "SaveImage", + "pos": [ + 2840, + 280 + ], + "size": [ + 270, + 270 + ], + "flags": {}, + "order": 12, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 15 + } + ], + "outputs": [], + "properties": {}, + "widgets_values": [ + "ComfyUI" + ] + }, + { + "id": 13, + "type": "VAEDecode", + "pos": [ + 2690, + 280 + ], + "size": [ + 140, + 46 + ], + "flags": {}, + "order": 11, + "mode": 0, + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 13 + }, + { + "name": "vae", + "type": "VAE", + "link": 14 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 15 + ] + } + ], + "properties": { + "Node name for S&R": "VAEDecode" + }, + "widgets_values": [] + }, + { + "id": 10, + "type": "KSampler", + "pos": [ + 2410, + 280 + ], + "size": [ + 270, + 474 + ], + "flags": {}, + "order": 10, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 8 + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": 9 + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": 11 + }, + { + "name": "latent_image", + "type": "LATENT", + "link": 12 + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 13 + ] + } + ], + "properties": { + "Node name for S&R": "KSampler" + }, + "widgets_values": [ + 1, + "fixed", + 20, + 7, + "euler", + "simple", + 1 + ] + }, + { + "id": 8, + "type": "CheckpointLoaderSimple", + "pos": [ + 1820, + 500 + ], + "size": [ + 270, + 98 + ], + "flags": {}, + "order": 1, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [ + 8 + ] + }, + { + "name": "CLIP", + "type": "CLIP", + "links": [ + 7 + ] + }, + { + "name": "VAE", + "type": "VAE", + "links": [ + 14 + ] + } + ], + "properties": { + "Node name for S&R": "CheckpointLoaderSimple" + }, + "widgets_values": [ + "juggernautXL_juggXIByRundiffusion.safetensors" + ] + }, + { + "id": 3, + "type": "HFTCreateConversation", + "pos": [ + 990, + 530 + ], + "size": [ + 400, + 200 + ], + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [ + { + "name": "previous", + "shape": 7, + "type": "HFT_CONVERSATION", + "link": null + }, + { + "name": "image", + "shape": 7, + "type": "PIL_IMAGE", + "link": null + } + ], + "outputs": [ + { + "name": "HFT_CONVERSATION", + "type": "HFT_CONVERSATION", + "links": [ + 1 + ] + } + ], + "properties": { + "Node name for S&R": "HFTCreateConversation" + }, + "widgets_values": [ + "system", + "You are an expert in writing prompts for AI image generation. Given a user's raw input prompt, expand it into a detailed image generation prompt with specific details to guide a text-to-image model.\n\n## Requirements\n\nStrictly follow all aspects of the user's raw input. Include every element requested (style and content). If the input is vague, invent concrete details, such as lighting, textures, materials, surrounding scene, etc. For characters, describe gender, clothing, hair, expressions, etc. Do not invent unrequested characters.\n\nInclude an overall visual style at the end, such as \". Style: