Skip to content

Commit c322e87

Browse files
Merge pull request #145 from bharaathm1/main
SD V1.5 load model for GPU updated with GPU_QUEUE_THROTTLE_LOW Flag
2 parents a5acb12 + 2a22c6b commit c322e87

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

gimpopenvino/plugins/openvino_utils/tools/openvino_common/models_ov/stable_diffusion_engine.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,11 @@ def load_model(self, model, model_name, device):
177177
if "NPU" in device:
178178
with open(os.path.join(model, f"{model_name}.blob"), "rb") as f:
179179
return self.core.import_model(f.read(), device)
180-
return self.core.compile_model(os.path.join(model, f"{model_name}.xml"), device)
181-
180+
elif "GPU" in device:
181+
return self.core.compile_model(os.path.join(model, f"{model_name}.xml"), device, {'GPU_QUEUE_THROTTLE': 'LOW'})
182+
else:
183+
return self.core.compile_model(os.path.join(model, f"{model_name}.xml"), device)
184+
182185
def set_dimensions(self):
183186
latent_shape = self.unet.input("latent_model_input").shape
184187
if latent_shape[1] == 4:

0 commit comments

Comments
 (0)