Hugging Face
Models
Datasets
Spaces
Posts
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
hysts
/
BLIP-Diffusion
like
13
Running
on
Zero
App
Files
Files
Community
3
a9fba5f
BLIP-Diffusion
/
utils.py
hysts
HF staff
Add files
0a359f0
about 1 year ago
raw
Copy download link
history
blame
Safe
216 Bytes
import
random
import
numpy
as
np
MAX_SEED = np.iinfo(np.int32).
max
def
randomize_seed_fn
(
seed:
int
, randomize_seed:
bool
) ->
int
:
if
randomize_seed:
seed = random.randint(
0
, MAX_SEED)
return
seed