Skip to content

Commit

Permalink
disable image grid
Browse files Browse the repository at this point in the history
disable image grid by default because many users reports performance issues. like lllyasviel#829 and so on.
  • Loading branch information
lllyasviel authored and hervelin committed Nov 7, 2023
1 parent 138078d commit cee2854
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion fooocus_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = '2.1.778'
version = '2.1.779'
8 changes: 4 additions & 4 deletions modules/advanced_parameters.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
adm_scaler_positive, adm_scaler_negative, adm_scaler_end, adaptive_cfg, sampler_name, \
scheduler_name, overwrite_step, overwrite_switch, overwrite_width, overwrite_height, \
scheduler_name, generate_image_grid, overwrite_step, overwrite_switch, overwrite_width, overwrite_height, \
overwrite_vary_strength, overwrite_upscale_strength, \
mixing_image_prompt_and_vary_upscale, mixing_image_prompt_and_inpaint, \
debugging_cn_preprocessor, controlnet_softness, canny_low_threshold, canny_high_threshold, inpaint_engine, \
refiner_swap_method, \
freeu_enabled, freeu_b1, freeu_b2, freeu_s1, freeu_s2 = [None] * 25
freeu_enabled, freeu_b1, freeu_b2, freeu_s1, freeu_s2 = [None] * 26


def set_all_advanced_parameters(*args):
global adm_scaler_positive, adm_scaler_negative, adm_scaler_end, adaptive_cfg, sampler_name, \
scheduler_name, overwrite_step, overwrite_switch, overwrite_width, overwrite_height, \
scheduler_name, generate_image_grid, overwrite_step, overwrite_switch, overwrite_width, overwrite_height, \
overwrite_vary_strength, overwrite_upscale_strength, \
mixing_image_prompt_and_vary_upscale, mixing_image_prompt_and_inpaint, \
debugging_cn_preprocessor, controlnet_softness, canny_low_threshold, canny_high_threshold, inpaint_engine, \
refiner_swap_method, \
freeu_enabled, freeu_b1, freeu_b2, freeu_s1, freeu_s2

adm_scaler_positive, adm_scaler_negative, adm_scaler_end, adaptive_cfg, sampler_name, \
scheduler_name, overwrite_step, overwrite_switch, overwrite_width, overwrite_height, \
scheduler_name, generate_image_grid, overwrite_step, overwrite_switch, overwrite_width, overwrite_height, \
overwrite_vary_strength, overwrite_upscale_strength, \
mixing_image_prompt_and_vary_upscale, mixing_image_prompt_and_inpaint, \
debugging_cn_preprocessor, controlnet_softness, canny_low_threshold, canny_high_threshold, inpaint_engine, \
Expand Down
3 changes: 3 additions & 0 deletions modules/async_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ def yield_result(imgs, do_not_show_finished_images=False):
return

def build_image_wall():
if not advanced_parameters.generate_image_grid:
return

global global_results

if len(global_results) < 2:
Expand Down
4 changes: 4 additions & 0 deletions update_log.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
**(2023 Oct 26) Hi all, the feature updating of Fooocus will (really, really, this time) be paused for about two or three weeks because we really have some other workloads. Thanks for the passion of you all (and we in fact have kept updating even after last pausing announcement a week ago, because of many great feedbacks) - see you soon and we will come back in mid November. However, you may still see updates if other collaborators are fixing bugs or solving problems.**

# 2.1.779

* Disable image grid by default because many users reports performance issues. For example, https://github.com/lllyasviel/Fooocus/issues/829 and so on. The image grid will cause problem when user hard drive is not super fast, or when user internet connection is not very good (eg, run in remote). The option is moved to dev tools if users want to use it. We will take a look at it later.

# 2.1.776

* Support Ctrl+Up/Down Arrow to change prompt emphasizing weights.
Expand Down
6 changes: 5 additions & 1 deletion webui.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,10 @@ def refresh_seed(r, seed_string):
value=modules.path.default_scheduler,
info='Scheduler of Sampler.')

generate_image_grid = gr.Checkbox(label='Generate Image Grid for Each Batch',
info='(Experimental) This may cause performance problems on some computers and certain internet conditions.',
value=False)

overwrite_step = gr.Slider(label='Forced Overwrite of Sampling Step',
minimum=-1, maximum=200, step=1, value=-1,
info='Set as -1 to disable. For developer debugging.')
Expand Down Expand Up @@ -389,7 +393,7 @@ def refresh_seed(r, seed_string):
freeu_ctrls = [freeu_enabled, freeu_b1, freeu_b2, freeu_s1, freeu_s2]

adps = [adm_scaler_positive, adm_scaler_negative, adm_scaler_end, adaptive_cfg, sampler_name,
scheduler_name, overwrite_step, overwrite_switch, overwrite_width, overwrite_height,
scheduler_name, generate_image_grid, overwrite_step, overwrite_switch, overwrite_width, overwrite_height,
overwrite_vary_strength, overwrite_upscale_strength,
mixing_image_prompt_and_vary_upscale, mixing_image_prompt_and_inpaint,
debugging_cn_preprocessor, controlnet_softness, canny_low_threshold, canny_high_threshold,
Expand Down

0 comments on commit cee2854

Please sign in to comment.