jiuface commited on
Commit
564e11f
·
verified ·
1 Parent(s): e60ffba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -35,12 +35,11 @@ print(device)
35
  base_model = "black-forest-labs/FLUX.1-dev"
36
 
37
  # load pipe
38
- taef1 = AutoencoderTiny.from_pretrained("madebyollin/taef1", torch_dtype=dtype).to(device)
39
- good_vae = AutoencoderKL.from_pretrained(base_model, subfolder="vae", torch_dtype=dtype).to(device)
40
 
41
- txt2img_pipe = DiffusionPipeline.from_pretrained(base_model, torch_dtype=dtype).to(device)
42
  txt2img_pipe.__class__.load_lora_into_transformer = classmethod(load_lora_into_transformer)
43
- txt2img_pipe.to(device)
44
 
45
 
46
  MAX_SEED = 2**32 - 1
 
35
  base_model = "black-forest-labs/FLUX.1-dev"
36
 
37
  # load pipe
38
+ taef1 = AutoencoderTiny.from_pretrained("madebyollin/taef1", torch_dtype=dtype).to_empty(device)
39
+ good_vae = AutoencoderKL.from_pretrained(base_model, subfolder="vae", torch_dtype=dtype).to_empty(device)
40
 
41
+ txt2img_pipe = DiffusionPipeline.from_pretrained(base_model, torch_dtype=dtype).to_empty(device)
42
  txt2img_pipe.__class__.load_lora_into_transformer = classmethod(load_lora_into_transformer)
 
43
 
44
 
45
  MAX_SEED = 2**32 - 1