From a49d546125f29056062824a9de45eafd8defb1b7 Mon Sep 17 00:00:00 2001 From: Lincoln Stein Date: Thu, 26 Jan 2023 09:46:34 -0500 Subject: [PATCH] simplified code a bit --- ldm/invoke/txt2mask.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ldm/invoke/txt2mask.py b/ldm/invoke/txt2mask.py index ef9313ad2b..ccb7b1c604 100644 --- a/ldm/invoke/txt2mask.py +++ b/ldm/invoke/txt2mask.py @@ -108,8 +108,7 @@ class Txt2Mask(object): padding=True, return_tensors='pt') outputs = self.model(**inputs) - preds = outputs.logits - heatmap = torch.sigmoid(preds) + heatmap = torch.sigmoid(outputs.logits) return SegmentedGrayscale(image, heatmap) def _scale_and_crop(self, image:Image)->Image: