Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion tangoflux/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,13 +286,16 @@ def inference_flow(
timesteps=None,
guidance_scale=3,
duration=10,
seed=0,
seed=None,
disable_progress=False,
num_samples_per_prompt=1,
callback_on_step_end=None,
):
"""Only tested for single inference. Haven't test for batch inference"""

if seed is None:
seed = random.randint(0, 2**32 - 1) # Generate a random integer as seed

torch.manual_seed(seed)
if torch.cuda.is_available():
torch.cuda.manual_seed(seed)
Expand Down