rafaaa2105 commited on
Commit
832c70d
·
verified ·
1 Parent(s): 4c2de11

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -11,10 +11,10 @@ device = "cuda" if torch.cuda.is_available() else "cpu"
11
  hf_token = os.getenv('HF_TOKEN')
12
 
13
  if torch.cuda.is_available():
14
- torch_dtype = torch.float16
15
  torch.cuda.empty_cache()
16
  else:
17
- torch_dtype = torch.float32
18
 
19
  taef1 = AutoencoderTiny.from_pretrained("madebyollin/taef1", torch_dtype=dtype).to(device)
20
  pipe = pipeline = AutoPipelineForText2Image.from_pretrained("black-forest-labs/FLUX.1-dev", token=hf_token, torch_dtype=torch.bfloat16)
 
11
  hf_token = os.getenv('HF_TOKEN')
12
 
13
  if torch.cuda.is_available():
14
+ dtype = torch.float16
15
  torch.cuda.empty_cache()
16
  else:
17
+ dtype = torch.float32
18
 
19
  taef1 = AutoencoderTiny.from_pretrained("madebyollin/taef1", torch_dtype=dtype).to(device)
20
  pipe = pipeline = AutoPipelineForText2Image.from_pretrained("black-forest-labs/FLUX.1-dev", token=hf_token, torch_dtype=torch.bfloat16)