mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Fix registration of text masks (#2501)
- Scale and crop not applied correctly - Problem found and fixed by @spezialspezial - Closes #2470
This commit is contained in:
commit
17e8f966d0
@ -101,10 +101,9 @@ class Txt2Mask(object):
|
|||||||
|
|
||||||
image = ImageOps.exif_transpose(image)
|
image = ImageOps.exif_transpose(image)
|
||||||
img = self._scale_and_crop(image)
|
img = self._scale_and_crop(image)
|
||||||
img = transform(img).unsqueeze(0)
|
|
||||||
|
|
||||||
inputs = self.processor(text=[prompt],
|
inputs = self.processor(text=[prompt],
|
||||||
images=[image],
|
images=[img],
|
||||||
padding=True,
|
padding=True,
|
||||||
return_tensors='pt')
|
return_tensors='pt')
|
||||||
outputs = self.model(**inputs)
|
outputs = self.model(**inputs)
|
||||||
|
Loading…
Reference in New Issue
Block a user