diff --git a/CHANGELOG.md b/CHANGELOG.md index 2299fae21..6c729a613 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Change Log for SD.Next -## Update for 2024-02-16 +## Update for 2024-02-17 - **Improvements**: - **IP Adapter** major refactor @@ -31,7 +31,8 @@ - [DeepCache](https://github.com/horseee/DeepCache) model acceleration it can produce massive speedups (2x-5x) with no overhead, but with some loss of quality *settings -> compute -> model compile -> deep-cache* and *settings -> compute -> model compile -> cache interval* - - [ZLUDA](https://github.com/vosen/ZLUDA) CUDA wrapper experimental support, thanks @lshqqytiger + - [ZLUDA](https://github.com/vosen/ZLUDA) experimental support, thanks @lshqqytiger + - ZLUDA is CUDA wrapper that can be used for GPUs without native support - best use case is *AMD GPUs on Windows*, see [wiki](https://github.com/vladmandic/automatic/wiki/ZLUDA) for details - **Control** - when performing inpainting, you can specify processing resolution using **size->mask** @@ -66,6 +67,7 @@ - update dependencies - refactor txt2img/img2img api - enhanced theme loader + - add additional debug env variables - **Fixes**: - handle extensions that install conflicting versions of packages `onnxruntime`, `opencv2-python` @@ -81,6 +83,7 @@ - control fix resize causing runtime errors - control fix processor override image after processor change - control fix display grid with batch + - control restore pipeline before running scripts/extensions - handle pipelines that return dict instead of object - lora use strict name matching if preferred option is by-filename - fix inpaint mask only for diffusers diff --git a/modules/processing.py b/modules/processing.py index 298268223..b11cbe60a 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -317,7 +317,6 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed: return create_infotext(p, p.prompts, p.seeds, p.subseeds, index=index, all_negative_prompts=p.negative_prompts) if hasattr(shared.sd_model, 'restore_pipeline') and shared.sd_model.restore_pipeline is not None: - print('HERE') shared.sd_model.restore_pipeline() for i, x_sample in enumerate(x_samples_ddim): diff --git a/modules/processing_diffusers.py b/modules/processing_diffusers.py index 1f31205d3..7a56c66ce 100644 --- a/modules/processing_diffusers.py +++ b/modules/processing_diffusers.py @@ -14,6 +14,7 @@ from modules.onnx_impl import preprocess_pipeline as preprocess_onnx_pipeline, c debug = shared.log.trace if os.environ.get('SD_DIFFUSERS_DEBUG', None) is not None else lambda *args, **kwargs: None +debug_callback = shared.log.trace if os.environ.get('SD_CALLBACK_DEBUG', None) is not None else lambda *args, **kwargs: None debug('Trace: DIFFUSERS') @@ -52,11 +53,9 @@ def process_diffusers(p: processing.StableDiffusionProcessing): time.sleep(0.1) def diffusers_callback(pipe, step: int, timestep: int, kwargs: dict): + latents = kwargs.get('latents', None) + debug_callback(f'Callback: step={step} timestep={timestep} latents={latents.shape if latents is not None else None} kwargs={list(kwargs)}') shared.state.sampling_step = step - if shared.opts.nan_skip: - latents = kwargs.get('latents', None) - if latents is not None: - assert not torch.isnan(latents[..., 0, 0]).all(), f'NaN detected at step {step}: Skipping...' if shared.state.interrupted or shared.state.skipped: raise AssertionError('Interrupted...') if shared.state.paused: @@ -65,8 +64,10 @@ def process_diffusers(p: processing.StableDiffusionProcessing): if shared.state.interrupted or shared.state.skipped: raise AssertionError('Interrupted...') time.sleep(0.1) - if kwargs.get('latents', None) is None: + if latents is None: return kwargs + elif shared.opts.nan_skip: + assert not torch.isnan(latents[..., 0, 0]).all(), f'NaN detected at step {step}: Skipping...' if len(getattr(p, "ip_adapter_names", [])) > 0: ip_adapter_scales = list(p.ip_adapter_scales) ip_adapter_starts = list(p.ip_adapter_starts) diff --git a/wiki b/wiki index 569aa7a72..7654276a0 160000 --- a/wiki +++ b/wiki @@ -1 +1 @@ -Subproject commit 569aa7a72fdac20e4136333cfb66a27f63257a38 +Subproject commit 7654276a07723988aefc17da885de8686ee0c530