1 Star 0 Fork 1

ComfyUI/OneButtonPrompt

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
promptvarianttester.py 980 Bytes
一键复制 编辑 原始数据 按行查看 历史
AIrjen 提交于 2024-04-12 13:20 . added bias fixer + some small additions
import sys, os
import random
import uuid
import re
from datetime import datetime
sys.path.append(os.path.abspath(".."))
from build_dynamic_prompt import *
def generatepromptvariants(amount = 1,prompt="",insanitylevel="5"):
loops = int(amount) # amount of images to generate
steps = 0
originalprompt = prompt
insanitylevel = int(insanitylevel)
while steps < loops:
# build prompt
if(originalprompt == ""):
prompt = build_dynamic_prompt(insanitylevel)
result = createpromptvariant(prompt, insanitylevel)
print(result)
print("")
print("loop " + str(steps))
print("")
steps += 1
print("")
print("All done!")
if __name__ == "__main__":
generatepromptvariants(100
,"" #purple (galaxy) in a (bottle:1.2), <bla:1>, background is a lush jungle and a woman wearing a summer dress, -artmovement-
, 5)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ComfyUI_1/OneButtonPrompt.git
git@gitee.com:ComfyUI_1/OneButtonPrompt.git
ComfyUI_1
OneButtonPrompt
OneButtonPrompt
main

搜索帮助