diff --git a/ui/sd_internal/runtime.py b/ui/sd_internal/runtime.py index 69031fba..f2f8d169 100644 --- a/ui/sd_internal/runtime.py +++ b/ui/sd_internal/runtime.py @@ -796,7 +796,7 @@ def _txt2img(opt_W, opt_H, opt_n_samples, opt_ddim_steps, opt_scale, start_code, if sampler_name == 'ddim': thread_data.model.make_schedule(ddim_num_steps=opt_ddim_steps, ddim_eta=opt_ddim_eta, verbose=False) - samples_ddim, intermediates = thread_data.model.sample( + samples_ddim = thread_data.model.sample( S=opt_ddim_steps, conditioning=c, seed=opt_seed, @@ -837,7 +837,7 @@ def _img2img(init_latent, t_enc, batch_size, opt_scale, c, uc, opt_ddim_steps, o ) # decode it - samples_ddim, intermediates = thread_data.model.sample( + samples_ddim = thread_data.model.sample( t_enc, c, z_enc, diff --git a/ui/sd_internal/task_manager.py b/ui/sd_internal/task_manager.py index cfee79f3..ff6cbb4c 100644 --- a/ui/sd_internal/task_manager.py +++ b/ui/sd_internal/task_manager.py @@ -290,6 +290,8 @@ def thread_render(device): current_vae_path = task.request.use_vae_model def step_callback(): + global current_state_error + if isinstance(current_state_error, SystemExit) or isinstance(current_state_error, StopAsyncIteration) or isinstance(task.error, StopAsyncIteration): runtime.thread_data.stop_processing = True if isinstance(current_state_error, StopAsyncIteration):