Download custom_nodes/comfyui_controlnet_aux/src/custom_timm/utils/random.py from StupidGame/MyComfySetUp: direct link, hf CLI and curl.
- Browser
- Download file 178 Bytes
-
https://huggingface.co/StupidGame/MyComfySetUp/resolve/main/custom_nodes/comfyui_controlnet_aux/src/custom_timm/utils/random.py
- Command line
-
hf download hf://StupidGame/MyComfySetUp/custom_nodes/comfyui_controlnet_aux/src/custom_timm/utils/random.py
-
curl -L -o random.py https://huggingface.co/StupidGame/MyComfySetUp/resolve/main/custom_nodes/comfyui_controlnet_aux/src/custom_timm/utils/random.py
178 Bytes
| import random | |
| import numpy as np | |
| import torch | |
| def random_seed(seed=42, rank=0): | |
| torch.manual_seed(seed + rank) | |
| np.random.seed(seed + rank) | |
| random.seed(seed + rank) | |