Skip to content

Commit 520f7a3

Browse files
committed
adding parity test file
1 parent dbd7dfc commit 520f7a3

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

parity_ltx2_maxdiffusion.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,17 @@ def main():
130130
pipe = LTX2Pipeline.from_pretrained(config)
131131

132132
prompt = getattr(config, "prompt", "A man in a brightly lit room...")
133-
if isinstance(prompt, (list, tuple)):
134-
prompt = ", ".join(str(p) for p in prompt)
135-
133+
# config can sometimes parse things as lists rather than strings if they contain commas
134+
if isinstance(prompt, list):
135+
prompt = " ".join([str(p) for p in prompt])
136+
elif isinstance(prompt, tuple):
137+
prompt = " ".join([str(p) for p in prompt])
138+
136139
negative_prompt = getattr(config, "negative_prompt", "shaky, glitchy, low quality...")
137-
if isinstance(negative_prompt, (list, tuple)):
138-
negative_prompt = ", ".join(str(p) for p in negative_prompt)
139-
140+
if isinstance(negative_prompt, list):
141+
negative_prompt = " ".join([str(p) for p in negative_prompt])
142+
elif isinstance(negative_prompt, tuple):
143+
negative_prompt = " ".join([str(p) for p in negative_prompt])
140144
height = getattr(config, "height", 512)
141145
width = getattr(config, "width", 768)
142146
num_frames = getattr(config, "num_frames", 121)

0 commit comments

Comments
 (0)