mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-21 09:47:55 +00:00
fix(diffusers): correctly check alpha (#967)
**Description** Loras that have no alpha would crash otherwise Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
parent
997c39ccd5
commit
158c7867e7
@ -278,7 +278,7 @@ class BackendServicer(backend_pb2_grpc.BackendServicer):
|
|||||||
# get elements for this layer
|
# get elements for this layer
|
||||||
weight_up = elems['lora_up.weight'].to(dtype)
|
weight_up = elems['lora_up.weight'].to(dtype)
|
||||||
weight_down = elems['lora_down.weight'].to(dtype)
|
weight_down = elems['lora_down.weight'].to(dtype)
|
||||||
alpha = elems['alpha']
|
alpha = elems['alpha'] if 'alpha' in elems else None
|
||||||
if alpha:
|
if alpha:
|
||||||
alpha = alpha.item() / weight_up.shape[1]
|
alpha = alpha.item() / weight_up.shape[1]
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user