feat: implement ImageConstraints component with aspect ratio management and model-specific hardware protections

This commit is contained in:
techjarves committed 2026-06-04 20:43:18 +05:30
1 parent 0e5182ab43
commit 86f95f5095
5 files changed
+41 -14

No files matched your search

+14 -1
View File
@@ -513,12 +513,25 @@ function getBackendOptions() {
if (cudaInstalled && !cudaAvailable) {
unavailable.push({ id: "cuda", label: "CUDA GPU", reason: "Installed, but CUDA backend validation failed." });
}
let defaultBackend = "cpu";
if (cudaAvailable) {
const gpuName = String(getGpuInfo().name).toLowerCase();
const isGtxCard = gpuName.includes("gtx");
if (isGtxCard && vulkanAvailable) {
defaultBackend = "vulkan"; // Default to Vulkan for GTX cards because of lack of Tensor Cores
} else {
defaultBackend = "cuda";
}
} else if (vulkanAvailable) {
defaultBackend = "vulkan";
}
cachedBackendOptions = {
options,
unavailable,
cudaAvailable,
vulkanAvailable,
defaultBackendType: cudaAvailable ? "cuda" : vulkanAvailable ? "vulkan" : "cpu",
defaultBackendType: defaultBackend,
};
return cachedBackendOptions;
}