Ashoka74 commited on
Commit
43e5b66
ยท
verified ยท
1 Parent(s): 0c6f3a1

Update app_merged.py

Browse files
Files changed (1) hide show
  1. app_merged.py +15 -8
app_merged.py CHANGED
@@ -166,15 +166,22 @@ unet = UNet2DConditionModel.from_pretrained(sd15_name, subfolder="unet")
166
 
167
 
168
 
169
- fill_pipe = FluxFillPipeline.from_single_file(
170
- "https://huggingface.co/SporkySporkness/FLUX.1-Fill-dev-GGUF/flux1-fill-dev-fp16-Q5_0-GGUF.gguf",
171
- text_encoder= text_encoder,
172
- text_encoder_2 = t5_path,
173
- ignore_mismatched_sizes=True,
174
- low_cpu_mem_usage=False,
175
- torch_dtype=torch.bfloat16
176
- ).to("cuda")
 
 
 
 
177
 
 
 
 
178
 
179
 
180
  try:
 
166
 
167
 
168
 
169
+ # fill_pipe = FluxFillPipeline.from_single_file(
170
+ # "https://huggingface.co/SporkySporkness/FLUX.1-Fill-dev-GGUF/flux1-fill-dev-fp16-Q5_0-GGUF.gguf",
171
+ # text_encoder= text_encoder,
172
+ # text_encoder_2 = t5_path,
173
+ # ignore_mismatched_sizes=True,
174
+ # low_cpu_mem_usage=False,
175
+ # torch_dtype=torch.bfloat16
176
+ # ).to("cuda")
177
+
178
+ from diffusers import FluxTransformer2DModel, FluxFillPipeline
179
+ from transformers import T5EncoderModel
180
+ import torch
181
 
182
+ transformer = FluxTransformer2DModel.from_pretrained("AlekseyCalvin/FluxFillDev_fp8_Diffusers", subfolder="transformer", torch_dtype=torch.bfloat16).to("cuda")
183
+ text_encoder_2 = T5EncoderModel.from_pretrained("AlekseyCalvin/FluxFillDev_fp8_Diffusers", subfolder="text_encoder_2", torch_dtype=torch.bfloat16).to("cuda")
184
+ fill_pipe = FluxFillPipeline.from_pretrained("black-forest-labs/FLUX.1-Fill-dev", transformer=transformer, text_encoder_2=text_encoder_2, torch_dtype=torch.bfloat16).to("cuda")
185
 
186
 
187
  try: