-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: 关于增加类似dynamic-prompts插件的or语法功能 #168
Comments
Currently, we DON'T support ANY extensions or scripts of In the meantime, |
那我认为如果在您精力允许的情况下,可以在NAI的层面对这个语法进行一种实现。让or的语法在koishi中完成,并将结果发送到webUI进行处理会比较好(实质上webui只是接受了一个固定的结果,对现有和webui的交互不会有任何改动)。当然,我不知道这个功能的重要性是否值得去进行更新支持。 |
Yeah, supporting this syntax is not a difficult thing. But what I pointed out above is that even if we have supported this syntax, Once we support this, that means, let me take your example here, you should write something like: nai --script "Dynamic Prompts v2.5.6"
--script-args "
is_enabled=true,
is_combinatorial=false,
combinatorial_batches=1,
is_magic_prompt=false,
is_feeling_lucky=false,
is_attention_grabber=false,
min_attention=1.1,
max_attention=1.5,
magic_prompt_length=100,
magic_temp_value=0.7,
use_fixed_seed=false,
unlink_seed_from_prompt=false,
disable_negative_prompt=true,
enable_jinja_templates=false,
no_image_generation=false,
max_generations=0,
magic_model=Gustavosta/MagicPrompt-Stable-Diffusion,
magic_blocklist_regex=
"
an (yellow|red) apple Okay, you might say, what about adding a new configuration for this feature? Why talk about this is that I want to show you that the script support is complicated and user-unfriendly, so it would not be in our plan currently. But if there are kind people who want to deal with these bananas, I would appreciate the who. In a nutshell, it is implementable and wonderful. But considering our schedule and abilities, it's a pity that I cannot list this in our plan. Sorry! |
Sorry to hear that, but it's ok and thanks for the detailed explanation. |
@MaikoTan 实际上逻辑层面我想跟您表述的功能是类似于这样的 NAI 接受到 an {red|yellow} apple NAI 识别为 an red apple SDwebUI prompts:an red apple |
我觉得这样做的好处就是,因为模型训练素材来源的问题,大部分模型生成的图会普遍趋向于一个定式。例如我画 1 girl的时候,极大的概率会出现黑色头发或者黄色头发的角色。而我需要其他发色的时候我就需要进行强调,当我需要概率基本相同时出现不同的发色的case时就可以发挥作用。于是在随机的将可控提示词进行组合,可以在保证质量的前提下得出尽可能多的不重复内容的结果。 |
我个人的想法,将这些打包好的随机数写到baseprompt属性中作为preset(当然如果做一个类似wildcard功能的东西进行变量的管理应该会更好),用户要做的仅仅是执行一个nai 1girl就可以得出质量可控的多样化结果。 |
Sorry I am confused. So you are referring to the dynamic extension, but we implement part of its features on our side? BTW, Although the issue #58 was closed, but I would work on this when anyone open a new issue to talk about the details of it. |
OK,let me check the issue #58 and give you a feedback again. btw, I know it is quiet impolite to continue to leave comments in closed issues, thank you for your tolerance. |
I hav read the function description of presets in the issue #58.It's what I want, but I think it should be more functional. These functions are exactly what I described 'wildcard' and 'or command' in this issue. In this way, it is more convenient to input and combine in use. Here is an example:
preset2
And when i use this command Then novelai will get four results
Then select one and send it to webui |
I do a research for this feature and also |
Thank you for your efforts, no matter which node implements this function. |
This issue is stale because it has been open 15 days with no activity. |
@shigma Is there a way to mark an issue never stale? |
@MaikoTan Issues only with certain labels can be marked as stale. |
ai-tag中已实现此功能,故关闭这个comment。 |
It is not exactly the feature described in this issue, and I didn't say I would not implement this. |
使用 5c8a76c 可以一定程度上实现该功能,虽然不是非常优雅 |
Scope
Stable Diffusion WebUI (AUTOMATIC1111)
Describe the problem related to the feature request
在调用NAI时,有时需要切换绘画风格,或者增加一些随机性,但是SD webui的内部可以实现的插件(SD-dynamic_prompts,stable-diffusion-webui-wildcards)NAI调用不到,所以希望NAI也能支持这个功能。
增加随机性是指(借用dynamic_prompts的语法表述):
an {red|yellow} apple
会随机生成 an red apple或者an yellow apple的两种提示词之一
Describe the solution you'd like
在NAI的语法中增加对or语法的支持
Describe alternatives you've considered
是否可以从API调度SD webui中的插件实现语法支持?
Additional context
另外就是,如果在prompts里写这种or的条件句,可能会导致发送图片和关键信息)时候的信息过长和编写prompts时候输入过于复杂,是否可以同时考虑后续增加类似SD-dynamic_prompts的wildcard功能。
将prompts写入command.txt中,当使用__command__作为提示词时,在command.txt中随机提取一行填充为提示词。
当然,如果能从API调度插件的话,这个问题就已经解决了。
The text was updated successfully, but these errors were encountered: