LPX55 commited on
Commit
ba02a5b
Β·
verified Β·
1 Parent(s): d2dacdf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -39,15 +39,15 @@ good_vae = AutoencoderKL.from_pretrained("black-forest-labs/FLUX.1-dev",
39
  # token=HF_TOKEN
40
  # )
41
 
42
- # # Quantize the text encoder to 8-bit precision
43
- # quant_config = BitsAndBytesConfig(load_in_8bit=True)
44
- # text_encoder_8bit = T5EncoderModel.from_pretrained(
45
- # "black-forest-labs/FLUX.1-dev",
46
- # subfolder="text_encoder_2",
47
- # quantization_config=quant_config,
48
- # torch_dtype=torch.float16,
49
- # token=HF_TOKEN
50
- # )
51
 
52
  # # Load necessary models and processors
53
  # controlnet = FluxControlNetModel.from_pretrained("alimama-creative/FLUX.1-dev-Controlnet-Inpainting-Beta", torch_dtype=torch.bfloat16)
 
39
  # token=HF_TOKEN
40
  # )
41
 
42
+ # Quantize the text encoder to 8-bit precision
43
+ quant_config = BitsAndBytesConfig(load_in_8bit=True)
44
+ text_encoder_8bit = T5EncoderModel.from_pretrained(
45
+ "black-forest-labs/FLUX.1-dev",
46
+ subfolder="text_encoder_2",
47
+ quantization_config=quant_config,
48
+ torch_dtype=torch.float16,
49
+ token=HF_TOKEN
50
+ )
51
 
52
  # # Load necessary models and processors
53
  # controlnet = FluxControlNetModel.from_pretrained("alimama-creative/FLUX.1-dev-Controlnet-Inpainting-Beta", torch_dtype=torch.bfloat16)