Skip to content

Commit

Permalink
fix error with loading T5 in low-VRAM mode
Browse files Browse the repository at this point in the history
  • Loading branch information
seruva19 committed Dec 11, 2024
1 parent 8401e4f commit 6806394
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/models/model_30/kandinsky3/condition_encoders.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ def __init__(
if environment.kd30_low_vram:
quantization_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_compute_type=torch.bfloat16,
bnb_4bit_compute_dtype=torch.bfloat16,
llm_int8_enable_fp32_cpu_offload=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_use_double_quant=False,
)
Expand Down
3 changes: 2 additions & 1 deletion src/models/model_31/kandinsky31/condition_encoders.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ def __init__(
if environment.kd31_low_vram:
quantization_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_compute_type=torch.bfloat16,
bnb_4bit_compute_dtype=torch.bfloat16,
llm_int8_enable_fp32_cpu_offload=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_use_double_quant=False,
)
Expand Down
Empty file added src/utils/web.py
Empty file.

0 comments on commit 6806394

Please sign in to comment.