Skip to content

Commit a19663b

Browse files
committed
Fixed error related to loading prompt with Enhance Image mode active
1 parent c070dc8 commit a19663b

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

update_log_mre.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
* Fixed reading paths from paths.json (broken in 2.0.73 MRE).
44
* Fixed error related to playing audio notification.
5+
* Fixed error related to loading prompt with Enhance Image mode active.
56
* Disabling Image-2-Image when Enhance Image is active.
67

78
### 2.0.76 MRE

webui.py

+2-8
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def metadata_to_ctrls(metadata, ctrls):
9292
# image_number
9393
if 'seed' in metadata:
9494
ctrls[6] = metadata['seed']
95-
ctrls[61] = False
95+
ctrls[55] = False
9696
if 'sharpness' in metadata:
9797
ctrls[7] = metadata['sharpness']
9898
if 'sampler_name' in metadata:
@@ -210,12 +210,6 @@ def metadata_to_ctrls(metadata, ctrls):
210210
ctrls[54] = metadata['prompt_expansion']
211211
elif 'software' in metadata and metadata['software'].startswith('Fooocus 1.'):
212212
ctrls[54] = False
213-
# input_image_checkbox
214-
# current_tab
215-
# uov_method
216-
# uov_input_image
217-
# outpaint_selections
218-
# inpaint_input_image
219213
# seed_random
220214
return ctrls
221215

@@ -568,10 +562,10 @@ def verify_input(img2img, canny, depth, gallery_in, gallery_rev, gallery_out):
568562
ctrls += [base_model, refiner_model, base_clip_skip, refiner_clip_skip] + lora_ctrls
569563
ctrls += [save_metadata_json, save_metadata_image] + img2img_ctrls + [same_seed_for_all, output_format]
570564
ctrls += canny_ctrls + depth_ctrls + [prompt_expansion]
565+
load_prompt_button.upload(fn=load_prompt_handler, inputs=[load_prompt_button] + ctrls + [seed_random], outputs=ctrls + [seed_random])
571566
ctrls += [input_image_checkbox, current_tab]
572567
ctrls += [uov_method, uov_input_image]
573568
ctrls += [outpaint_selections, inpaint_input_image]
574-
load_prompt_button.upload(fn=load_prompt_handler, inputs=[load_prompt_button] + ctrls + [seed_random], outputs=ctrls + [seed_random])
575569
generate_button.click(lambda: (gr.update(visible=True, interactive=True), gr.update(visible=False), []), outputs=[stop_button, generate_button, output_gallery]) \
576570
.then(fn=refresh_seed, inputs=[seed_random, image_seed], outputs=image_seed) \
577571
.then(fn=verify_enhance_image, inputs=[input_image_checkbox, img2img_mode], outputs=[img2img_mode]) \

0 commit comments

Comments
 (0)