SamratBarai commited on
Commit
c435c48
·
verified ·
1 Parent(s): f1df3c1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -17,7 +17,12 @@ base_path = "black-forest-labs/FLUX.1-dev"
17
  lora_base_path = "./models"
18
 
19
 
20
- pipe = FluxPipeline.from_pretrained(base_path, torch_dtype=torch.bfloat16)
 
 
 
 
 
21
  transformer = FluxTransformer2DModel.from_pretrained(base_path, subfolder="transformer", torch_dtype=torch.bfloat16)
22
  pipe.transformer = transformer
23
  pipe.to("cuda")
 
17
  lora_base_path = "./models"
18
 
19
 
20
+ pipe = FluxPipeline.from_pretrained(
21
+ base_path,
22
+ torch_dtype=torch.bfloat16,
23
+ device_map="balanced",
24
+ max_memory={0:"16GB", 1:"16GB"}
25
+ )
26
  transformer = FluxTransformer2DModel.from_pretrained(base_path, subfolder="transformer", torch_dtype=torch.bfloat16)
27
  pipe.transformer = transformer
28
  pipe.to("cuda")