From 3f2bbf02ef1d93edd5bcdd5a64c59616dd746950 Mon Sep 17 00:00:00 2001 From: tim h Date: Mon, 2 Jan 2023 21:30:20 -0600 Subject: [PATCH] checks for nonexistent option in newer webUI on startup --- js/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/index.js b/js/index.js index b22d37b..ab002f0 100644 --- a/js/index.js +++ b/js/index.js @@ -343,6 +343,12 @@ async function testHostConnection() { const response = await fetch( document.getElementById("host").value + "/sdapi/v1/options" ); + const optionsdata = await response.json(); + if (optionsdata["use_scale_latent_for_hires_fix"]) { + const message = `You are using an outdated version of A1111 webUI.\nThe HRfix options will not work until you update to at least commit ef27a18\n(https://github.com/AUTOMATIC1111/stable-diffusion-webui/commit/ef27a18b6b7cb1a8eebdc9b2e88d25baf2c2414d)\nor newer.`; + console.error(message); + alert(message); + } switch (response.status) { case 200: { setConnectionStatus("online");