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

@ -1,6 +1,6 @@
accelerate
auto-gptq==0.7.1
grpcio==1.70.0
grpcio==1.71.0
protobuf
certifi
transformers

View file

@ -1,4 +1,4 @@
bark==0.1.5
grpcio==1.70.0
grpcio==1.71.0
protobuf
certifi

View file

@ -1,3 +1,3 @@
grpcio==1.70.0
grpcio==1.71.0
protobuf
grpcio-tools

View file

@ -1,4 +1,4 @@
transformers
transformers==4.48.3
accelerate
torch==2.4.1
coqui-tts

View file

@ -1,6 +1,6 @@
--extra-index-url https://download.pytorch.org/whl/cu118
torch==2.4.1+cu118
torchaudio==2.4.1+cu118
transformers
transformers==4.48.3
accelerate
coqui-tts

View file

@ -1,5 +1,5 @@
torch==2.4.1
torchaudio==2.4.1
transformers
transformers==4.48.3
accelerate
coqui-tts

View file

@ -1,6 +1,6 @@
--extra-index-url https://download.pytorch.org/whl/rocm6.0
torch==2.4.1+rocm6.0
torchaudio==2.4.1+rocm6.0
transformers
transformers==4.48.3
accelerate
coqui-tts

View file

@ -5,6 +5,6 @@ torchaudio==2.3.1+cxx11.abi
oneccl_bind_pt==2.3.100+xpu
optimum[openvino]
setuptools
transformers
transformers==4.48.3
accelerate
coqui-tts

View file

@ -1,4 +1,4 @@
grpcio==1.70.0
grpcio==1.71.0
protobuf
certifi
packaging==24.1

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

View file

@ -1,4 +1,4 @@
grpcio==1.70.0
grpcio==1.71.0
protobuf
certifi
wheel

View file

@ -1,3 +1,3 @@
grpcio==1.70.0
grpcio==1.71.0
protobuf
grpcio-tools

View file

@ -1,4 +1,4 @@
grpcio==1.70.0
grpcio==1.71.0
protobuf
phonemizer
scipy

View file

@ -1,3 +1,3 @@
grpcio==1.70.0
grpcio==1.71.0
protobuf
certifi

View file

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

View file

@ -109,6 +109,17 @@ class BackendServicer(backend_pb2_grpc.BackendServicer):
engine_args.swap_space = request.SwapSpace
if request.MaxModelLen != 0:
engine_args.max_model_len = request.MaxModelLen
if request.DisableLogStatus:
engine_args.disable_log_status = request.DisableLogStatus
if request.DType != "":
engine_args.dtype = request.DType
if request.LimitImagePerPrompt != 0 or request.LimitVideoPerPrompt != 0 or request.LimitAudioPerPrompt != 0:
# limit-mm-per-prompt defaults to 1 per modality, based on vLLM docs
engine_args.limit_mm_per_prompt = {
"image": max(request.LimitImagePerPrompt, 1),
"video": max(request.LimitVideoPerPrompt, 1),
"audio": max(request.LimitAudioPerPrompt, 1)
}
try:
self.llm = AsyncLLMEngine.from_engine_args(engine_args)
@ -269,7 +280,7 @@ class BackendServicer(backend_pb2_grpc.BackendServicer):
def load_image(self, image_path: str):
"""
Load an image from the given file path or base64 encoded data.
Args:
image_path (str): The path to the image file or base64 encoded data.
@ -288,7 +299,7 @@ class BackendServicer(backend_pb2_grpc.BackendServicer):
def load_video(self, video_path: str):
"""
Load a video from the given file path.
Args:
video_path (str): The path to the image file.
@ -335,4 +346,4 @@ if __name__ == "__main__":
)
args = parser.parse_args()
asyncio.run(serve(args.addr))
asyncio.run(serve(args.addr))

View file

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