ariG23498 HF staff commited on
Commit
9c6ac55
·
verified ·
1 Parent(s): 591fbb1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -8
app.py CHANGED
@@ -7,15 +7,11 @@ from diffusers import FluxControlPipeline, FluxTransformer2DModel
7
  ####################################
8
  # Load the model(s) on CPU #
9
  ####################################
10
- edit_transformer = FluxTransformer2DModel.from_pretrained(
11
- "sayakpaul/FLUX.1-dev-edit-v0",
12
- torch_dtype=torch.float32
13
- )
14
  pipeline = FluxControlPipeline.from_pretrained(
15
- "black-forest-labs/FLUX.1-dev",
16
- transformer=edit_transformer,
17
- torch_dtype=torch.float32
18
- )
19
 
20
  #####################################
21
  # The function for our Gradio app #
 
7
  ####################################
8
  # Load the model(s) on CPU #
9
  ####################################
10
+ path = "sayakpaul/FLUX.1-dev-edit-v0"
11
+ edit_transformer = FluxTransformer2DModel.from_pretrained(path, torch_dtype=torch.bfloat16)
 
 
12
  pipeline = FluxControlPipeline.from_pretrained(
13
+ "black-forest-labs/FLUX.1-dev", transformer=edit_transformer, torch_dtype=torch.bfloat16
14
+ ).to("cuda")
 
 
15
 
16
  #####################################
17
  # The function for our Gradio app #