Spaces:
Running
on
Zero
Running
on
Zero
gokaygokay
commited on
Commit
·
bd6dd54
1
Parent(s):
27a3da9
t5
Browse files
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(
|
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)
|