优化
This commit is contained in:
@@ -39,12 +39,12 @@ class GeneratePrompt:
|
||||
FUNCTION = "prompt_generate"
|
||||
CATEGORY = "PromptWrapper"
|
||||
|
||||
def prompt_generate(self, language, classify, seed, preset_prefix="", preset_suffix="", ainput_prompt=""):
|
||||
def prompt_generate(self, language, classify, seed, preset_prefix="", preset_suffix="", input_prompt=""):
|
||||
|
||||
prompt_words = []
|
||||
|
||||
if ainput_prompt != "":
|
||||
prompt_words.append(ainput_prompt)
|
||||
if input_prompt != "":
|
||||
prompt_words.append(input_prompt)
|
||||
|
||||
if classify != EMPTY_OPTION:
|
||||
# 获取Script的目录路径
|
||||
|
||||
@@ -9,9 +9,7 @@ class SavePrompt:
|
||||
def INPUT_TYPES(s):
|
||||
return {
|
||||
"required": {
|
||||
"text": ("STRING", {
|
||||
"forceInput": True
|
||||
}),
|
||||
"prompt": ("STRING", {"forceInput": True}),
|
||||
"filename": ("STRING", {
|
||||
"default": "custom"
|
||||
})
|
||||
@@ -25,9 +23,10 @@ class SavePrompt:
|
||||
CATEGORY = "PromptWrapper"
|
||||
|
||||
|
||||
def save(self, text="", filename=""):
|
||||
def save(self, prompt="", filename=""):
|
||||
|
||||
text = text.strip()
|
||||
text = prompt.strip()
|
||||
|
||||
if text != "" and text != "\n" and text != "\r\n":
|
||||
# 获取Script的目录路径
|
||||
script_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
@@ -47,6 +46,5 @@ class SavePrompt:
|
||||
fp.write(f"\n{text_data}")
|
||||
|
||||
|
||||
return {"ui": {"text": text}}
|
||||
|
||||
return {"ui": {"text": text}, "result": ()}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user