MCPcopy Create free account
hub / github.com/ModelTC/LightX2V / seed_all

Function seed_all

lightx2v/utils/utils.py:29–37  ·  view source on GitHub ↗
(seed)

Source from the content-addressed store, hash-verified

27
28
29def seed_all(seed):
30 random.seed(seed)
31 os.environ["PYTHONHASHSEED"] = str(seed)
32 np.random.seed(seed)
33 torch.manual_seed(seed)
34 torch_device_module.manual_seed(seed)
35 torch_device_module.manual_seed_all(seed)
36 torch.backends.cudnn.benchmark = False
37 torch.backends.cudnn.deterministic = True
38
39
40def save_videos_grid(videos: torch.Tensor, path: str, rescale=False, n_rows=1, fps=24):

Callers 13

mainFunction · 0.90
generateMethod · 0.90
initMethod · 0.90
initMethod · 0.90
initMethod · 0.90
mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected