mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 17:24:32 +02:00
reenable preview sigma calculations
Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
+3
-1
@@ -1,6 +1,6 @@
|
||||
# Change Log for SD.Next
|
||||
|
||||
## Update for 2024-12-29
|
||||
## Update for 2024-12-30
|
||||
|
||||
- **LoRA**:
|
||||
- **Sana** support
|
||||
@@ -11,6 +11,7 @@
|
||||
- **LTXVideo** optimizations: full offload, quantization and tiling support
|
||||
- VAE tiling granular options in *settings -> variable auto encoder*
|
||||
- UI: live preview optimizations and error handling
|
||||
- UI: live preview sigma calulations, thanks @Disty0
|
||||
- UI: CSS optimizations when log view is disabled
|
||||
- Samplers: add flow shift options and separate dynamic thresholding from dynamic shifting
|
||||
- **Fixes**
|
||||
@@ -20,6 +21,7 @@
|
||||
- interrogate caption with T5
|
||||
- on-the-fly quantization using TorchAO
|
||||
- remove concurrent preview requests
|
||||
- xyz grid recover on error
|
||||
- hires batch
|
||||
- sdxl refiner
|
||||
- kandinsky
|
||||
|
||||
@@ -169,15 +169,15 @@ class State:
|
||||
try:
|
||||
sample = self.current_latent
|
||||
self.current_image_sampling_step = self.sampling_step
|
||||
"""
|
||||
if self.current_noise_pred is not None and self.current_sigma is not None and self.current_sigma_next is not None:
|
||||
original_sample = sample - (self.current_noise_pred * (self.current_sigma_next-self.current_sigma))
|
||||
# RuntimeError: The size of tensor a (128) must match the size of tensor b (64) at non-singleton dimension 3
|
||||
if self.prediction_type in {"epsilon", "flow_prediction"}:
|
||||
sample = original_sample - (self.current_noise_pred * self.current_sigma)
|
||||
elif self.prediction_type == "v_prediction":
|
||||
sample = self.current_noise_pred * (-self.current_sigma / (self.current_sigma**2 + 1) ** 0.5) + (original_sample / (self.current_sigma**2 + 1)) # pylint: disable=invalid-unary-operand-type
|
||||
"""
|
||||
try:
|
||||
if self.current_noise_pred is not None and self.current_sigma is not None and self.current_sigma_next is not None:
|
||||
original_sample = sample - (self.current_noise_pred * (self.current_sigma_next-self.current_sigma))
|
||||
if self.prediction_type in {"epsilon", "flow_prediction"}:
|
||||
sample = original_sample - (self.current_noise_pred * self.current_sigma)
|
||||
elif self.prediction_type == "v_prediction":
|
||||
sample = self.current_noise_pred * (-self.current_sigma / (self.current_sigma**2 + 1) ** 0.5) + (original_sample / (self.current_sigma**2 + 1)) # pylint: disable=invalid-unary-operand-type
|
||||
except Exception:
|
||||
pass # ignore sigma errors
|
||||
image = sd_samplers.samples_to_image_grid(sample) if shared.opts.show_progress_grid else sd_samplers.sample_to_image(sample)
|
||||
self.assign_current_image(image)
|
||||
self.preview_busy = False
|
||||
|
||||
@@ -379,6 +379,7 @@ class Script(scripts.Script):
|
||||
)
|
||||
|
||||
if not processed.images:
|
||||
active = False
|
||||
return processed # something broke, no further handling needed.
|
||||
# processed.images = (1)*grid + (z > 1 ? z : 0)*subgrids + (x*y*z)*images
|
||||
have_grid = 1 if include_grid else 0
|
||||
|
||||
Reference in New Issue
Block a user