mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
(minor) Use SilenceWarnings as a decorator rather than a context manager to save an indentation level.
This commit is contained in:
parent
8e47e005a7
commit
79ceac2f82
@ -657,8 +657,8 @@ class DenoiseLatentsInvocation(BaseInvocation):
|
||||
return 1 - mask, masked_latents, self.denoise_mask.gradient
|
||||
|
||||
@torch.no_grad()
|
||||
@SilenceWarnings() # This quenches the NSFW nag from diffusers.
|
||||
def invoke(self, context: InvocationContext) -> LatentsOutput:
|
||||
with SilenceWarnings(): # this quenches NSFW nag from diffusers
|
||||
seed = None
|
||||
noise = None
|
||||
if self.noise is not None:
|
||||
|
Loading…
Reference in New Issue
Block a user