diff --git a/tangoflux/model.py b/tangoflux/model.py index 8a13706..a3f5ce0 100644 --- a/tangoflux/model.py +++ b/tangoflux/model.py @@ -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)