{"id":16419447,"url":"https://github.com/darkpixel/darkprompts","last_synced_at":"2025-10-26T20:32:38.338Z","repository":{"id":218169881,"uuid":"745755284","full_name":"darkpixel/darkprompts","owner":"darkpixel","description":"Slightly better tools for random prompt generation in ComfyUI","archived":false,"fork":false,"pushed_at":"2024-12-14T15:01:39.000Z","size":1926,"stargazers_count":8,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-05T10:11:24.377Z","etag":null,"topics":["comfyui","prompt-generator"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/darkpixel.png","metadata":{"files":{"readme":"README.md","changelog":"History.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-20T03:35:38.000Z","updated_at":"2024-12-05T14:08:26.000Z","dependencies_parsed_at":"2024-03-10T20:30:34.690Z","dependency_job_id":"59ce5b6a-2e4f-4fa2-9cfe-e3aacec58192","html_url":"https://github.com/darkpixel/darkprompts","commit_stats":null,"previous_names":["darkpixel/darkprompts"],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkpixel%2Fdarkprompts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkpixel%2Fdarkprompts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkpixel%2Fdarkprompts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkpixel%2Fdarkprompts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/darkpixel","download_url":"https://codeload.github.com/darkpixel/darkprompts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238397279,"owners_count":19465146,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["comfyui","prompt-generator"],"created_at":"2024-10-11T07:24:24.605Z","updated_at":"2025-10-26T20:32:37.970Z","avatar_url":"https://github.com/darkpixel.png","language":"Python","funding_links":[],"categories":["Workflows (3395) sorted by GitHub Stars","All Workflows Sorted by GitHub Stars"],"sub_categories":[],"readme":"DarkPrompts\n-----------\n\nA slightly better tool for generating random prompts.\n\nChangelog\n=========\n[changelog](History.md)\n\nDarkPrompt\n==========\nDarkPrompt reads lines from a file and/or a text input, combines them together, optionally strips out comments and blank lines, and then selects a random line for use in generating your prompt based on a seed input.\nIt also has a ```prefix``` and ```suffix``` field so you can easily include additional information with each prompt or wrap it inside a weight.  For example a prefix of ```(``` and a suffix of ```:1.2)``` could return a string:\n```(walking a dog:1.2)``` from an file named ```activities.txt``` that contains a line ```walking a dog```.  There are additional options for randomly disabling a DarkPrompt object from returning anything.  This is useful when you might\nhave a section of prompting that you only occasionally want to include.  For example, you might have different types of shoes you want to add to your character, but occasionally you want the prompt to not mention shoes at all.\n\nUnlike several other ComfyUI projects, the box is somewhat more compact, gives you an easy way to combine file and text sources for prompt generation, and most importantly it re-reads the files after every prompt generation so you don't have to restart ComfyUI after editing wildcard files.\n\nDarkCombiner\n============\nDarkCombiner accepts up to 7 text inputs and combines them with an optional delimiter (```\\n``` by default) with a string output.  This allows you to easily combine multiple DarkPrompt nodes to generate complex prompts.\nIt isn't really needed anymore since DarkPrompt supports combining from previous DarkPrompt nodes.\n\nDarkLoraTagLoader\n=================\nDarkLoraTagLoader is a modified version of [LoraTagLoader(https://github.com/badjeff/comfyui_lora_tag_loader)] that also outputs a LORA_STACK of detected LoRAs for use in things like the Efficient Loader for doing XY Plots.\nLoraTagLoader is licensed under the freedom-hating GPL v3 license which is why the code for DarkLoraTagLoader is under the gplv3 folder and is licensed separately from other files in this project.  It also allows for adjusting LoRA weights.\n\nDarkFaceIndexShuffle\n====================\n[ComfyUI-Reactor-Node](https://github.com/Gourieff/comfyui-reactor-node) supports swapping faces by providing a CSV index of faces (i.e. \"0,1,2,3,4,5\").\nDarkFaceIndexShuffle allows you to enter an array of faces, shuffle the array based on a seed, and stick the result into the Reactor input_faces_index input.\nThis allows you to randomize faces and the order of friends in the scene generated by your prompts.\n\nDarkAnyToString\n===============\nMTB Any To String broke recently for me.  Implemented my own AnyToString.\n\nDarkCheckpointRandomizer\n========================\nAllows you to provide a text-based list of checkpoints (one per line) to be randomly chosen on each generation.\nYou can optionally specify how many iterations to use the checkpoint for.  For example you can specify:\n```\nsdXL_v10.safetensors\nalbedobaseXL_v21.safetensors\n```\n...in your list and ```use_for_iterations``` to 5.  DarkCheckpointRandomizer would pick one of them at random and continue using it for 5 generations.  Then it would pick another one at random.\nDarkCheckpointRandomizer will automatically weed out blank lines and checkpoints that don't exist.  Checkpoints that don't exist are logged to the console.\n\nDarkFolder\n==========\nDarkFolder is used to dynamically generate folder paths for saving images.\nHaving a huge output directory with tons of files makes sorting images a huge pain.  Sure, some people use a date-prefix to create folders, but in any given day you could have thousands or tens of thousands of images.  That's still painful to sort through.\nDarkFolder works with nodes like 'Save Image w/ Metadata' (From [comfy-image-saver](https://github.com/giriss/comfy-image-saver)) that have a path option for saving images.\n\nDarkFolder takes a prefix (```batch-``` by default) and a ```folder_size``` and dynamically generates a new path based on the number of images in existing folders.\nAdditionally there is a ```selection_method``` for choosing how to handle existing folders.\n\nLet's say every time you run a batch on ComfyUI you end up with 8 new images, and you have DarkFolder set to a size of 16 with the selection method set to ```Highest Not Full```.\nOn the first run, it would create a folder called ```batch-0``` and toss the 8 newly generated images into it.\nOn the second run, since ```batch-0``` only has 8 images and the highest \"not-full\" folder is ```batch-0``` it will drop the next 8 images in there.\nOn the third run, ```batch-0``` has 16 images.  Since ```folder_size``` is set to 16, DarkFolder will tell your image saver to use a new folder called ```batch-1``` until it has 16 or more images in it.\n\nThe selection methods:\n\n\u003e Fill Gaps: This will search through any existing folders starting with 0.  Once it finds a folder with less than $folder_size images in it, it saves there.\n\n\u003e Highest Not Full: Regardless of how many folders you have (some could be empty because you've been sorting/deleting), it will find the highest numbered folder that actually contains images\n\n\u003e New Every Generation: This basically ignores $folder_size and just creates a new folder every generation\n\nScreenshot\n==========\n![DarkPrompt](assets/workflow.png \"DarkPrompt\")\n\nInstallation Using ComfyUI Manager\n==================================\nDarkPrompts should now show up in the list of modules in ComfyUI Manager.\nIf not, you can copy the URL of this repo and paste it into the \"Install via Git URL\" box and restart ComfyUI.\n\nInstallation into ComfyUI\n=========================\nGo into your custom_nodes directory and run a ```git clone https://github.com/darkpixel/darkprompts.git``` and then restart ComfyUI.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarkpixel%2Fdarkprompts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdarkpixel%2Fdarkprompts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarkpixel%2Fdarkprompts/lists"}