LPX55 commited on
Commit
5800a84
·
verified ·
1 Parent(s): 2863005

Update redux.py

Browse files
Files changed (1) hide show
  1. redux.py +5 -2
redux.py CHANGED
@@ -10,17 +10,20 @@ from diffusers.utils import load_image
10
 
11
  MAX_SEED = np.iinfo(np.int32).max
12
  MAX_IMAGE_SIZE = 2048
 
13
 
14
  pipe_prior_redux = FluxPriorReduxPipeline.from_pretrained(
15
  "black-forest-labs/FLUX.1-Redux-dev",
16
- torch_dtype=torch.bfloat16
 
17
  ).to("cuda")
18
 
19
  pipe = FluxPipeline.from_pretrained(
20
  "LPX55/FLUX.1-merged_uncensored" ,
21
  text_encoder=None,
22
  text_encoder_2=None,
23
- torch_dtype=torch.bfloat16
 
24
  ).to("cuda")
25
 
26
  @spaces.GPU
 
10
 
11
  MAX_SEED = np.iinfo(np.int32).max
12
  MAX_IMAGE_SIZE = 2048
13
+ huggingface_token = os.getenv("HUGGINFACE_TOKEN")
14
 
15
  pipe_prior_redux = FluxPriorReduxPipeline.from_pretrained(
16
  "black-forest-labs/FLUX.1-Redux-dev",
17
+ torch_dtype=torch.bfloat16,
18
+ token=huggingface_token
19
  ).to("cuda")
20
 
21
  pipe = FluxPipeline.from_pretrained(
22
  "LPX55/FLUX.1-merged_uncensored" ,
23
  text_encoder=None,
24
  text_encoder_2=None,
25
+ torch_dtype=torch.bfloat16,
26
+ token=huggingface_token
27
  ).to("cuda")
28
 
29
  @spaces.GPU