mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-10 17:14:36 +00:00
allow forced positive prompt
This commit is contained in:
parent
e433afb261
commit
1801594972
1 changed files with 7 additions and 1 deletions
|
@ -591,7 +591,8 @@ def sd_generate(genparams):
|
|||
|
||||
default_adapter = {} if chatcompl_adapter is None else chatcompl_adapter
|
||||
adapter_obj = genparams.get('adapter', default_adapter)
|
||||
forced_negprompt = adapter_obj.get("negative_prompt", "")
|
||||
forced_negprompt = adapter_obj.get("add_sd_negative_prompt", "")
|
||||
forced_posprompt = adapter_obj.get("add_sd_prompt", "")
|
||||
|
||||
prompt = genparams.get("prompt", "high quality")
|
||||
negative_prompt = genparams.get("negative_prompt", "")
|
||||
|
@ -600,6 +601,11 @@ def sd_generate(genparams):
|
|||
negative_prompt += ", " + forced_negprompt
|
||||
else:
|
||||
negative_prompt = forced_negprompt
|
||||
if forced_posprompt!="":
|
||||
if prompt!="":
|
||||
prompt += ", " + forced_posprompt
|
||||
else:
|
||||
prompt = forced_posprompt
|
||||
init_images_arr = genparams.get("init_images", [])
|
||||
init_images = ("" if (not init_images_arr or len(init_images_arr)==0 or not init_images_arr[0]) else init_images_arr[0])
|
||||
denoising_strength = genparams.get("denoising_strength", 0.6)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue