added noise mask support

This commit is contained in:
yoinked
2023-11-26 15:47:07 -08:00
committed by GitHub
parent 82b7b817a3
commit a04a7cacd7
+4
View File
@@ -90,6 +90,10 @@ class LatentUpscaler:
lt = samples["samples"] lt = samples["samples"]
lt = model(lt) lt = model(lt)
del model del model
if "noise_mask" in samples.keys():
# expand the noise mask to the same shape as the latent
mask = torch.nn.functional.interpolate(samples['noise_mask'], scale_factor=float(scale_factor), mode='bicubic')
return ({"samples": lt, "noise_mask": mask},)
return ({"samples": lt},) return ({"samples": lt},)
NODE_CLASS_MAPPINGS = { NODE_CLASS_MAPPINGS = {