File tree 10 files changed +18
-20
lines changed
usecases/ai/microservices/text-to-image
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
5
5
ARG DEBIAN_FRONTEND=noninteractive
6
6
7
7
# 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 "
9
9
ARG DEFAULT_MODEL="stable-diffusion-v3.5"
10
10
11
11
# 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:
71
71
def __init__ (self , quantize = False ):
72
72
self .quantize = quantize
73
73
self .model_name = "black-forest-labs/FLUX.1-dev"
74
- self .model_dir = Path ("flux-dev" )
74
+ self .model_dir = Path ("openvino- flux-dev" )
75
75
self .random_generator = Generator (42 )
76
76
77
77
# Automatically convert models during initialization
@@ -98,8 +98,8 @@ def convert_models(self):
98
98
print (f"Downloading model: { self .model_name } to { self .model_dir } ..." )
99
99
additional_args = {}
100
100
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)
103
103
print ("Model conversion completed." )
104
104
105
105
@staticmethod
Original file line number Diff line number Diff line change @@ -17,9 +17,9 @@ accelerate==1.2.1
17
17
--extra-index-url https://download.pytorch.org/whl/cpu
18
18
19
19
# 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
23
23
24
24
# Server
25
25
fastapi == 0.115.6
Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ pip install --upgrade pip
21
21
# Install dependencies from requirements.txt
22
22
echo " Installing dependencies..."
23
23
pip 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"
25
24
26
25
# Run server.py
27
26
echo " Starting the server..."
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ class FluxSchnell:
71
71
def __init__ (self , quantize = False ):
72
72
self .quantize = quantize
73
73
self .model_name = "black-forest-labs/FLUX.1-schnell"
74
- self .model_dir = Path ("flux-schnell" )
74
+ self .model_dir = Path ("openvino- flux-schnell" )
75
75
self .random_generator = Generator (42 )
76
76
77
77
# Automatically convert models during initialization
@@ -98,8 +98,8 @@ def convert_models(self):
98
98
print (f"Downloading model: { self .model_name } to { self .model_dir } ..." )
99
99
additional_args = {}
100
100
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)
103
103
print ("Model conversion completed." )
104
104
105
105
@staticmethod
Original file line number Diff line number Diff line change @@ -17,9 +17,9 @@ accelerate==1.2.1
17
17
--extra-index-url https://download.pytorch.org/whl/cpu
18
18
19
19
# 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
23
23
24
24
# Server
25
25
fastapi == 0.115.6
Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ pip install --upgrade pip
21
21
# Install dependencies from requirements.txt
22
22
echo " Installing dependencies..."
23
23
pip 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"
25
24
26
25
# Run server.py
27
26
echo " Starting the server..."
Original file line number Diff line number Diff line change 1
1
git+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
5
5
Pillow == 11.1.0
6
6
diffusers == 0.32.1
7
7
gradio == 5.11.0
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ ipywidgets==8.1.5
18
18
--extra-index-url https://download.pytorch.org/whl/cpu
19
19
20
20
# OpenVINO with version specification
21
- openvino == 2024.6 .0
21
+ openvino == 2025.0 .0
22
22
23
23
# Server
24
24
fastapi == 0.115.6
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ peft==0.14.0
11
11
12
12
git+https://github.com/huggingface/optimum-intel.git
13
13
14
- openvino == 2024.6 .0
14
+ openvino == 2025.0 .0
15
15
gradio == 5.11.0
16
16
nncf == 2.14.1
17
17
IPython == 8.31.0
You can’t perform that action at this time.
0 commit comments