mirror of
https://github.com/vladmandic/automatic
synced 2026-09-20 01:31:13 +02:00
bugfix release
This commit is contained in:
@@ -712,7 +712,7 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed:
|
||||
shared.state.current_latent = latents
|
||||
shared.state.set_current_image()
|
||||
|
||||
# shared.sd_model.to(devices.device)
|
||||
shared.sd_model.to(devices.device)
|
||||
output = shared.sd_model( # pylint: disable=not-callable
|
||||
prompt=prompts,
|
||||
negative_prompt=negative_prompts,
|
||||
@@ -725,12 +725,12 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed:
|
||||
cross_attention_kwargs=cross_attention_kwargs,
|
||||
**task_specific_kwargs
|
||||
)
|
||||
# if shared.cmd_opts.lowvram or shared.cmd_opts.medvram:
|
||||
# shared.sd_model.to('cpu')
|
||||
# devices.torch_gc(force=True)
|
||||
|
||||
if shared.sd_refiner is not None:
|
||||
# shared.sd_refiner.to(devices.device)
|
||||
if shared.opts.diffusers_move_base:
|
||||
shared.log.debug('Moving base model to CPU')
|
||||
shared.sd_model.to('cpu')
|
||||
shared.sd_refiner.to(devices.device)
|
||||
devices.torch_gc()
|
||||
init_image = output.images[0]
|
||||
output = shared.sd_refiner( # pylint: disable=not-callable
|
||||
@@ -745,9 +745,9 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed:
|
||||
cross_attention_kwargs=cross_attention_kwargs,
|
||||
image=init_image
|
||||
)
|
||||
# if shared.cmd_opts.lowvram or shared.cmd_opts.medvram:
|
||||
# shared.sd_refiner.to('cpu')
|
||||
# devices.torch_gc(force=True)
|
||||
if shared.opts.diffusers_move_refiner:
|
||||
shared.log.debug('Moving refiner model to CPU')
|
||||
shared.sd_refiner.to('cpu')
|
||||
|
||||
|
||||
x_samples_ddim = output.images
|
||||
|
||||
Reference in New Issue
Block a user