Hugging Face
Models
Datasets
Spaces
Posts
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
hysts
/
ControlNet-v1-1
like
1.09k
Running
on
L4
App
Files
Files
Community
37
Fetching metadata from the HF Docker repository...
40d380f
ControlNet-v1-1
/
utils.py
hysts
HF staff
Update
ef5a142
about 2 months ago
raw
Copy download link
history
blame
Safe
206 Bytes
import
random
from
settings
import
MAX_SEED
def
randomize_seed_fn
(
seed:
int
, randomize_seed:
bool
) ->
int
:
if
randomize_seed:
seed = random.randint(
0
, MAX_SEED)
# noqa: S311
return
seed