gokaygokay commited on
Commit
bd6dd54
·
1 Parent(s): 27a3da9
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -285,7 +285,7 @@ if __name__ == "__main__":
285
  file_url = "https://huggingface.co/gokaygokay/flux-game/blob/main/gokaygokay_00001_.q5_1.gguf"
286
  file_url = file_url.replace("/resolve/main/", "/blob/main/").replace("?download=true", "")
287
  single_file_base_model = "camenduru/FLUX.1-dev-diffusers"
288
- quantization_config_tf = BitsAndBytesConfigTF(load_in_4bit=True, bnb_4bit_quant_type="nf4", bnb_4bit_use_double_quant=True, bnb_4bit_compute_dtype=torch.bfloat16)
289
  text_encoder_2 = T5EncoderModel.from_pretrained(single_file_base_model, subfolder="text_encoder_2", torch_dtype=dtype, config=single_file_base_model, quantization_config=quantization_config_tf, token=huggingface_token)
290
  if ".gguf" in file_url:
291
  transformer = FluxTransformer2DModel.from_single_file(file_url, subfolder="transformer", quantization_config=GGUFQuantizationConfig(compute_dtype=dtype), torch_dtype=dtype, config=single_file_base_model)
 
285
  file_url = "https://huggingface.co/gokaygokay/flux-game/blob/main/gokaygokay_00001_.q5_1.gguf"
286
  file_url = file_url.replace("/resolve/main/", "/blob/main/").replace("?download=true", "")
287
  single_file_base_model = "camenduru/FLUX.1-dev-diffusers"
288
+ quantization_config_tf = BitsAndBytesConfigTF(load_in_8bit=True, bnb_8bit_compute_dtype=torch.bfloat16)
289
  text_encoder_2 = T5EncoderModel.from_pretrained(single_file_base_model, subfolder="text_encoder_2", torch_dtype=dtype, config=single_file_base_model, quantization_config=quantization_config_tf, token=huggingface_token)
290
  if ".gguf" in file_url:
291
  transformer = FluxTransformer2DModel.from_single_file(file_url, subfolder="transformer", quantization_config=GGUFQuantizationConfig(compute_dtype=dtype), torch_dtype=dtype, config=single_file_base_model)