mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): use prompt bug when prompt has colon
This bug is related to the format in which we stored prompts for some time: an array of weighted subprompts. This caused some strife when recalling a prompt if the prompt had colons in it, due to our recently introduced handling of negative prompts. Currently there is no need to store a prompt as anything other than a string, so we revert to doing that. Compatibility with structured prompts is maintained via helper hook.
This commit is contained in:
@ -1383,13 +1383,6 @@ class InvokeAIWebServer:
|
||||
# semantic drift
|
||||
rfc_dict["sampler"] = parameters["sampler_name"]
|
||||
|
||||
# display weighted subprompts (liable to change)
|
||||
subprompts = split_weighted_subprompts(
|
||||
parameters["prompt"], skip_normalize=True
|
||||
)
|
||||
subprompts = [{"prompt": x[0], "weight": x[1]} for x in subprompts]
|
||||
rfc_dict["prompt"] = subprompts
|
||||
|
||||
# 'variations' should always exist and be an array, empty or consisting of {'seed': seed, 'weight': weight} pairs
|
||||
variations = []
|
||||
|
||||
|
Reference in New Issue
Block a user