mirror of
https://github.com/mudler/LocalAI.git
synced 2024-06-07 19:40:48 +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
|
||||
weight_up = elems['lora_up.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:
|
||||
alpha = alpha.item() / weight_up.shape[1]
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user