Hugging Face
Models
Datasets
Spaces
Posts
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
Duplicated from
TencentARC/T2I-Adapter-SDXL
LujainHani
/
T2I-Adapter-SDXL
like
0
Runtime error
App
Files
Files
Community
5e63b46
T2I-Adapter-SDXL
/
utils.py
hysts
HF staff
Merge sketch app
8f873ac
over 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