Weifeng-Chen / prompt2prompt

34 stars 4 forks source link

why only controlling the weights for the unconditional prediction #5

Open garychan22 opened 1 year ago

garychan22 commented 1 year ago

hi, thanks for your excellent repo and i have much fun with trying it

i have a quesion about the attention control on the unconditional prediction only in AttentionControl (p2p_utils.py) according to

attn[h // 2:] = self.forward(attn[h // 2:], is_cross, place_in_unet)

the shape of attn should be [batch_size num_head, res res, max_seq_len], the second half part in attn corresponds to the unconditional

ivanpuhachov commented 3 weeks ago

hi, thanks for your excellent repo and i have much fun with trying it

i have a quesion about the attention control on the unconditional prediction only in AttentionControl (p2p_utils.py) according to

attn[h // 2:] = self.forward(attn[h // 2:], is_cross, place_in_unet)

the shape of attn should be [batch_size num_head, res res, max_seq_len], the second half part in attn corresponds to the unconditional

From the pipeline

noise_pred_uncond, noise_pred_text = noise_pred.chunk(2)

It seems like the second part corresponds to conditional prediction, right?