diff --git a/setup.py b/setup.py index 658d67ab..28464388 100644 --- a/setup.py +++ b/setup.py @@ -16,8 +16,8 @@ # Due to an error affecting kenlm and cmake (see https://github.com/kpu/kenlm/pull/464) # Also see the transformers patch for it https://github.com/huggingface/transformers/pull/37091 "kenlm@git+https://github.com/kpu/kenlm@ba83eafdce6553addd885ed3da461bb0d60f8df7", - "transformers[sklearn,sentencepiece,audio,vision]==4.48.0", - "huggingface_hub[hf_transfer]==0.27.1", + "transformers[sklearn,sentencepiece,audio,vision]==4.51.2", + "huggingface_hub[hf_transfer]==0.30.2", # vision "Pillow", "librosa", @@ -34,11 +34,11 @@ extras = {} -extras["st"] = ["sentence_transformers==3.3.1"] -extras["diffusers"] = ["diffusers==0.32.1", "accelerate==1.2.1"] +extras["st"] = ["sentence_transformers==4.0.2"] +extras["diffusers"] = ["diffusers==0.33.1", "accelerate==1.6.0"] # Includes `peft` as PEFT requires `torch` so having `peft` as a core dependency # means that `torch` will be installed even if the `torch` extra is not specified. -extras["torch"] = ["torch==2.3.1", "torchvision", "torchaudio", "peft==0.14.0"] +extras["torch"] = ["torch==2.5.1", "torchvision", "torchaudio", "peft==0.15.1"] extras["test"] = [ "pytest==7.2.1", "pytest-xdist", @@ -60,13 +60,13 @@ version=VERSION, author="Hugging Face", description="Hugging Face Inference Toolkit is for serving 🤗 Transformers models in containers.", - url="", + url="https://github.com/huggingface/huggingface-inference-toolkit", package_dir={"": "src"}, packages=find_packages(where="src"), install_requires=install_requires, extras_require=extras, entry_points={"console_scripts": "serve=sagemaker_huggingface_inference_toolkit.serving:main"}, - python_requires=">=3.8", + python_requires=">=3.9", license="Apache License 2.0", classifiers=[ "Development Status :: 5 - Production/Stable", @@ -76,7 +76,6 @@ "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", diff --git a/src/huggingface_inference_toolkit/diffusers_utils.py b/src/huggingface_inference_toolkit/diffusers_utils.py index 47ddf390..9f893a81 100644 --- a/src/huggingface_inference_toolkit/diffusers_utils.py +++ b/src/huggingface_inference_toolkit/diffusers_utils.py @@ -74,6 +74,7 @@ def __call__( # Call pipeline with parameters out = self.pipeline(prompt, num_images_per_prompt=1, **kwargs) + return out.images[0]