weathon commited on
Commit
b04cf25
·
verified ·
1 Parent(s): 6f3f692

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -62,7 +62,7 @@ def generate_video(positive_prompt, negative_prompt, guidance_scale, bias, step,
62
  print(img_len)
63
  mask = torch.zeros((1, img_len, pos_len+neg_len)).cuda()
64
  # mask[:, :, -neg_len:] = -torch.inf # this should be negative
65
- mask[:, :, -neg_len:] = bias
66
 
67
  for block in pipe.transformer.blocks:
68
  block.attn2.processor = WanAttnProcessor2_0(scale=guidance_scale, neg_prompt_length=neg_len, attn_mask=mask)
 
62
  print(img_len)
63
  mask = torch.zeros((1, img_len, pos_len+neg_len)).cuda()
64
  # mask[:, :, -neg_len:] = -torch.inf # this should be negative
65
+ mask[:, :, -neg_len:] = -bias
66
 
67
  for block in pipe.transformer.blocks:
68
  block.attn2.processor = WanAttnProcessor2_0(scale=guidance_scale, neg_prompt_length=neg_len, attn_mask=mask)