Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
ClownsharkBatwing authored Dec 15, 2024
1 parent 77c1a27 commit f462502
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions conditioning.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,8 +522,8 @@ def __call__(self, latent):
region_mask = torch.nn.functional.interpolate(region_mask[None, None, :, :], (h, w), mode='nearest-exact').flatten().unsqueeze(1).repeat(1, cond_reg.size(1))

cond_len_next = cond_len + cond_reg.shape[1]
regional_mask[cond_len:cond_len_next, cond_len:cond_len_next] = True
regional_mask[cond_len:cond_len_next, text_len:] = region_mask.transpose(-1, -2)
regional_mask[cond_len:cond_len_next, cond_len:cond_len_next] = True # TXT 2 TXT
regional_mask[cond_len:cond_len_next, text_len:] = region_mask.transpose(-1, -2) # TXT 2 regional IMG
regional_mask[text_len:, cond_len:cond_len_next] = region_mask

img_size_masks = region_mask[:, :1].repeat(1, img_len)
Expand Down

0 comments on commit f462502

Please sign in to comment.