Skip to content
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

feat: add default prompt support #204

Merged
merged 6 commits into from
Jul 25, 2023
Merged

feat: add default prompt support #204

merged 6 commits into from
Jul 25, 2023

Conversation

Ninzore
Copy link
Collaborator

@Ninzore Ninzore commented Jun 26, 2023

Add a new option -d for adding a default prompt to the user prompt.

Allow users to generate images without input (in such cases they must toggle the default option).

Add a new shortcut default for quick accessing the default prompt without any user input.

Add a new option `-d` for adding default prompt to the user prompt.

Allow user to generate images without input (in such case they must toggle the `default` option)

Add a new short cut `default` for quick accessing default prompt without any user input.
Use respond prompt to replace the original prompt as feedback, because the prompt may be affected by some plugins (e.g. dynamic-prompts)
@MaikoTan
Copy link
Member

basePrompt doesn't solved this?

@Ninzore
Copy link
Collaborator Author

Ninzore commented Jun 27, 2023

This function is designed to generate images without any user input, and when users want to input something, this one doesn't modify the input unless the users call the trigger.
On the other hand, the basePrompt modifies the user input, and the original implementation forces the user to input something, which is not very convenient in some use cases.
This defaultPrompt is intended to cooperate with the dynamic prompt, in order to generate random images with some pre-defined prompt. This function may also be extended in the future for more randomised word combinations.
However the name of it might be a little misleading, maybe consider another name?

@MaikoTan
Copy link
Member

Thay makes sense.

But the current implementation doesn't looks good to me. Instead of adding a new shortcut, what about the approach like this:

  • Add a boolean option enableDefaultPrompt, and a string option defaultPrompt.
  • When user invoke the novelai without prompt, check if enableDefaultPrompt was enabled.
    • If so, use the value in defaultPrompt as the prompt.
    • Otherwise, display the help message as before.

Copy link
Member

@MaikoTan MaikoTan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -22,6 +22,7 @@ commands:
strength: 图片修改幅度
noise: 图片噪声强度
hiresFix: 启用高分辨率修复
default: 添加默认提示词
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just 默认标签

@@ -20,6 +20,7 @@ commands:
strength: 圖像修改幅度
noise: 圖像雜訊強度
hiresFix: 啟用高分辨率修復
default: 默認提示詞
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No add translation in a PR, you could add it from crowdin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants