mirror of
https://github.com/vladmandic/automatic
synced 2026-09-18 16:54:33 +02:00
@@ -28,11 +28,10 @@ class Script(scripts.Script):
|
||||
p.init_latent = slerp(p.subseed_strength, latents, var_latents) if p.subseed_strength < 1 else var_latents
|
||||
p.generator = generator if p.subseed_strength <= 0.5 else var_generator
|
||||
|
||||
|
||||
def process_batch(self, p: processing.StableDiffusionProcessing, *args, **kwargs): # pylint: disable=arguments-differ
|
||||
from modules.processing_helpers import create_random_tensors
|
||||
if not shared.native:
|
||||
if not shared.native or not shared.sd_loaded or not hasattr(shared.sd_model, 'unet'):
|
||||
return
|
||||
from modules.processing_helpers import create_random_tensors
|
||||
args = list(args)
|
||||
if p.subseed_strength != 0 and getattr(shared.sd_model, '_execution_device', None) is not None:
|
||||
# alt method using slerp
|
||||
@@ -45,4 +44,5 @@ class Script(scripts.Script):
|
||||
subseed_strength=p.subseed_strength,
|
||||
p=p
|
||||
)
|
||||
shared.log.debug(f'Latent: seed={p.seeds} subseed={p.subseeds} strength={p.subseed_strength} tensor={list(p.init_latent.shape)}')
|
||||
p.init_latent = p.init_latent.to(device=shared.sd_model._execution_device, dtype=shared.sd_model.unet.dtype) # pylint: disable=protected-access
|
||||
|
||||
+1
-1
Submodule wiki updated: a04284d619...e45bfe41f0
Reference in New Issue
Block a user