vcollos commited on
Commit
9b087dd
·
verified ·
1 Parent(s): abb8abb
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -210,15 +210,18 @@ loras = [
210
  #--------------------------------------------------Model Initialization-----------------------------------------------------------------------------------------#
211
  from diffusers import AutoencoderKL
212
 
 
 
 
213
  good_vae = AutoencoderKL.from_pretrained(
214
  "black-forest-labs/FLUX.1-dev",
215
  subfolder="vae",
216
  torch_dtype=dtype,
217
- use_auth_token=True # Inclui o token de autenticação
218
- ).to(device)
 
219
 
220
 
221
- dtype = torch.bfloat16
222
  device = "cuda" if torch.cuda.is_available() else "cpu"
223
  base_model = "black-forest-labs/FLUX.1-dev"
224
 
 
210
  #--------------------------------------------------Model Initialization-----------------------------------------------------------------------------------------#
211
  from diffusers import AutoencoderKL
212
 
213
+ # Definir dtype antes de usar
214
+ dtype = torch.bfloat16
215
+
216
  good_vae = AutoencoderKL.from_pretrained(
217
  "black-forest-labs/FLUX.1-dev",
218
  subfolder="vae",
219
  torch_dtype=dtype,
220
+ use_auth_token=True
221
+ ).to("cuda" if torch.cuda.is_available() else "cpu")
222
+
223
 
224
 
 
225
  device = "cuda" if torch.cuda.is_available() else "cpu"
226
  base_model = "black-forest-labs/FLUX.1-dev"
227