      // Default: style
          rawResult = await stability.controlStyle({
            imagePath: fileElem.files[0],
            prompt: promptVal,
            output_format: 'png',
            accept: 'image/*'
          });
        }

        const blob = new Blob([rawResult], { type: 'image/png' });
        const objectURL = URL.createObjectURL(blob);

        styledImage.src = objectURL;
        styledImage.style.display = "block";
        resultBox.textContent = "Done!";
      } catch (err) {
       