From c0876c9baecfffcec6237f8bbedf5261b2ddb620 Mon Sep 17 00:00:00 2001 From: nosiu <5691179+nosiu@users.noreply.github.com> Date: Sun, 2 Mar 2025 22:59:19 +0100 Subject: [PATCH] init --- .github/workflows/publish_action.yml | 20 + .gitignore | 160 ++ README.md | 65 + __init__.py | 4 + nodes.py | 125 ++ pyproject.toml | 14 + ui/extension.js | 152 ++ workflows/workflow.json | 2129 ++++++++++++++++++++++++++ workflows/workflow2.json | 1990 ++++++++++++++++++++++++ 9 files changed, 4659 insertions(+) create mode 100644 .github/workflows/publish_action.yml create mode 100644 .gitignore create mode 100644 README.md create mode 100644 __init__.py create mode 100644 nodes.py create mode 100644 pyproject.toml create mode 100644 ui/extension.js create mode 100644 workflows/workflow.json create mode 100644 workflows/workflow2.json diff --git a/.github/workflows/publish_action.yml b/.github/workflows/publish_action.yml new file mode 100644 index 0000000..d89ef1a --- /dev/null +++ b/.github/workflows/publish_action.yml @@ -0,0 +1,20 @@ +name: Publish to Comfy registry +on: + workflow_dispatch: + push: + branches: + - main + paths: + - "pyproject.toml" + +jobs: + publish-node: + name: Publish Custom Node to registry + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v4 + - name: Publish Custom Node + uses: Comfy-Org/publish-node-action@main + with: + personal_access_token: ${{ secrets.REGISTRY_ACCESS_TOKEN }} \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..68bc17f --- /dev/null +++ b/.gitignore @@ -0,0 +1,160 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +.pybuilder/ +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# .python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# poetry +# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. +# This is especially recommended for binary packages to ensure reproducibility, and is more +# commonly ignored for libraries. +# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control +#poetry.lock + +# pdm +# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. +#pdm.lock +# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it +# in version control. +# https://pdm.fming.dev/#use-with-ide +.pdm.toml + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +# PyCharm +# JetBrains specific template is maintained in a separate JetBrains.gitignore that can +# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +# and can be added to the global gitignore or merged into this file. For a more nuclear +# option (not recommended) you can uncomment the following to ignore the entire idea folder. +#.idea/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..865630a --- /dev/null +++ b/README.md @@ -0,0 +1,65 @@ +# ComfyUI Text Randomizer 1.0.0 +[About](#comfyui-text-randomizer-100) | [Custom nodes](#custom-nodes) | [Workflows](#workflows) | [Tips](#tips) + +A simple text randomizer for ComfyUI that can generate random and surprising results. + +[[ PUT IMAGE HERE]] + +## Custom nodes +[About](#comfyui-text-randomizer-100) | [Custom nodes](#custom-nodes) | [Workflows](#workflows) | [Tips](#tips) + +- ### Text randomizer + The Text Randomizer node randomizes text placed between brackets. Options should be separated by `|`, and any text outside the brackets remains unchanged. + + **Example:** + Input text: `[man|girl], sitting on a [bench|grass]`. + Possible outcomes: + - man, sitting on a bench + - girl, sitting on a bench + - man, sitting on a grass + - girl, sitting on a grass + + **Note:** You can nest brackets to create more varied outcomes. + +- ### Text randomizer with check + Similar to `Text Randomizer`, but it displays a warning if brackets or parentheses are mismatched. This check happens in real time, so you don’t need to run the workflow to see the errors. + + **Note:** The check works separately for brackets and parentheses. For example, input like `[ ( ] )` will pass the check. + +- ### Get one text or another at random + Returns one of two text options at random. + +- ### Concatenate text + Joins two pieces of text, adding `, ` between them. + +- ### Show text + Displays the final text you’ve generated. This is useful for debugging your prompts and checking what is fed into the TextEncoder. + +## Workflows +[About](#comfyui-text-randomizer-100) | [Custom nodes](#custom-nodes) | [Workflows](#workflows) | [Tips](#tips) + +You can find example workflows in the `/workflows` folder. + +### workflow.json +Demonstrates how to achieve similar text outputs in different ways, either by grouping separate topics and concatenating texts or putting everything into one node. + +[[ PUT IMAGE HERE]] + +### workflow2.json +Shows how to randomize two text nodes and return text from either one node or another. + +[[ PUT IMAGE HERE]] + +## Tips +[About](#comfyui-text-randomizer-100) | [Custom nodes](#custom-nodes) | [Workflows](#workflows) | [Tips](#tips) + +- You can use `Text Randomizer with Check` as a simple tool to check brackets without connecting it to anything. Just paste your text inside to see if your brackets or parentheses match. + +- By adding `|` at the end of the expression, you can create an empty option. For example (spaces added for clarity): `[ apple | banana | grapefruit | orange | ]` gives an equal chance to select "apple," "banana," "grapefruit," "orange," or nothing. \ +\ + Other examples: + + - [apple|] gives a 50% chance of getting "apple" and 50% chance of getting nothing. + - [apple||] gives a 33.3% chance of getting "apple" and a 66.6% chance of getting nothing. + + diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..73ace49 --- /dev/null +++ b/__init__.py @@ -0,0 +1,4 @@ +from .nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS +WEB_DIRECTORY = './ui/' + +__all__ = ['NODE_CLASS_MAPPINGS', 'NODE_DISPLAY_NAME_MAPPINGS', 'WEB_DIRECTORY'] \ No newline at end of file diff --git a/nodes.py b/nodes.py new file mode 100644 index 0000000..0abc30f --- /dev/null +++ b/nodes.py @@ -0,0 +1,125 @@ +import re +import random + +CATEGORY_NAME = "randomizer" + +class RandomizeText: + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "text": ("STRING", {"multiline": True}), + "seed": ("INT", {"default": 0, "min": 0, "max": 0xffffffffffffffff}), + } + } + RETURN_TYPES = ("STRING",) + RETURN_NAMES = ("text",) + FUNCTION = "randomize" + + CATEGORY = CATEGORY_NAME + + def randomize(self, text, seed, **kwargs): + random.seed(seed) + + while '[' in text: + text = re.sub(r'\[([^\[\]]+)\]', lambda x: random.choice(x.group(1).split('|')), text) + + return (text,) + + +# =========================================================================== +class RandomizeTextWithCheck(RandomizeText): + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "text": ("STRING", {"multiline": True}), + "seed": ("INT", {"default": 0, "min": 0, "max": 0xffffffffffffffff}), + }, + "optional": { + "info_text": ("STRING", {"multiline": True}), + } + } + +# =========================================================================== +class ConcatText: + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "text1": ("STRING", {"multiline": True, "forceInput": True}), + "text2": ("STRING", {"multiline": True, "forceInput": True}), + } + } + + RETURN_TYPES = ("STRING",) + RETURN_NAMES = ("text",) + FUNCTION = "concat" + + CATEGORY = CATEGORY_NAME + + def concat(self, text1, text2): + return (text1 + ", " + text2,) + + +# =========================================================================== +class RandomTextChoice: + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "text1": ("STRING", {"multiline": True, "forceInput": True}), + "text2": ("STRING", {"multiline": True, "forceInput": True}), + "seed": ("INT", {"default": 0, "min": 0, "max": 0xffffffffffffffff}), + } + } + + RETURN_TYPES = ("STRING",) + RETURN_NAMES = ("text",) + FUNCTION = "choice" + + CATEGORY = CATEGORY_NAME + + def choice(self, text1, text2, seed): + random.seed(seed) + text = random.choice([text1, text2]) + return (text,) + + +# =========================================================================== +class ShowText: + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "text": ("STRING", {"forceInput": True, "dynamicPrompts": True}), + }, + "optional": { + "preview": ("STRING", {"multiline": True }), + } + } + + RETURN_TYPES = () + FUNCTION = "showText" + OUTPUT_NODE = True + CATEGORY = CATEGORY_NAME + + def showText(self, text, **kwargs): + return {"ui": {"text": text}} + + +NODE_CLASS_MAPPINGS = { + "RandomizeText": RandomizeText, + "RandomizeTextWithCheck": RandomizeTextWithCheck, + "RandomTextChoice": RandomTextChoice, + "ConcatText": ConcatText, + "ShowText": ShowText, +} + +NODE_DISPLAY_NAME_MAPPINGS = { + "RandomizeText": "Text randomizer", + "RandomizeTextWithCheck": "Text randomizer with check", + "RandomTextChoice": "Get one text or another at random", + "ConcatText": "Concatenate text", + "ShowText": "Show text", +} \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..cd00ee2 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,14 @@ +[project] +name = "comfyui-text-randomizer" +description = "A simple text randomizer for ComfyUI that can generate random and surprising results" +version = 1.0.0" +license = { file = "LICENSE" } +dependencies = [] + +[project.urls] +Repository = "https://github.com/nosiu/comfyui-text-randomizer" + +[tool.comfy] +PublisherId = "nosiu" +DisplayName = "comfyui-text-randomizer" +Icon = "" \ No newline at end of file diff --git a/ui/extension.js b/ui/extension.js new file mode 100644 index 0000000..e93e7e4 --- /dev/null +++ b/ui/extension.js @@ -0,0 +1,152 @@ +import { app } from "../../scripts/app.js"; + + +function checkBrackets(value, domWidget) { + const input = value + const resultMessage = domWidget.element + const brackets = [] + const parentheses = [] + + const unmatchedClosingBrackets = [] + const unmatchedClosingParentheses = [] + + for (let i = 0; i < input.length; i++) { + const char = input[i] + + if (char === '[') { + brackets.push(i) + } + + if (char === ']') { + if (brackets.length === 0) { + unmatchedClosingBrackets.push(i) + } else { + brackets.pop() + } + } + + if (char === '(') { + parentheses.push(i) + } + + if (char === ')') { + if (parentheses.length === 0) { + unmatchedClosingParentheses.push(i) + } else { + parentheses.pop() + } + } + } + + let message = "" + let hasErrors = false + + if (brackets.length > 0) { + message += `Unmatched opening bracket at: ${brackets.map(p => p + 1).join(', ')}. ` + hasErrors = true + } + + if (unmatchedClosingBrackets.length > 0) { + message += `Unmatched closing bracket at: ${unmatchedClosingBrackets.map(p => p + 1).join(', ')}. ` + hasErrors = true + } + + if (parentheses.length > 0) { + message += `Unmatched opening parenthesis at: ${parentheses.map(p => p + 1).join(', ')}. ` + hasErrors = true + } + + if (unmatchedClosingParentheses.length > 0) { + message += `Unmatched closing parenthesis at: ${unmatchedClosingParentheses.map(p => p + 1).join(', ')}. ` + hasErrors = true + } + + if (!hasErrors) { + message = "All brackets and parentheses are properly matched!" + resultMessage.style.color = "green" + } else { + resultMessage.style.color = "red" + } + + resultMessage.value = message + domWidget.value = message +} + + + +app.registerExtension({ + name: "ComfyUI.text-randomizer-01", + async beforeRegisterNodeDef(nodeType) { + // =================================== + // SHOW TEXT + // =================================== + if (nodeType?.comfyClass == "ShowText") { + const onExecuted = nodeType.prototype.onExecuted + nodeType.prototype.onExecuted = function (message) { + const r = onExecuted?.apply(this, arguments) + const text = message.text.join("") + if (text) { + const previewWidget = this.widgets.find(w => w.name === "preview") + previewWidget.value = text + } + return r + } + + const onNodeCreated = nodeType.prototype.onNodeCreated + nodeType.prototype.onNodeCreated = function () { + const r = onNodeCreated ? onNodeCreated.apply(this, arguments) : undefined + const previewWidget = this.widgets.find(w => w.name === "preview") + if (previewWidget) { + previewWidget.element.readOnly = true + } + return r + } + + const onConnectionsChange = nodeType.prototype.onConnectionsChange; + nodeType.prototype.onConnectionsChange = function (side, slot, connect, link_info, output) { + const r = onConnectionsChange?.apply(this, arguments); + if (output.name === "text") { + const previewWidget = this.widgets.find(w => w.name === "preview") + if (previewWidget) { + previewWidget.value = "" + } + } + return r + } + } + + + // =================================== + // RANDOMIZE TEXT + // =================================== + if (nodeType?.comfyClass == "RandomizeTextWithCheck") { + const onNodeCreated = nodeType.prototype.onNodeCreated; + nodeType.prototype.onNodeCreated = function () { + const r = onNodeCreated ? onNodeCreated.apply(this, arguments) : undefined + const textwWidget = this.widgets.find(w => w.name === "text") + const infoTextWidget = this.widgets.find(w => w.name === "info_text") + infoTextWidget.element.readOnly = true + infoTextWidget.value = "" + + if (textwWidget) { + const callback = textwWidget.element.onkeyup + textwWidget.element.onkeyup = (e) => { + checkBrackets(textwWidget.value, infoTextWidget) + if (callback) callback(e) + } + } + return r + } + + const onGraphConfigured = nodeType.prototype.onGraphConfigured; + nodeType.prototype.onGraphConfigured = function () { + const r = onGraphConfigured?.apply(this, arguments) + const textwWidget = this.widgets.find(w => w.name === "text") + if (textwWidget) { + checkBrackets(textwWidget.value, this.widgets.find(w => w.name === "info_text")) + } + return r + } + } + } +}) \ No newline at end of file diff --git a/workflows/workflow.json b/workflows/workflow.json new file mode 100644 index 0000000..66ec36b --- /dev/null +++ b/workflows/workflow.json @@ -0,0 +1,2129 @@ +{ + "last_node_id": 1574, + "last_link_id": 3538, + "nodes": [ + { + "id": 1539, + "type": "CheckpointLoaderSimple", + "pos": { + "0": -360, + "1": -130 + }, + "size": { + "0": 317.883056640625, + "1": 106.47866821289062 + }, + "flags": {}, + "order": 0, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [ + 3427 + ], + "slot_index": 0 + }, + { + "name": "CLIP", + "type": "CLIP", + "links": [ + 3424, + 3432 + ], + "slot_index": 1 + }, + { + "name": "VAE", + "type": "VAE", + "links": [ + 3430 + ], + "slot_index": 2 + } + ], + "properties": { + "Node name for S&R": "CheckpointLoaderSimple" + }, + "widgets_values": [ + "Juggernaut_X_RunDiffusion_Hyper.safetensors" + ], + "color": "#223", + "bgcolor": "#335" + }, + { + "id": 1541, + "type": "CLIPTextEncode", + "pos": { + "0": 60, + "1": -110 + }, + "size": { + "0": 210, + "1": 54 + }, + "flags": {}, + "order": 17, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 3424 + }, + { + "name": "text", + "type": "STRING", + "link": 3527, + "widget": { + "name": "text" + } + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 3436 + ], + "slot_index": 0 + } + ], + "title": "Positive Prompts", + "properties": { + "Node name for S&R": "CLIPTextEncode" + }, + "widgets_values": [ + "" + ], + "color": "#232", + "bgcolor": "#353" + }, + { + "id": 1565, + "type": "ConcatText", + "pos": { + "0": -1206.557861328125, + "1": -333.0647277832031 + }, + "size": { + "0": 210, + "1": 54 + }, + "flags": { + "collapsed": true + }, + "order": 13, + "mode": 0, + "inputs": [ + { + "name": "text1", + "type": "STRING", + "link": 3530, + "widget": { + "name": "text1" + } + }, + { + "name": "text2", + "type": "STRING", + "link": 3531, + "widget": { + "name": "text2" + } + } + ], + "outputs": [ + { + "name": "text", + "type": "STRING", + "links": [ + 3532 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "ConcatText" + }, + "widgets_values": [ + "", + "" + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 1564, + "type": "ConcatText", + "pos": { + "0": -1206.557861328125, + "1": -533.0645751953125 + }, + "size": { + "0": 210, + "1": 54 + }, + "flags": { + "collapsed": true + }, + "order": 10, + "mode": 0, + "inputs": [ + { + "name": "text1", + "type": "STRING", + "link": 3528, + "widget": { + "name": "text1" + } + }, + { + "name": "text2", + "type": "STRING", + "link": 3529, + "widget": { + "name": "text2" + } + } + ], + "outputs": [ + { + "name": "text", + "type": "STRING", + "links": [ + 3530 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "ConcatText" + }, + "widgets_values": [ + "", + "" + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 1566, + "type": "ConcatText", + "pos": { + "0": -1196.557861328125, + "1": -123.06477355957031 + }, + "size": { + "0": 400, + "1": 200 + }, + "flags": { + "collapsed": true + }, + "order": 15, + "mode": 0, + "inputs": [ + { + "name": "text1", + "type": "STRING", + "link": 3532, + "widget": { + "name": "text1" + } + }, + { + "name": "text2", + "type": "STRING", + "link": 3533, + "widget": { + "name": "text2" + } + } + ], + "outputs": [ + { + "name": "text", + "type": "STRING", + "links": [ + 3534, + 3537 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "ConcatText" + }, + "widgets_values": [ + "", + "" + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 1569, + "type": "ShowText", + "pos": { + "0": -956.557861328125, + "1": -543.0645751953125 + }, + "size": { + "0": 445.4656677246094, + "1": 261.6141052246094 + }, + "flags": {}, + "order": 19, + "mode": 0, + "inputs": [ + { + "name": "text", + "type": "STRING", + "link": 3537, + "widget": { + "name": "text" + } + } + ], + "outputs": [], + "properties": { + "Node name for S&R": "ShowText" + }, + "widgets_values": [ + "", + "raw photo, girl, surprised, standing in the rain, sunny day,eating pizza, wide shot, simple background" + ], + "color": "#233", + "bgcolor": "#355" + }, + { + "id": 1540, + "type": "KSampler", + "pos": { + "0": 390, + "1": -130 + }, + "size": { + "0": 315, + "1": 474 + }, + "flags": {}, + "order": 20, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 3427 + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": 3436 + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": 3435 + }, + { + "name": "latent_image", + "type": "LATENT", + "link": 3428 + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 3429 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "KSampler" + }, + "widgets_values": [ + 649243360316295, + "randomize", + 20, + 8, + "euler", + "normal", + 1 + ], + "color": "#323", + "bgcolor": "#535" + }, + { + "id": 1568, + "type": "Reroute", + "pos": { + "0": -413.62445068359375, + "1": 183.18748474121094 + }, + "size": [ + 90.4, + 26 + ], + "flags": {}, + "order": 11, + "mode": 0, + "inputs": [ + { + "name": "", + "type": "*", + "link": 3535, + "widget": { + "name": "value" + } + } + ], + "outputs": [ + { + "name": "STRING", + "type": "STRING", + "links": [ + 3536 + ], + "slot_index": 0 + } + ], + "properties": { + "showOutputText": true, + "horizontal": false + } + }, + { + "id": 1567, + "type": "Reroute", + "pos": { + "0": -413.62445068359375, + "1": 93.18749237060547 + }, + "size": [ + 90.4, + 26 + ], + "flags": {}, + "order": 18, + "mode": 0, + "inputs": [ + { + "name": "", + "type": "*", + "link": 3534 + } + ], + "outputs": [ + { + "name": "STRING", + "type": "STRING", + "links": null + } + ], + "properties": { + "showOutputText": true, + "horizontal": false + }, + "color": "#233", + "bgcolor": "#355" + }, + { + "id": 1559, + "type": "RandomizeText", + "pos": { + "0": -1706.557861328125, + "1": -563.0645751953125 + }, + "size": { + "0": 393.25177001953125, + "1": 125.10658264160156 + }, + "flags": {}, + "order": 1, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "text", + "type": "STRING", + "links": [ + 3529 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "RandomizeText" + }, + "widgets_values": [ + " [man|girl], [happy|angry|surprised]", + 942163751819399, + "randomize" + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 1573, + "type": "Reroute", + "pos": { + "0": -415.62445068359375, + "1": 247.1875 + }, + "size": [ + 90.4, + 26 + ], + "flags": {}, + "order": 12, + "mode": 0, + "inputs": [ + { + "name": "", + "type": "*", + "link": 3538 + } + ], + "outputs": [ + { + "name": "STRING", + "type": "STRING", + "links": null + } + ], + "properties": { + "showOutputText": true, + "horizontal": false + } + }, + { + "id": 1557, + "type": "RandomizeText", + "pos": { + "0": -1706.557861328125, + "1": -753.0645751953125 + }, + "size": { + "0": 386.8968811035156, + "1": 134.02008056640625 + }, + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "text", + "type": "STRING", + "links": [ + 3528 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "RandomizeText" + }, + "widgets_values": [ + "[raw photo|realistic|anime|cartoon]", + 817355091607000, + "randomize" + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 1561, + "type": "RandomizeText", + "pos": { + "0": -1706.557861328125, + "1": -363.0647277832031 + }, + "size": { + "0": 398.185302734375, + "1": 130.74755859375 + }, + "flags": {}, + "order": 3, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "text", + "type": "STRING", + "links": [ + 3531 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "RandomizeText" + }, + "widgets_values": [ + "[standing|sitting] in the rain, [at night|sunny day|sunset],[eating [hotdog|pizza]|drinking [coffee|orange juice]]", + 519443156293279, + "randomize" + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 1563, + "type": "RandomizeText", + "pos": { + "0": -1706.557861328125, + "1": -153.0647735595703 + }, + "size": { + "0": 394.50482177734375, + "1": 153.2019500732422 + }, + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "text", + "type": "STRING", + "links": [ + 3533 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "RandomizeText" + }, + "widgets_values": [ + "[wide shot|from above|dynamic angle], [detailed|simple] background", + 434091361797819, + "randomize" + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 1545, + "type": "CLIPTextEncode", + "pos": { + "0": 60, + "1": 0 + }, + "size": { + "0": 210, + "1": 96 + }, + "flags": {}, + "order": 9, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 3432 + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 3435 + ], + "slot_index": 0 + } + ], + "title": "Negative Prompts", + "properties": { + "Node name for S&R": "CLIPTextEncode" + }, + "widgets_values": [ + "bad quality, ugly, deformed, low res" + ], + "color": "#322", + "bgcolor": "#533" + }, + { + "id": 1534, + "type": "RandomizeText", + "pos": { + "0": -919, + "1": 185 + }, + "size": { + "0": 424.538818359375, + "1": 242.76487731933594 + }, + "flags": {}, + "order": 5, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "text", + "type": "STRING", + "links": [ + 3535 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "RandomizeText" + }, + "widgets_values": [ + "[raw photo|realistic|anime|cartoon], [man|girl], [happy|angry|surprised], [standing|sitting] in the rain, [at night|sunny day|sunset], [eating [hotdog|pizza]|drinking [coffee|orange juice]], [wide shot|from above|dynamic angle], [detailed|simple] background", + 429673555744030, + "randomize" + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 1571, + "type": "RandomizeTextWithCheck", + "pos": { + "0": -929, + "1": 522 + }, + "size": { + "0": 437.8191223144531, + "1": 296.9971923828125 + }, + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "text", + "type": "STRING", + "links": [ + 3538 + ] + } + ], + "properties": { + "Node name for S&R": "RandomizeTextWithCheck" + }, + "widgets_values": [ + "[raw photo|realistic|anime|cartoon], [man|girl], [happy|angry|surprised], [standing|sitting] in the rain, [at night|sunny day|sunset], [eating [hotdog|pizza]|drinking [coffee|orange juice]], [wide shot|from above|dynamic angle], [detailed|simple] background", + 1039017944154047, + "randomize", + "All brackets and parentheses are properly matched!" + ] + }, + { + "id": 1574, + "type": "Note", + "pos": { + "0": -946.557861328125, + "1": -763.0645751953125 + }, + "size": { + "0": 438.5349426269531, + "1": 168.12376403808594 + }, + "flags": {}, + "order": 7, + "mode": 0, + "inputs": [], + "outputs": [], + "properties": {}, + "widgets_values": [ + "The result of this group has the same ability to create the same random text as the single node below. The texts have been grouped to make it easier to keep track of what's going on." + ], + "color": "#322", + "bgcolor": "#533" + }, + { + "id": 1555, + "type": "Reroute", + "pos": { + "0": -185.62387084960938, + "1": 184.18748474121094 + }, + "size": [ + 90.4, + 26 + ], + "flags": {}, + "order": 14, + "mode": 0, + "inputs": [ + { + "name": "", + "type": "*", + "link": 3536, + "widget": { + "name": "value" + } + } + ], + "outputs": [ + { + "name": "STRING", + "type": "STRING", + "links": [ + 3526, + 3527 + ], + "slot_index": 0 + } + ], + "properties": { + "showOutputText": true, + "horizontal": false + } + }, + { + "id": 1542, + "type": "EmptyLatentImage", + "pos": { + "0": 60, + "1": -290 + }, + "size": { + "0": 226.6180877685547, + "1": 106 + }, + "flags": {}, + "order": 8, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 3428 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "EmptyLatentImage" + }, + "widgets_values": [ + 1024, + 1024, + 1 + ], + "color": "#323", + "bgcolor": "#535" + }, + { + "id": 1543, + "type": "VAEDecode", + "pos": { + "0": 733, + "1": -61 + }, + "size": { + "0": 210, + "1": 46 + }, + "flags": { + "collapsed": true + }, + "order": 21, + "mode": 0, + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 3429 + }, + { + "name": "vae", + "type": "VAE", + "link": 3430 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 3431 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "VAEDecode" + }, + "widgets_values": [] + }, + { + "id": 1544, + "type": "PreviewImage", + "pos": { + "0": 757, + "1": -447 + }, + "size": { + "0": 776.2886962890625, + "1": 863.4190063476562 + }, + "flags": {}, + "order": 22, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 3431 + } + ], + "outputs": [], + "properties": { + "Node name for S&R": "PreviewImage" + }, + "widgets_values": [], + "color": "#233", + "bgcolor": "#355" + }, + { + "id": 1538, + "type": "ShowText", + "pos": { + "0": -8, + "1": 184 + }, + "size": { + "0": 337.1260986328125, + "1": 252.23208618164062 + }, + "flags": {}, + "order": 16, + "mode": 0, + "inputs": [ + { + "name": "text", + "type": "STRING", + "link": 3526, + "widget": { + "name": "text" + } + } + ], + "outputs": [], + "properties": { + "Node name for S&R": "ShowText" + }, + "widgets_values": [ + "", + "cartoon, girl, surprised, sitting in the rain, at night, eating hotdog, wide shot, simple background" + ], + "color": "#233", + "bgcolor": "#355" + } + ], + "links": [ + [ + 2149, + 925, + 0, + 926, + 0, + "IMAGE" + ], + [ + 2150, + 925, + 1, + 926, + 1, + "MASK" + ], + [ + 2151, + 924, + 1, + 927, + 0, + "CLIP" + ], + [ + 2152, + 924, + 1, + 928, + 0, + "CLIP" + ], + [ + 2153, + 941, + 0, + 929, + 0, + "MODEL" + ], + [ + 2154, + 943, + 0, + 929, + 1, + "CONDITIONING" + ], + [ + 2155, + 943, + 1, + 929, + 2, + "CONDITIONING" + ], + [ + 2156, + 943, + 3, + 929, + 3, + "LATENT" + ], + [ + 2157, + 931, + 0, + 930, + 0, + "IMAGE" + ], + [ + 2158, + 926, + 5, + 930, + 1, + "INT" + ], + [ + 2159, + 926, + 6, + 930, + 2, + "INT" + ], + [ + 2160, + 929, + 0, + 931, + 0, + "LATENT" + ], + [ + 2161, + 924, + 2, + 931, + 1, + "VAE" + ], + [ + 2162, + 925, + 0, + 932, + 0, + "IMAGE" + ], + [ + 2163, + 930, + 0, + 932, + 1, + "IMAGE" + ], + [ + 2164, + 926, + 3, + 932, + 3, + "INT" + ], + [ + 2165, + 926, + 4, + 932, + 4, + "INT" + ], + [ + 2166, + 932, + 0, + 933, + 0, + "IMAGE" + ], + [ + 2167, + 935, + 0, + 934, + 0, + "IMAGE" + ], + [ + 2168, + 926, + 1, + 935, + 0, + "MASK" + ], + [ + 2169, + 934, + 0, + 936, + 0, + "IMAGE" + ], + [ + 2170, + 934, + 0, + 937, + 0, + "IMAGE" + ], + [ + 2171, + 940, + 0, + 938, + 0, + "IMAGE" + ], + [ + 2172, + 926, + 0, + 939, + 0, + "*" + ], + [ + 2173, + 925, + 0, + 940, + 0, + "*" + ], + [ + 2174, + 924, + 0, + 941, + 0, + "MODEL" + ], + [ + 2175, + 942, + 0, + 941, + 1, + "INPAINT_PATCH" + ], + [ + 2176, + 943, + 2, + 941, + 2, + "LATENT" + ], + [ + 2177, + 927, + 0, + 943, + 0, + "CONDITIONING" + ], + [ + 2178, + 928, + 0, + 943, + 1, + "CONDITIONING" + ], + [ + 2179, + 924, + 2, + 943, + 2, + "VAE" + ], + [ + 2180, + 939, + 0, + 943, + 3, + "IMAGE" + ], + [ + 2181, + 936, + 0, + 943, + 4, + "MASK" + ], + [ + 2182, + 939, + 0, + 944, + 0, + "IMAGE" + ], + [ + 2264, + 1002, + 1, + 1005, + 0, + "CLIP" + ], + [ + 2265, + 1002, + 1, + 1006, + 0, + "CLIP" + ], + [ + 2266, + 1019, + 0, + 1007, + 0, + "MODEL" + ], + [ + 2267, + 1021, + 0, + 1007, + 1, + "CONDITIONING" + ], + [ + 2268, + 1021, + 1, + 1007, + 2, + "CONDITIONING" + ], + [ + 2269, + 1021, + 3, + 1007, + 3, + "LATENT" + ], + [ + 2270, + 1009, + 0, + 1008, + 0, + "IMAGE" + ], + [ + 2271, + 1004, + 5, + 1008, + 1, + "INT" + ], + [ + 2272, + 1004, + 6, + 1008, + 2, + "INT" + ], + [ + 2273, + 1007, + 0, + 1009, + 0, + "LATENT" + ], + [ + 2274, + 1002, + 2, + 1009, + 1, + "VAE" + ], + [ + 2276, + 1008, + 0, + 1010, + 1, + "IMAGE" + ], + [ + 2277, + 1004, + 3, + 1010, + 3, + "INT" + ], + [ + 2278, + 1004, + 4, + 1010, + 4, + "INT" + ], + [ + 2281, + 1004, + 1, + 1013, + 0, + "MASK" + ], + [ + 2285, + 1004, + 0, + 1017, + 0, + "*" + ], + [ + 2286, + 1003, + 0, + 1018, + 0, + "*" + ], + [ + 2287, + 1002, + 0, + 1019, + 0, + "MODEL" + ], + [ + 2288, + 1020, + 0, + 1019, + 1, + "INPAINT_PATCH" + ], + [ + 2289, + 1021, + 2, + 1019, + 2, + "LATENT" + ], + [ + 2290, + 1005, + 0, + 1021, + 0, + "CONDITIONING" + ], + [ + 2291, + 1006, + 0, + 1021, + 1, + "CONDITIONING" + ], + [ + 2292, + 1002, + 2, + 1021, + 2, + "VAE" + ], + [ + 2293, + 1017, + 0, + 1021, + 3, + "IMAGE" + ], + [ + 2294, + 1014, + 0, + 1021, + 4, + "MASK" + ], + [ + 2295, + 1017, + 0, + 1022, + 0, + "IMAGE" + ], + [ + 2296, + 1003, + 0, + 1001, + 0, + "IMAGE" + ], + [ + 2297, + 1013, + 0, + 1014, + 0, + "IMAGE" + ], + [ + 2298, + 1001, + 0, + 1004, + 0, + "IMAGE" + ], + [ + 2303, + 1025, + 0, + 1026, + 0, + "IMAGE" + ], + [ + 2304, + 1026, + 0, + 1004, + 1, + "MASK" + ], + [ + 2305, + 1001, + 0, + 1010, + 0, + "IMAGE" + ], + [ + 2306, + 1010, + 0, + 1016, + 0, + "IMAGE" + ], + [ + 2309, + 1001, + 1, + 1029, + 0, + "MASK" + ], + [ + 2310, + 1029, + 0, + 1025, + 0, + "MASK" + ], + [ + 2485, + 1106, + 0, + 1108, + 0, + "FSMCROPPER" + ], + [ + 2486, + 1106, + 0, + 1109, + 0, + "FSMCROPPER" + ], + [ + 2487, + 1107, + 0, + 1110, + 0, + "IMAGE" + ], + [ + 2488, + 1107, + 1, + 1111, + 0, + "IMAGE" + ], + [ + 2509, + 1108, + 0, + 1107, + 0, + "IMAGE" + ], + [ + 2510, + 1108, + 1, + 1107, + 1, + "CROPINFO" + ], + [ + 2511, + 1109, + 1, + 1107, + 2, + "CROPINFO" + ], + [ + 2512, + 1107, + 0, + 1122, + 1, + "IMAGE" + ], + [ + 2514, + 1108, + 1, + 1122, + 2, + "CROPINFO" + ], + [ + 2515, + 1122, + 0, + 1123, + 0, + "IMAGE" + ], + [ + 2520, + 1124, + 0, + 1125, + 0, + "IMAGE" + ], + [ + 2521, + 1124, + 1, + 1125, + 1, + "CROPINFO" + ], + [ + 2522, + 1106, + 0, + 1124, + 0, + "FSMCROPPER" + ], + [ + 2524, + 1122, + 0, + 1124, + 1, + "IMAGE" + ], + [ + 2525, + 1125, + 0, + 1126, + 0, + "IMAGE" + ], + [ + 2526, + 1125, + 1, + 1127, + 0, + "IMAGE" + ], + [ + 2527, + 1128, + 0, + 1129, + 0, + "IMAGE" + ], + [ + 2528, + 1128, + 1, + 1129, + 1, + "CROPINFO" + ], + [ + 2530, + 1106, + 0, + 1128, + 0, + "FSMCROPPER" + ], + [ + 2532, + 1129, + 0, + 1130, + 0, + "IMAGE" + ], + [ + 2533, + 1129, + 1, + 1131, + 0, + "IMAGE" + ], + [ + 2538, + 1132, + 0, + 1133, + 0, + "IMAGE" + ], + [ + 2539, + 1132, + 0, + 1128, + 1, + "IMAGE" + ], + [ + 2542, + 1128, + 1, + 1134, + 2, + "CROPINFO" + ], + [ + 2543, + 1134, + 0, + 1135, + 0, + "IMAGE" + ], + [ + 2546, + 1138, + 0, + 1125, + 2, + "CROPINFO" + ], + [ + 2548, + 1122, + 0, + 1132, + 0, + "IMAGE" + ], + [ + 2549, + 1125, + 0, + 1132, + 1, + "IMAGE" + ], + [ + 2550, + 1124, + 1, + 1132, + 2, + "CROPINFO" + ], + [ + 2551, + 1138, + 0, + 1140, + 0, + "*" + ], + [ + 2552, + 1140, + 0, + 1129, + 2, + "CROPINFO" + ], + [ + 2555, + 1141, + 0, + 1108, + 1, + "IMAGE" + ], + [ + 2556, + 1142, + 0, + 1109, + 1, + "IMAGE" + ], + [ + 2557, + 1141, + 0, + 1122, + 0, + "IMAGE" + ], + [ + 2670, + 1109, + 1, + 1138, + 0, + "*" + ], + [ + 2672, + 1132, + 0, + 1134, + 0, + "IMAGE" + ], + [ + 2673, + 1129, + 0, + 1134, + 1, + "IMAGE" + ], + [ + 2826, + 1301, + 2, + 1303, + 1, + "VAE" + ], + [ + 2831, + 1301, + 1, + 1307, + 0, + "CLIP" + ], + [ + 2834, + 1301, + 2, + 1304, + 1, + "VAE" + ], + [ + 3057, + 1393, + 0, + 1392, + 0, + "UPSCALE_MODEL" + ], + [ + 3059, + 1395, + 0, + 1392, + 1, + "IMAGE" + ], + [ + 3060, + 1392, + 0, + 1397, + 0, + "IMAGE" + ], + [ + 3061, + 1397, + 0, + 1398, + 0, + "IMAGE" + ], + [ + 3309, + 1499, + 0, + 1503, + 0, + "STRING" + ], + [ + 3310, + 1500, + 0, + 1503, + 1, + "STRING" + ], + [ + 3311, + 1503, + 0, + 1504, + 0, + "STRING" + ], + [ + 3312, + 1501, + 0, + 1504, + 1, + "STRING" + ], + [ + 3314, + 1504, + 0, + 1505, + 0, + "STRING" + ], + [ + 3315, + 1502, + 0, + 1505, + 1, + "STRING" + ], + [ + 3344, + 1505, + 0, + 1508, + 0, + "STRING" + ], + [ + 3345, + 1510, + 0, + 1508, + 1, + "STRING" + ], + [ + 3346, + 1508, + 0, + 1509, + 0, + "STRING" + ], + [ + 3347, + 1511, + 0, + 1509, + 1, + "STRING" + ], + [ + 3401, + 1509, + 0, + 1532, + 0, + "STRING" + ], + [ + 3424, + 1539, + 1, + 1541, + 0, + "CLIP" + ], + [ + 3427, + 1539, + 0, + 1540, + 0, + "MODEL" + ], + [ + 3428, + 1542, + 0, + 1540, + 3, + "LATENT" + ], + [ + 3429, + 1540, + 0, + 1543, + 0, + "LATENT" + ], + [ + 3430, + 1539, + 2, + 1543, + 1, + "VAE" + ], + [ + 3431, + 1543, + 0, + 1544, + 0, + "IMAGE" + ], + [ + 3432, + 1539, + 1, + 1545, + 0, + "CLIP" + ], + [ + 3435, + 1545, + 0, + 1540, + 2, + "CONDITIONING" + ], + [ + 3436, + 1541, + 0, + 1540, + 1, + "CONDITIONING" + ], + [ + 3526, + 1555, + 0, + 1538, + 0, + "STRING" + ], + [ + 3527, + 1555, + 0, + 1541, + 1, + "STRING" + ], + [ + 3528, + 1557, + 0, + 1564, + 0, + "STRING" + ], + [ + 3529, + 1559, + 0, + 1564, + 1, + "STRING" + ], + [ + 3530, + 1564, + 0, + 1565, + 0, + "STRING" + ], + [ + 3531, + 1561, + 0, + 1565, + 1, + "STRING" + ], + [ + 3532, + 1565, + 0, + 1566, + 0, + "STRING" + ], + [ + 3533, + 1563, + 0, + 1566, + 1, + "STRING" + ], + [ + 3534, + 1566, + 0, + 1567, + 0, + "*" + ], + [ + 3535, + 1534, + 0, + 1568, + 0, + "*" + ], + [ + 3536, + 1568, + 0, + 1555, + 0, + "*" + ], + [ + 3537, + 1566, + 0, + 1569, + 0, + "STRING" + ], + [ + 3538, + 1571, + 0, + 1573, + 0, + "*" + ] + ], + "groups": [ + { + "title": "Randomize text with groups", + "bounding": [ + -1738, + -855, + 1254, + 879 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + } + ], + "config": {}, + "extra": { + "ds": { + "scale": 0.5131581182307068, + "offset": [ + 1483.8124576859702, + 875.851319483479 + ] + }, + "groupNodes": {} + }, + "version": 0.4 +} \ No newline at end of file diff --git a/workflows/workflow2.json b/workflows/workflow2.json new file mode 100644 index 0000000..06cde53 --- /dev/null +++ b/workflows/workflow2.json @@ -0,0 +1,1990 @@ +{ + "last_node_id": 1577, + "last_link_id": 3548, + "nodes": [ + { + "id": 1541, + "type": "CLIPTextEncode", + "pos": { + "0": 60, + "1": -110 + }, + "size": { + "0": 210, + "1": 54 + }, + "flags": {}, + "order": 15, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 3424 + }, + { + "name": "text", + "type": "STRING", + "link": 3527, + "widget": { + "name": "text" + } + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 3436 + ], + "slot_index": 0 + } + ], + "title": "Positive Prompts", + "properties": { + "Node name for S&R": "CLIPTextEncode" + }, + "widgets_values": [ + "" + ], + "color": "#232", + "bgcolor": "#353" + }, + { + "id": 1540, + "type": "KSampler", + "pos": { + "0": 390, + "1": -130 + }, + "size": { + "0": 315, + "1": 474 + }, + "flags": {}, + "order": 16, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 3427 + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": 3436 + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": 3435 + }, + { + "name": "latent_image", + "type": "LATENT", + "link": 3428 + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 3429 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "KSampler" + }, + "widgets_values": [ + 81076402696843, + "randomize", + 20, + 8, + "euler", + "normal", + 1 + ], + "color": "#323", + "bgcolor": "#535" + }, + { + "id": 1545, + "type": "CLIPTextEncode", + "pos": { + "0": 60, + "1": 0 + }, + "size": { + "0": 210, + "1": 96 + }, + "flags": {}, + "order": 8, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 3432 + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 3435 + ], + "slot_index": 0 + } + ], + "title": "Negative Prompts", + "properties": { + "Node name for S&R": "CLIPTextEncode" + }, + "widgets_values": [ + "bad quality, ugly, deformed, low res" + ], + "color": "#322", + "bgcolor": "#533" + }, + { + "id": 1555, + "type": "Reroute", + "pos": { + "0": -185.62387084960938, + "1": 184.18748474121094 + }, + "size": [ + 90.4, + 26 + ], + "flags": {}, + "order": 13, + "mode": 0, + "inputs": [ + { + "name": "", + "type": "*", + "link": 3547, + "widget": { + "name": "value" + } + } + ], + "outputs": [ + { + "name": "STRING", + "type": "STRING", + "links": [ + 3526, + 3527 + ], + "slot_index": 0 + } + ], + "properties": { + "showOutputText": true, + "horizontal": false + } + }, + { + "id": 1542, + "type": "EmptyLatentImage", + "pos": { + "0": 60, + "1": -290 + }, + "size": { + "0": 226.6180877685547, + "1": 106 + }, + "flags": {}, + "order": 0, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 3428 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "EmptyLatentImage" + }, + "widgets_values": [ + 1024, + 1024, + 1 + ], + "color": "#323", + "bgcolor": "#535" + }, + { + "id": 1543, + "type": "VAEDecode", + "pos": { + "0": 733, + "1": -61 + }, + "size": { + "0": 210, + "1": 46 + }, + "flags": { + "collapsed": true + }, + "order": 17, + "mode": 0, + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 3429 + }, + { + "name": "vae", + "type": "VAE", + "link": 3430 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 3431 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "VAEDecode" + }, + "widgets_values": [] + }, + { + "id": 1544, + "type": "PreviewImage", + "pos": { + "0": 757, + "1": -447 + }, + "size": { + "0": 776.2886962890625, + "1": 863.4190063476562 + }, + "flags": {}, + "order": 18, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 3431 + } + ], + "outputs": [], + "properties": { + "Node name for S&R": "PreviewImage" + }, + "widgets_values": [], + "color": "#233", + "bgcolor": "#355" + }, + { + "id": 1538, + "type": "ShowText", + "pos": { + "0": -8, + "1": 184 + }, + "size": { + "0": 337.1260986328125, + "1": 252.23208618164062 + }, + "flags": {}, + "order": 14, + "mode": 0, + "inputs": [ + { + "name": "text", + "type": "STRING", + "link": 3526, + "widget": { + "name": "text" + } + } + ], + "outputs": [], + "properties": { + "Node name for S&R": "ShowText" + }, + "widgets_values": [ + "", + "cartoon, man, surprised, standing on the busy street in city, dynamic angle, simple background" + ], + "color": "#233", + "bgcolor": "#355" + }, + { + "id": 1564, + "type": "ConcatText", + "pos": { + "0": -1435.4990234375, + "1": -303.516357421875 + }, + "size": { + "0": 210, + "1": 54 + }, + "flags": { + "collapsed": true + }, + "order": 9, + "mode": 0, + "inputs": [ + { + "name": "text1", + "type": "STRING", + "link": 3528, + "widget": { + "name": "text1" + } + }, + { + "name": "text2", + "type": "STRING", + "link": 3529, + "widget": { + "name": "text2" + } + } + ], + "outputs": [ + { + "name": "text", + "type": "STRING", + "links": [ + 3548 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "ConcatText" + }, + "widgets_values": [ + "", + "" + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 1539, + "type": "CheckpointLoaderSimple", + "pos": { + "0": -328, + "1": -129 + }, + "size": { + "0": 317.883056640625, + "1": 106.47866821289062 + }, + "flags": {}, + "order": 1, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [ + 3427 + ], + "slot_index": 0 + }, + { + "name": "CLIP", + "type": "CLIP", + "links": [ + 3424, + 3432 + ], + "slot_index": 1 + }, + { + "name": "VAE", + "type": "VAE", + "links": [ + 3430 + ], + "slot_index": 2 + } + ], + "properties": { + "Node name for S&R": "CheckpointLoaderSimple" + }, + "widgets_values": [ + "Juggernaut_X_RunDiffusion_Hyper.safetensors" + ], + "color": "#223", + "bgcolor": "#335" + }, + { + "id": 1576, + "type": "RandomizeText", + "pos": { + "0": -1872.521728515625, + "1": 139.67515563964844 + }, + "size": [ + 400.13629383315083, + 124.25364257332262 + ], + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "text", + "type": "STRING", + "links": [ + 3540 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "RandomizeText" + }, + "widgets_values": [ + "sitting on the grass under a tree overlooking the mountains", + 571942818288524, + "randomize" + ], + "color": "#323", + "bgcolor": "#535" + }, + { + "id": 1557, + "type": "RandomizeText", + "pos": { + "0": -1873.2958984375, + "1": -438.8770446777344 + }, + "size": { + "0": 386.8968811035156, + "1": 134.02008056640625 + }, + "flags": {}, + "order": 3, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "text", + "type": "STRING", + "links": [ + 3528 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "RandomizeText" + }, + "widgets_values": [ + "[raw photo|realistic|anime|cartoon]", + 1094367922456323, + "randomize" + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 1559, + "type": "RandomizeText", + "pos": { + "0": -1873.2958984375, + "1": -248.877197265625 + }, + "size": { + "0": 393.25177001953125, + "1": 125.10658264160156 + }, + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "text", + "type": "STRING", + "links": [ + 3529 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "RandomizeText" + }, + "widgets_values": [ + " [man|girl], [happy|angry|surprised]", + 1048538631223636, + "randomize" + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 1563, + "type": "RandomizeText", + "pos": { + "0": -1873.4990234375, + "1": 341.4834289550781 + }, + "size": { + "0": 394.50482177734375, + "1": 153.2019500732422 + }, + "flags": {}, + "order": 5, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "text", + "type": "STRING", + "links": [ + 3544 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "RandomizeText" + }, + "widgets_values": [ + "[wide shot|from above|dynamic angle], [detailed|simple] background", + 202689871172503, + "randomize" + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 1574, + "type": "Note", + "pos": { + "0": -1004.521728515625, + "1": -409.3249816894531 + }, + "size": [ + 591.5566665585122, + 128.15980316826705 + ], + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [], + "outputs": [], + "properties": {}, + "widgets_values": [ + "The result of this group will randomize styles: raw photo, realistic, anime, or cartoon.\nThen, the subject will be either a man or a girl, with an expression of happy, angry, or surprised.\n\nNext, it will randomly use:\n\"standing on a busy street in the city\" or \"sitting on the grass under a tree overlooking the mountains.\"\n\nAt the end, it adds camera and background prompts." + ], + "color": "#322", + "bgcolor": "#533" + }, + { + "id": 1575, + "type": "RandomTextChoice", + "pos": { + "0": -1328.521728515625, + "1": 40.67523193359375 + }, + "size": [ + 277.20001220703125, + 102 + ], + "flags": {}, + "order": 10, + "mode": 0, + "inputs": [ + { + "name": "text1", + "type": "STRING", + "link": 3539, + "widget": { + "name": "text1" + } + }, + { + "name": "text2", + "type": "STRING", + "link": 3540, + "widget": { + "name": "text2" + } + } + ], + "outputs": [ + { + "name": "text", + "type": "STRING", + "links": [ + 3543 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "RandomTextChoice" + }, + "widgets_values": [ + "", + "", + 549579819080192, + "randomize" + ], + "color": "#323", + "bgcolor": "#535" + }, + { + "id": 1561, + "type": "RandomizeText", + "pos": { + "0": -1875.521728515625, + "1": -61.32476043701172 + }, + "size": { + "0": 398.185302734375, + "1": 130.74755859375 + }, + "flags": {}, + "order": 7, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "text", + "type": "STRING", + "links": [ + 3539 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "RandomizeText" + }, + "widgets_values": [ + "standing on the busy street in city", + 960893777396891, + "randomize" + ], + "color": "#323", + "bgcolor": "#535" + }, + { + "id": 1566, + "type": "ConcatText", + "pos": { + "0": -979.521728515625, + "1": -88.32476806640625 + }, + "size": { + "0": 400, + "1": 200 + }, + "flags": { + "collapsed": true + }, + "order": 11, + "mode": 0, + "inputs": [ + { + "name": "text1", + "type": "STRING", + "link": 3548, + "widget": { + "name": "text1" + } + }, + { + "name": "text2", + "type": "STRING", + "link": 3543, + "widget": { + "name": "text2" + } + } + ], + "outputs": [ + { + "name": "text", + "type": "STRING", + "links": [ + 3545 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "ConcatText" + }, + "widgets_values": [ + "", + "" + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 1577, + "type": "ConcatText", + "pos": { + "0": -727, + "1": 378 + }, + "size": [ + 246.93227771403372, + 115.91511138975659 + ], + "flags": { + "collapsed": true + }, + "order": 12, + "mode": 0, + "inputs": [ + { + "name": "text1", + "type": "STRING", + "link": 3545, + "widget": { + "name": "text1" + } + }, + { + "name": "text2", + "type": "STRING", + "link": 3544, + "widget": { + "name": "text2" + } + } + ], + "outputs": [ + { + "name": "text", + "type": "STRING", + "links": [ + 3547 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "ConcatText" + }, + "widgets_values": [ + "", + "" + ], + "color": "#432", + "bgcolor": "#653" + } + ], + "links": [ + [ + 2149, + 925, + 0, + 926, + 0, + "IMAGE" + ], + [ + 2150, + 925, + 1, + 926, + 1, + "MASK" + ], + [ + 2151, + 924, + 1, + 927, + 0, + "CLIP" + ], + [ + 2152, + 924, + 1, + 928, + 0, + "CLIP" + ], + [ + 2153, + 941, + 0, + 929, + 0, + "MODEL" + ], + [ + 2154, + 943, + 0, + 929, + 1, + "CONDITIONING" + ], + [ + 2155, + 943, + 1, + 929, + 2, + "CONDITIONING" + ], + [ + 2156, + 943, + 3, + 929, + 3, + "LATENT" + ], + [ + 2157, + 931, + 0, + 930, + 0, + "IMAGE" + ], + [ + 2158, + 926, + 5, + 930, + 1, + "INT" + ], + [ + 2159, + 926, + 6, + 930, + 2, + "INT" + ], + [ + 2160, + 929, + 0, + 931, + 0, + "LATENT" + ], + [ + 2161, + 924, + 2, + 931, + 1, + "VAE" + ], + [ + 2162, + 925, + 0, + 932, + 0, + "IMAGE" + ], + [ + 2163, + 930, + 0, + 932, + 1, + "IMAGE" + ], + [ + 2164, + 926, + 3, + 932, + 3, + "INT" + ], + [ + 2165, + 926, + 4, + 932, + 4, + "INT" + ], + [ + 2166, + 932, + 0, + 933, + 0, + "IMAGE" + ], + [ + 2167, + 935, + 0, + 934, + 0, + "IMAGE" + ], + [ + 2168, + 926, + 1, + 935, + 0, + "MASK" + ], + [ + 2169, + 934, + 0, + 936, + 0, + "IMAGE" + ], + [ + 2170, + 934, + 0, + 937, + 0, + "IMAGE" + ], + [ + 2171, + 940, + 0, + 938, + 0, + "IMAGE" + ], + [ + 2172, + 926, + 0, + 939, + 0, + "*" + ], + [ + 2173, + 925, + 0, + 940, + 0, + "*" + ], + [ + 2174, + 924, + 0, + 941, + 0, + "MODEL" + ], + [ + 2175, + 942, + 0, + 941, + 1, + "INPAINT_PATCH" + ], + [ + 2176, + 943, + 2, + 941, + 2, + "LATENT" + ], + [ + 2177, + 927, + 0, + 943, + 0, + "CONDITIONING" + ], + [ + 2178, + 928, + 0, + 943, + 1, + "CONDITIONING" + ], + [ + 2179, + 924, + 2, + 943, + 2, + "VAE" + ], + [ + 2180, + 939, + 0, + 943, + 3, + "IMAGE" + ], + [ + 2181, + 936, + 0, + 943, + 4, + "MASK" + ], + [ + 2182, + 939, + 0, + 944, + 0, + "IMAGE" + ], + [ + 2264, + 1002, + 1, + 1005, + 0, + "CLIP" + ], + [ + 2265, + 1002, + 1, + 1006, + 0, + "CLIP" + ], + [ + 2266, + 1019, + 0, + 1007, + 0, + "MODEL" + ], + [ + 2267, + 1021, + 0, + 1007, + 1, + "CONDITIONING" + ], + [ + 2268, + 1021, + 1, + 1007, + 2, + "CONDITIONING" + ], + [ + 2269, + 1021, + 3, + 1007, + 3, + "LATENT" + ], + [ + 2270, + 1009, + 0, + 1008, + 0, + "IMAGE" + ], + [ + 2271, + 1004, + 5, + 1008, + 1, + "INT" + ], + [ + 2272, + 1004, + 6, + 1008, + 2, + "INT" + ], + [ + 2273, + 1007, + 0, + 1009, + 0, + "LATENT" + ], + [ + 2274, + 1002, + 2, + 1009, + 1, + "VAE" + ], + [ + 2276, + 1008, + 0, + 1010, + 1, + "IMAGE" + ], + [ + 2277, + 1004, + 3, + 1010, + 3, + "INT" + ], + [ + 2278, + 1004, + 4, + 1010, + 4, + "INT" + ], + [ + 2281, + 1004, + 1, + 1013, + 0, + "MASK" + ], + [ + 2285, + 1004, + 0, + 1017, + 0, + "*" + ], + [ + 2286, + 1003, + 0, + 1018, + 0, + "*" + ], + [ + 2287, + 1002, + 0, + 1019, + 0, + "MODEL" + ], + [ + 2288, + 1020, + 0, + 1019, + 1, + "INPAINT_PATCH" + ], + [ + 2289, + 1021, + 2, + 1019, + 2, + "LATENT" + ], + [ + 2290, + 1005, + 0, + 1021, + 0, + "CONDITIONING" + ], + [ + 2291, + 1006, + 0, + 1021, + 1, + "CONDITIONING" + ], + [ + 2292, + 1002, + 2, + 1021, + 2, + "VAE" + ], + [ + 2293, + 1017, + 0, + 1021, + 3, + "IMAGE" + ], + [ + 2294, + 1014, + 0, + 1021, + 4, + "MASK" + ], + [ + 2295, + 1017, + 0, + 1022, + 0, + "IMAGE" + ], + [ + 2296, + 1003, + 0, + 1001, + 0, + "IMAGE" + ], + [ + 2297, + 1013, + 0, + 1014, + 0, + "IMAGE" + ], + [ + 2298, + 1001, + 0, + 1004, + 0, + "IMAGE" + ], + [ + 2303, + 1025, + 0, + 1026, + 0, + "IMAGE" + ], + [ + 2304, + 1026, + 0, + 1004, + 1, + "MASK" + ], + [ + 2305, + 1001, + 0, + 1010, + 0, + "IMAGE" + ], + [ + 2306, + 1010, + 0, + 1016, + 0, + "IMAGE" + ], + [ + 2309, + 1001, + 1, + 1029, + 0, + "MASK" + ], + [ + 2310, + 1029, + 0, + 1025, + 0, + "MASK" + ], + [ + 2485, + 1106, + 0, + 1108, + 0, + "FSMCROPPER" + ], + [ + 2486, + 1106, + 0, + 1109, + 0, + "FSMCROPPER" + ], + [ + 2487, + 1107, + 0, + 1110, + 0, + "IMAGE" + ], + [ + 2488, + 1107, + 1, + 1111, + 0, + "IMAGE" + ], + [ + 2509, + 1108, + 0, + 1107, + 0, + "IMAGE" + ], + [ + 2510, + 1108, + 1, + 1107, + 1, + "CROPINFO" + ], + [ + 2511, + 1109, + 1, + 1107, + 2, + "CROPINFO" + ], + [ + 2512, + 1107, + 0, + 1122, + 1, + "IMAGE" + ], + [ + 2514, + 1108, + 1, + 1122, + 2, + "CROPINFO" + ], + [ + 2515, + 1122, + 0, + 1123, + 0, + "IMAGE" + ], + [ + 2520, + 1124, + 0, + 1125, + 0, + "IMAGE" + ], + [ + 2521, + 1124, + 1, + 1125, + 1, + "CROPINFO" + ], + [ + 2522, + 1106, + 0, + 1124, + 0, + "FSMCROPPER" + ], + [ + 2524, + 1122, + 0, + 1124, + 1, + "IMAGE" + ], + [ + 2525, + 1125, + 0, + 1126, + 0, + "IMAGE" + ], + [ + 2526, + 1125, + 1, + 1127, + 0, + "IMAGE" + ], + [ + 2527, + 1128, + 0, + 1129, + 0, + "IMAGE" + ], + [ + 2528, + 1128, + 1, + 1129, + 1, + "CROPINFO" + ], + [ + 2530, + 1106, + 0, + 1128, + 0, + "FSMCROPPER" + ], + [ + 2532, + 1129, + 0, + 1130, + 0, + "IMAGE" + ], + [ + 2533, + 1129, + 1, + 1131, + 0, + "IMAGE" + ], + [ + 2538, + 1132, + 0, + 1133, + 0, + "IMAGE" + ], + [ + 2539, + 1132, + 0, + 1128, + 1, + "IMAGE" + ], + [ + 2542, + 1128, + 1, + 1134, + 2, + "CROPINFO" + ], + [ + 2543, + 1134, + 0, + 1135, + 0, + "IMAGE" + ], + [ + 2546, + 1138, + 0, + 1125, + 2, + "CROPINFO" + ], + [ + 2548, + 1122, + 0, + 1132, + 0, + "IMAGE" + ], + [ + 2549, + 1125, + 0, + 1132, + 1, + "IMAGE" + ], + [ + 2550, + 1124, + 1, + 1132, + 2, + "CROPINFO" + ], + [ + 2551, + 1138, + 0, + 1140, + 0, + "*" + ], + [ + 2552, + 1140, + 0, + 1129, + 2, + "CROPINFO" + ], + [ + 2555, + 1141, + 0, + 1108, + 1, + "IMAGE" + ], + [ + 2556, + 1142, + 0, + 1109, + 1, + "IMAGE" + ], + [ + 2557, + 1141, + 0, + 1122, + 0, + "IMAGE" + ], + [ + 2670, + 1109, + 1, + 1138, + 0, + "*" + ], + [ + 2672, + 1132, + 0, + 1134, + 0, + "IMAGE" + ], + [ + 2673, + 1129, + 0, + 1134, + 1, + "IMAGE" + ], + [ + 2826, + 1301, + 2, + 1303, + 1, + "VAE" + ], + [ + 2831, + 1301, + 1, + 1307, + 0, + "CLIP" + ], + [ + 2834, + 1301, + 2, + 1304, + 1, + "VAE" + ], + [ + 3057, + 1393, + 0, + 1392, + 0, + "UPSCALE_MODEL" + ], + [ + 3059, + 1395, + 0, + 1392, + 1, + "IMAGE" + ], + [ + 3060, + 1392, + 0, + 1397, + 0, + "IMAGE" + ], + [ + 3061, + 1397, + 0, + 1398, + 0, + "IMAGE" + ], + [ + 3309, + 1499, + 0, + 1503, + 0, + "STRING" + ], + [ + 3310, + 1500, + 0, + 1503, + 1, + "STRING" + ], + [ + 3311, + 1503, + 0, + 1504, + 0, + "STRING" + ], + [ + 3312, + 1501, + 0, + 1504, + 1, + "STRING" + ], + [ + 3314, + 1504, + 0, + 1505, + 0, + "STRING" + ], + [ + 3315, + 1502, + 0, + 1505, + 1, + "STRING" + ], + [ + 3344, + 1505, + 0, + 1508, + 0, + "STRING" + ], + [ + 3345, + 1510, + 0, + 1508, + 1, + "STRING" + ], + [ + 3346, + 1508, + 0, + 1509, + 0, + "STRING" + ], + [ + 3347, + 1511, + 0, + 1509, + 1, + "STRING" + ], + [ + 3401, + 1509, + 0, + 1532, + 0, + "STRING" + ], + [ + 3424, + 1539, + 1, + 1541, + 0, + "CLIP" + ], + [ + 3427, + 1539, + 0, + 1540, + 0, + "MODEL" + ], + [ + 3428, + 1542, + 0, + 1540, + 3, + "LATENT" + ], + [ + 3429, + 1540, + 0, + 1543, + 0, + "LATENT" + ], + [ + 3430, + 1539, + 2, + 1543, + 1, + "VAE" + ], + [ + 3431, + 1543, + 0, + 1544, + 0, + "IMAGE" + ], + [ + 3432, + 1539, + 1, + 1545, + 0, + "CLIP" + ], + [ + 3435, + 1545, + 0, + 1540, + 2, + "CONDITIONING" + ], + [ + 3436, + 1541, + 0, + 1540, + 1, + "CONDITIONING" + ], + [ + 3526, + 1555, + 0, + 1538, + 0, + "STRING" + ], + [ + 3527, + 1555, + 0, + 1541, + 1, + "STRING" + ], + [ + 3528, + 1557, + 0, + 1564, + 0, + "STRING" + ], + [ + 3529, + 1559, + 0, + 1564, + 1, + "STRING" + ], + [ + 3539, + 1561, + 0, + 1575, + 0, + "STRING" + ], + [ + 3540, + 1576, + 0, + 1575, + 1, + "STRING" + ], + [ + 3543, + 1575, + 0, + 1566, + 1, + "STRING" + ], + [ + 3544, + 1563, + 0, + 1577, + 1, + "STRING" + ], + [ + 3545, + 1566, + 0, + 1577, + 0, + "STRING" + ], + [ + 3547, + 1577, + 0, + 1555, + 0, + "*" + ], + [ + 3548, + 1564, + 0, + 1566, + 0, + "STRING" + ] + ], + "groups": [ + { + "title": "Randomize text with groups", + "bounding": [ + -1905, + -540, + 1544, + 1168 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + } + ], + "config": {}, + "extra": { + "ds": { + "scale": 0.620921323059155, + "offset": [ + 2019.9913874179324, + 631.990306683603 + ] + }, + "groupNodes": {} + }, + "version": 0.4 +} \ No newline at end of file