Unverified Commit a0a51eb0 authored by Álvaro Somoza's avatar Álvaro Somoza Committed by GitHub
Browse files

Kandinsky5 No cfg fix (#12527)

fix
parent a5a0ccf8
...@@ -744,11 +744,13 @@ class Kandinsky5T2VPipeline(DiffusionPipeline, KandinskyLoraLoaderMixin): ...@@ -744,11 +744,13 @@ class Kandinsky5T2VPipeline(DiffusionPipeline, KandinskyLoraLoaderMixin):
) )
if negative_prompt_embeds_qwen is None: if negative_prompt_embeds_qwen is None:
negative_prompt_embeds_qwen, negative_prompt_embeds_clip, negative_cu_seqlens = self.encode_prompt( negative_prompt_embeds_qwen, negative_prompt_embeds_clip, negative_prompt_cu_seqlens = (
prompt=negative_prompt, self.encode_prompt(
max_sequence_length=max_sequence_length, prompt=negative_prompt,
device=device, max_sequence_length=max_sequence_length,
dtype=dtype, device=device,
dtype=dtype,
)
) )
# 4. Prepare timesteps # 4. Prepare timesteps
...@@ -780,8 +782,8 @@ class Kandinsky5T2VPipeline(DiffusionPipeline, KandinskyLoraLoaderMixin): ...@@ -780,8 +782,8 @@ class Kandinsky5T2VPipeline(DiffusionPipeline, KandinskyLoraLoaderMixin):
text_rope_pos = torch.arange(prompt_cu_seqlens.diff().max().item(), device=device) text_rope_pos = torch.arange(prompt_cu_seqlens.diff().max().item(), device=device)
negative_text_rope_pos = ( negative_text_rope_pos = (
torch.arange(negative_cu_seqlens.diff().max().item(), device=device) torch.arange(negative_prompt_cu_seqlens.diff().max().item(), device=device)
if negative_cu_seqlens is not None if negative_prompt_cu_seqlens is not None
else None else None
) )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment