File tree Expand file tree Collapse file tree 10 files changed +18
-20
lines changed
usecases/ai/microservices/text-to-image Expand file tree Collapse file tree 10 files changed +18
-20
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ FROM debian:12-slim
55ARG DEBIAN_FRONTEND=noninteractive
66
77# Define the default allowed models and the default model
8- ARG ALLOWED_MODELS="stable-diffusion-v3.5 stable-diffusion-xl"
8+ ARG ALLOWED_MODELS="stable-diffusion-v3.5 stable-diffusion-xl flux-schnell "
99ARG DEFAULT_MODEL="stable-diffusion-v3.5"
1010
1111# Set default model as a build argument and runtime environment variable
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ class FluxDev:
7171 def __init__ (self , quantize = False ):
7272 self .quantize = quantize
7373 self .model_name = "black-forest-labs/FLUX.1-dev"
74- self .model_dir = Path ("flux-dev" )
74+ self .model_dir = Path ("openvino- flux-dev" )
7575 self .random_generator = Generator (42 )
7676
7777 # Automatically convert models during initialization
@@ -98,8 +98,8 @@ def convert_models(self):
9898 print (f"Downloading model: { self .model_name } to { self .model_dir } ..." )
9999 additional_args = {}
100100 additional_args .update ({"weight-format" : "int4" , "group-size" : "64" , "ratio" : "1.0" })
101- # optimum_cli(self.model_name, self.model_dir, additional_args=additional_args)
102- optimum_cli (self .model_name , self .model_dir )
101+ optimum_cli (self .model_name , self .model_dir , additional_args = additional_args )
102+ # optimum_cli(self.model_name, self.model_dir)
103103 print ("Model conversion completed." )
104104
105105 @staticmethod
Original file line number Diff line number Diff line change @@ -17,9 +17,9 @@ accelerate==1.2.1
1717--extra-index-url https://download.pytorch.org/whl/cpu
1818
1919# OpenVINO with version specification
20- openvino == 2024.6 .0
21- openvino-tokenizers == 2024.6 .0
22- openvino-genai == 2024.6 .0
20+ openvino == 2025.0 .0
21+ openvino-tokenizers == 2025.0 .0
22+ openvino-genai == 2025.0 .0
2323
2424# Server
2525fastapi == 0.115.6
Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ pip install --upgrade pip
2121# Install dependencies from requirements.txt
2222echo " Installing dependencies..."
2323pip install -r requirements.txt
24- pip install -q -U --pre --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly " openvino>=2024.5" " openvino-tokenizers>=2024.5" " openvino-genai>=2024.5"
2524
2625# Run server.py
2726echo " Starting the server..."
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ class FluxSchnell:
7171 def __init__ (self , quantize = False ):
7272 self .quantize = quantize
7373 self .model_name = "black-forest-labs/FLUX.1-schnell"
74- self .model_dir = Path ("flux-schnell" )
74+ self .model_dir = Path ("openvino- flux-schnell" )
7575 self .random_generator = Generator (42 )
7676
7777 # Automatically convert models during initialization
@@ -98,8 +98,8 @@ def convert_models(self):
9898 print (f"Downloading model: { self .model_name } to { self .model_dir } ..." )
9999 additional_args = {}
100100 additional_args .update ({"weight-format" : "int4" , "group-size" : "64" , "ratio" : "1.0" })
101- # optimum_cli(self.model_name, self.model_dir, additional_args=additional_args)
102- optimum_cli (self .model_name , self .model_dir )
101+ optimum_cli (self .model_name , self .model_dir , additional_args = additional_args )
102+ # optimum_cli(self.model_name, self.model_dir)
103103 print ("Model conversion completed." )
104104
105105 @staticmethod
Original file line number Diff line number Diff line change @@ -17,9 +17,9 @@ accelerate==1.2.1
1717--extra-index-url https://download.pytorch.org/whl/cpu
1818
1919# OpenVINO with version specification
20- openvino == 2024.6 .0
21- openvino-tokenizers == 2024.6 .0
22- openvino-genai == 2024.6 .0
20+ openvino == 2025.0 .0
21+ openvino-tokenizers == 2025.0 .0
22+ openvino-genai == 2025.0 .0
2323
2424# Server
2525fastapi == 0.115.6
Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ pip install --upgrade pip
2121# Install dependencies from requirements.txt
2222echo " Installing dependencies..."
2323pip install -r requirements.txt
24- pip install -q -U --pre --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly " openvino>=2024.5" " openvino-tokenizers>=2024.5" " openvino-genai>=2024.5"
2524
2625# Run server.py
2726echo " Starting the server..."
Original file line number Diff line number Diff line change 11git+https://github.com/huggingface/optimum-intel.git
2- openvino == 2024.6 .0
3- openvino-tokenizers == 2024.6 .0.0
4- openvino-genai == 2024.6 .0.0
2+ openvino == 2025.0 .0
3+ openvino-tokenizers == 2025 .0.0
4+ openvino-genai == 2025 .0.0
55Pillow == 11.1.0
66diffusers == 0.32.1
77gradio == 5.11.0
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ ipywidgets==8.1.5
1818--extra-index-url https://download.pytorch.org/whl/cpu
1919
2020# OpenVINO with version specification
21- openvino == 2024.6 .0
21+ openvino == 2025.0 .0
2222
2323# Server
2424fastapi == 0.115.6
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ peft==0.14.0
1111
1212git+https://github.com/huggingface/optimum-intel.git
1313
14- openvino == 2024.6 .0
14+ openvino == 2025.0 .0
1515gradio == 5.11.0
1616nncf == 2.14.1
1717IPython == 8.31.0
You can’t perform that action at this time.
0 commit comments