Skip to content

Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.

chore(scripts): default MIOPEN_FIND_MODE=FAST in the H3 VAE encode benchmark

Lincoln Stein44e3ce68a010
diff --git a/scripts/benchmark_minimax_h3_vae_encode.py b/scripts/benchmark_minimax_h3_vae_encode.py
index 806ea16ebc..ac5d30def0 100644
--- a/scripts/benchmark_minimax_h3_vae_encode.py
+++ b/scripts/benchmark_minimax_h3_vae_encode.py
@@ -22,12 +22,17 @@ from __future__ import annotations
import argparse
import contextlib
import json
+import os
import sys
import time
from pathlib import Path
-import numpy as np
-import torch
+# The server sets this at startup (see run_app.py); a standalone script has to do it itself or the
+# warm-up encode spends minutes in MIOpen's exhaustive kernel search on ROCm. Inert elsewhere.
+os.environ.setdefault("MIOPEN_FIND_MODE", "FAST")
+
+import numpy as np # noqa: E402
+import torch # noqa: E402
# Direct script execution puts ``scripts/`` on sys.path, not the repository root.
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))