Hugging Face
Models
Datasets
Spaces
Posts
Docs
Solutions
Pricing
Log In
Sign Up
Spaces:
TencentARC
/
T2I-Adapter-SDXL
like
287
Runtime error
App
Files
Files
Community
10
2f10c4a
T2I-Adapter-SDXL
/
utils.py
hysts
HF staff
Merge sketch app
8f873ac
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