@@ -137,25 +137,17 @@ class StableDiffusion3Pipeline : public DiffusionPipeline {
137
137
138
138
set_scheduler (Scheduler::from_config (root_dir / " scheduler/scheduler_config.json" ));
139
139
140
- // Temporary fix for GPU
141
- ov::AnyMap updated_properties = properties;
142
- if (device.find (" GPU" ) != std::string::npos &&
143
- updated_properties.find (" INFERENCE_PRECISION_HINT" ) == updated_properties.end ()) {
144
- updated_properties[" INFERENCE_PRECISION_HINT" ] = ov::element::f32;
145
- }
146
-
147
140
const std::string text_encoder = data[" text_encoder" ][1 ].get <std::string>();
148
141
if (text_encoder == " CLIPTextModelWithProjection" ) {
149
142
m_clip_text_encoder_1 =
150
- std::make_shared<CLIPTextModelWithProjection>(root_dir / " text_encoder" , device, updated_properties );
143
+ std::make_shared<CLIPTextModelWithProjection>(root_dir / " text_encoder" , device, properties );
151
144
} else {
152
145
OPENVINO_THROW (" Unsupported '" , text_encoder, " ' text encoder type" );
153
146
}
154
147
155
148
const std::string text_encoder_2 = data[" text_encoder_2" ][1 ].get <std::string>();
156
149
if (text_encoder_2 == " CLIPTextModelWithProjection" ) {
157
- m_clip_text_encoder_2 =
158
- std::make_shared<CLIPTextModelWithProjection>(root_dir / " text_encoder_2" , device, updated_properties);
150
+ m_clip_text_encoder_2 = std::make_shared<CLIPTextModelWithProjection>(root_dir / " text_encoder_2" , device, properties);
159
151
} else {
160
152
OPENVINO_THROW (" Unsupported '" , text_encoder_2, " ' text encoder type" );
161
153
}
@@ -164,7 +156,7 @@ class StableDiffusion3Pipeline : public DiffusionPipeline {
164
156
if (!text_encoder_3_json.is_null ()) {
165
157
const std::string text_encoder_3 = text_encoder_3_json.get <std::string>();
166
158
if (text_encoder_3 == " T5EncoderModel" ) {
167
- m_t5_text_encoder = std::make_shared<T5EncoderModel>(root_dir / " text_encoder_3" , device, updated_properties );
159
+ m_t5_text_encoder = std::make_shared<T5EncoderModel>(root_dir / " text_encoder_3" , device, properties );
168
160
} else {
169
161
OPENVINO_THROW (" Unsupported '" , text_encoder_3, " ' text encoder type" );
170
162
}
@@ -180,9 +172,9 @@ class StableDiffusion3Pipeline : public DiffusionPipeline {
180
172
const std::string vae = data[" vae" ][1 ].get <std::string>();
181
173
if (vae == " AutoencoderKL" ) {
182
174
if (m_pipeline_type == PipelineType::TEXT_2_IMAGE)
183
- m_vae = std::make_shared<AutoencoderKL>(root_dir / " vae_decoder" , device, updated_properties );
175
+ m_vae = std::make_shared<AutoencoderKL>(root_dir / " vae_decoder" , device, properties );
184
176
else if (m_pipeline_type == PipelineType::IMAGE_2_IMAGE || m_pipeline_type == PipelineType::INPAINTING) {
185
- m_vae = std::make_shared<AutoencoderKL>(root_dir / " vae_encoder" , root_dir / " vae_decoder" , device, updated_properties );
177
+ m_vae = std::make_shared<AutoencoderKL>(root_dir / " vae_encoder" , root_dir / " vae_decoder" , device, properties );
186
178
} else {
187
179
OPENVINO_ASSERT (" Unsupported pipeline type" );
188
180
}
0 commit comments