Merge branch 'master' into lumina

This commit is contained in:
Ettore Di Giacinto 2025-03-28 15:21:30 +01:00 committed by GitHub
commit 97ccef0222
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
89 changed files with 5545 additions and 2486 deletions

View file

@ -159,6 +159,18 @@ class BackendServicer(backend_pb2_grpc.BackendServicer):
torchType = torch.float16
variant = "fp16"
options = request.Options
# empty dict
self.options = {}
# The options are a list of strings in this form optname:optvalue
# We are storing all the options in a dict so we can use it later when
# generating the images
for opt in options:
key, value = opt.split(":")
self.options[key] = value
local = False
modelFile = request.Model
@ -447,6 +459,9 @@ class BackendServicer(backend_pb2_grpc.BackendServicer):
# create a dictionary of parameters by using the keys from EnableParameters and the values from defaults
kwargs = {key: options.get(key) for key in keys if key in options}
# populate kwargs from self.options.
kwargs.update(self.options)
# Set seed
if request.seed > 0:
kwargs["generator"] = torch.Generator(device=self.device).manual_seed(

View file

@ -1,5 +1,5 @@
setuptools
grpcio==1.70.0
grpcio==1.71.0
pillow
protobuf
certifi