diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2022-10-15 07:47:26 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-15 07:47:26 +0000 |
commit | f42e0aae6de6b9a7f8da4eaf13594a13502b4fa9 (patch) | |
tree | 472025101577ff5cbd45a3bcb524e6e4accb75ec /scripts/prompts_from_file.py | |
parent | 0e77ee24b0b651d6a564245243850e4fb9831e31 (diff) | |
parent | d13ce89e203d76ab2b54a3406a93a5e4304f529e (diff) | |
download | stable-diffusion-webui-gfx803-f42e0aae6de6b9a7f8da4eaf13594a13502b4fa9.tar.gz stable-diffusion-webui-gfx803-f42e0aae6de6b9a7f8da4eaf13594a13502b4fa9.tar.bz2 stable-diffusion-webui-gfx803-f42e0aae6de6b9a7f8da4eaf13594a13502b4fa9.zip |
Merge branch 'master' into master
Diffstat (limited to 'scripts/prompts_from_file.py')
-rw-r--r-- | scripts/prompts_from_file.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/prompts_from_file.py b/scripts/prompts_from_file.py index 0a862a5b..5732623f 100644 --- a/scripts/prompts_from_file.py +++ b/scripts/prompts_from_file.py @@ -10,7 +10,6 @@ from modules.processing import Processed, process_images from PIL import Image
from modules.shared import opts, cmd_opts, state
-
class Script(scripts.Script):
def title(self):
return "Prompts from file or textbox"
@@ -67,6 +66,9 @@ class Script(scripts.Script): "do_not_save_grid": process_boolean_tag
}
+ def on_show(self, checkbox_txt, file, prompt_txt):
+ return [ gr.Checkbox.update(visible = True), gr.File.update(visible = not checkbox_txt), gr.TextArea.update(visible = checkbox_txt) ]
+
def run(self, p, checkbox_txt, data: bytes, prompt_txt: str):
if (checkbox_txt):
lines = [x.strip() for x in prompt_txt.splitlines()]
|