[Bugfix] Fix Ovis Image crash when guidance_scale is set without negative_prompt (#1956)

Signed-off-by: Dnoob <dxpouo@gmail.com>
This commit is contained in:
Dnoob authored and GitHub committed 2026-03-19 16:51:02 +08:00
1 parent b1ceaa7b34
commit 48b3969717
1 file changed
+1
@@ -685,6 +685,7 @@ class OvisImagePipeline(nn.Module, CFGParallelMixin, DiffusionPipelineProfilerMi
negative_text_ids = None
if do_classifier_free_guidance:
negative_prompt = negative_prompt if negative_prompt is not None else ""
negative_prompt_embeds, negative_text_ids = self.encode_prompt(
prompt=negative_prompt,
prompt_embeds=negative_prompt_embeds,