mirror of
https://github.com/mudler/LocalAI.git
synced 2026-01-05 18:19:53 -06:00
fix(diffusers): fix float detection (#6313)
There was apparently an oversight, this fixes the float/int detection Fixes: https://github.com/mudler/LocalAI/issues/6312 Signed-off-by: Ettore Di Giacinto <mudler@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
ac043ed9ba
commit
c27da0a0f6
@@ -177,7 +177,7 @@ class BackendServicer(backend_pb2_grpc.BackendServicer):
|
||||
key, value = opt.split(":")
|
||||
# if value is a number, convert it to the appropriate type
|
||||
if is_float(value):
|
||||
if value.is_integer():
|
||||
if float(value).is_integer():
|
||||
value = int(value)
|
||||
else:
|
||||
value = float(value)
|
||||
|
||||
Reference in New Issue
Block a user