Skip to content

Commit 6f9bc69

Browse files
authored
Update inference.py
1 parent d251c86 commit 6f9bc69

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

hyvideo/inference.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ def predict(
504504
seed=None,
505505
negative_prompt=None,
506506
infer_steps=50,
507-
guidance_scale=6,
507+
guidance_scale=6.0,
508508
flow_shift=5.0,
509509
embedded_guidance_scale=None,
510510
batch_size=1,
@@ -597,6 +597,8 @@ def predict(
597597
# negative prompt
598598
if negative_prompt is None or negative_prompt == "":
599599
negative_prompt = self.default_negative_prompt
600+
if guidance_scale == 1.0:
601+
negative_prompt = ""
600602
if not isinstance(negative_prompt, str):
601603
raise TypeError(
602604
f"`negative_prompt` must be a string, but got {type(negative_prompt)}"

0 commit comments

Comments
 (0)