mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Remove 'del' operator overload
This commit is contained in:
parent
d623bd429b
commit
fd8d1c12d4
@ -55,6 +55,3 @@ class DenoiseContext:
|
|||||||
noise_pred: Optional[torch.Tensor] = None
|
noise_pred: Optional[torch.Tensor] = None
|
||||||
|
|
||||||
extra: dict = field(default_factory=dict)
|
extra: dict = field(default_factory=dict)
|
||||||
|
|
||||||
def __delattr__(self, name: str):
|
|
||||||
setattr(self, name, None)
|
|
||||||
|
@ -82,11 +82,11 @@ class StableDiffusionBackend:
|
|||||||
# compute the previous noisy sample x_t -> x_t-1
|
# compute the previous noisy sample x_t -> x_t-1
|
||||||
step_output = ctx.scheduler.step(ctx.noise_pred, ctx.timestep, ctx.latents, **ctx.scheduler_step_kwargs)
|
step_output = ctx.scheduler.step(ctx.noise_pred, ctx.timestep, ctx.latents, **ctx.scheduler_step_kwargs)
|
||||||
|
|
||||||
# del locals
|
# clean up locals
|
||||||
del ctx.latent_model_input
|
ctx.latent_model_input = None
|
||||||
del ctx.negative_noise_pred
|
ctx.negative_noise_pred = None
|
||||||
del ctx.positive_noise_pred
|
ctx.positive_noise_pred = None
|
||||||
del ctx.noise_pred
|
ctx.noise_pred = None
|
||||||
|
|
||||||
return step_output
|
return step_output
|
||||||
|
|
||||||
@ -126,8 +126,9 @@ class StableDiffusionBackend:
|
|||||||
|
|
||||||
ext_manager.callbacks.post_unet(ctx, ext_manager)
|
ext_manager.callbacks.post_unet(ctx, ext_manager)
|
||||||
|
|
||||||
del ctx.unet_kwargs
|
# clean up locals
|
||||||
del ctx.conditioning_mode
|
ctx.unet_kwargs = None
|
||||||
|
ctx.conditioning_mode = None
|
||||||
|
|
||||||
return noise_pred
|
return noise_pred
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user