mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2026-02-07 16:39:57 +00:00
restrict baking to 16bits
This commit is contained in:
@@ -70,6 +70,11 @@ class ParameterGGUF(torch.nn.Parameter):
|
||||
|
||||
def bake_gguf_model(model):
|
||||
computation_dtype = model.computation_dtype
|
||||
|
||||
if computation_dtype not in [torch.float16, torch.bfloat16]:
|
||||
# Baking only supports 16bits otherwise super slow
|
||||
computation_dtype = torch.float16
|
||||
|
||||
backed_layer_counter = 0
|
||||
|
||||
for m in model.modules():
|
||||
|
||||
Reference in New Issue
Block a user