Compare commits

..

5 Commits

Author SHA1 Message Date
AUTOMATIC 3690e4e82c fix [Bug]: LoRA don't apply on dropdown list sd_lora #10880 2023-05-31 22:57:27 +03:00
AUTOMATIC1111 6427ffde4d Merge pull request #10808 from AUTOMATIC1111/fix-disable-png-info
fix disable png info
2023-05-31 22:56:56 +03:00
AUTOMATIC1111 c63d46ceb8 Merge pull request #10804 from AUTOMATIC1111/fix-xyz-clip
Fix get_conds_with_caching()
2023-05-31 22:54:51 +03:00
AUTOMATIC1111 fae8bdfa48 Merge pull request #10785 from nyqui/fix-hires.fix
fix "hires. fix" prompt sharing same labels with txt2img_prompt
2023-05-31 22:54:24 +03:00
AUTOMATIC 10dbee0d59 add quoting for infotext values that have a colon in them 2023-05-31 22:54:00 +03:00
5 changed files with 12 additions and 10 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ class ExtraNetworkParams:
self.named = {} self.named = {}
for item in self.items: for item in self.items:
parts = item.split('=', 2) parts = item.split('=', 2) if isinstance(item, str) else [item]
if len(parts) == 2: if len(parts) == 2:
self.named[parts[0]] = parts[1] self.named[parts[0]] = parts[1]
else: else:
+1 -1
View File
@@ -35,7 +35,7 @@ def reset():
def quote(text): def quote(text):
if ',' not in str(text) and '\n' not in str(text): if ',' not in str(text) and '\n' not in str(text) and ':' not in str(text):
return text return text
return json.dumps(text, ensure_ascii=False) return json.dumps(text, ensure_ascii=False)
+6 -3
View File
@@ -493,9 +493,12 @@ def save_image_with_geninfo(image, geninfo, filename, extension=None, existing_p
existing_pnginfo['parameters'] = geninfo existing_pnginfo['parameters'] = geninfo
if extension.lower() == '.png': if extension.lower() == '.png':
pnginfo_data = PngImagePlugin.PngInfo() if opts.enable_pnginfo:
for k, v in (existing_pnginfo or {}).items(): pnginfo_data = PngImagePlugin.PngInfo()
pnginfo_data.add_text(k, str(v)) for k, v in (existing_pnginfo or {}).items():
pnginfo_data.add_text(k, str(v))
else:
pnginfo_data = None
image.save(filename, format=image_format, quality=opts.jpeg_quality, pnginfo=pnginfo_data) image.save(filename, format=image_format, quality=opts.jpeg_quality, pnginfo=pnginfo_data)
+2 -3
View File
@@ -321,14 +321,13 @@ class StableDiffusionProcessing:
have been used before. The second element is where the previously have been used before. The second element is where the previously
computed result is stored. computed result is stored.
""" """
if cache[0] is not None and (required_prompts, steps, opts.CLIP_stop_at_last_layers, shared.sd_model.sd_checkpoint_info) == cache[0]:
if cache[0] is not None and (required_prompts, steps) == cache[0]:
return cache[1] return cache[1]
with devices.autocast(): with devices.autocast():
cache[1] = function(shared.sd_model, required_prompts, steps) cache[1] = function(shared.sd_model, required_prompts, steps)
cache[0] = (required_prompts, steps) cache[0] = (required_prompts, steps, opts.CLIP_stop_at_last_layers, shared.sd_model.sd_checkpoint_info)
return cache[1] return cache[1]
def setup_conds(self): def setup_conds(self):
+2 -2
View File
@@ -505,10 +505,10 @@ def create_ui():
with FormRow(elem_id="txt2img_hires_fix_row4", variant="compact", visible=opts.hires_fix_show_prompts) as hr_prompts_container: with FormRow(elem_id="txt2img_hires_fix_row4", variant="compact", visible=opts.hires_fix_show_prompts) as hr_prompts_container:
with gr.Column(scale=80): with gr.Column(scale=80):
with gr.Row(): with gr.Row():
hr_prompt = gr.Textbox(label="Prompt", elem_id="hires_prompt", show_label=False, lines=3, placeholder="Prompt for hires fix pass.\nLeave empty to use the same prompt as in first pass.", elem_classes=["prompt"]) hr_prompt = gr.Textbox(label="Hires prompt", elem_id="hires_prompt", show_label=False, lines=3, placeholder="Prompt for hires fix pass.\nLeave empty to use the same prompt as in first pass.", elem_classes=["prompt"])
with gr.Column(scale=80): with gr.Column(scale=80):
with gr.Row(): with gr.Row():
hr_negative_prompt = gr.Textbox(label="Negative prompt", elem_id="hires_neg_prompt", show_label=False, lines=3, placeholder="Negative prompt for hires fix pass.\nLeave empty to use the same negative prompt as in first pass.", elem_classes=["prompt"]) hr_negative_prompt = gr.Textbox(label="Hires negative prompt", elem_id="hires_neg_prompt", show_label=False, lines=3, placeholder="Negative prompt for hires fix pass.\nLeave empty to use the same negative prompt as in first pass.", elem_classes=["prompt"])
elif category == "batch": elif category == "batch":
if not opts.dimensions_and_batch_together: if not opts.dimensions_and_batch_together: