Hugging Face
Models
Datasets
Spaces
Posts
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
Duplicated from
bertjiazheng/KoolCogVideoX
teganmosi
/
KoolCogVideoX
like
0
Sleeping
App
Files
Files
Community
1a0f288
KoolCogVideoX
/
videosys
/
utils
/
debug_utils.py
zxl
first commit
07c6a04
4 months ago
raw
Copy download link
history
blame
Safe
211 Bytes
import
torch.distributed
as
dist
# Print debug information on selected rank
def
print_rank
(
var_name, var_value, rank=
0
):
if
dist.get_rank() == rank:
print
(
f"[Rank
{rank}
]
{var_name}
:
{var_value}
"
)