From 16b39d266903200d274b8f80fc1f93fec8bce626 Mon Sep 17 00:00:00 2001 From: Raykosan <71210053+Raykosan@users.noreply.github.com> Date: Tue, 11 Aug 2026 22:23:08 +0300 Subject: [PATCH] Minor Fix --- web/rayko_lora_widget.js | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/web/rayko_lora_widget.js b/web/rayko_lora_widget.js index 72b6a5e..d2a1705 100644 --- a/web/rayko_lora_widget.js +++ b/web/rayko_lora_widget.js @@ -129,16 +129,19 @@ app.registerExtension({ this.setSize([this.targetWidth, this.size[1]]); - const collectPresetData = () => ({ - unet_name: this.widgets.find(w => w.name === "unet_name")?.value || "", - weight_dtype: this.widgets.find(w => w.name === "weight_dtype")?.value || "default", - use_clip2: this.widgets.find(w => w.name === "use_clip2")?.value || false, - clip_name: this.widgets.find(w => w.name === "clip_name")?.value || "", - clip_name2: this.widgets.find(w => w.name === "clip_name2")?.value || "", - clip_type: this.widgets.find(w => w.name === "clip_type")?.value || "stable_diffusion", - clip_device: this.widgets.find(w => w.name === "clip_device")?.value || "default", - vae_name: this.widgets.find(w => w.name === "vae_name")?.value || "" - }); + const collectPresetData = () => { + const useClip2 = this.widgets.find(w => w.name === "use_clip2")?.value || false; + return { + unet_name: this.widgets.find(w => w.name === "unet_name")?.value || "", + weight_dtype: this.widgets.find(w => w.name === "weight_dtype")?.value || "default", + use_clip2: useClip2, + clip_name: this.widgets.find(w => w.name === "clip_name")?.value || "", + clip_name2: useClip2 ? (this.widgets.find(w => w.name === "clip_name2")?.value || "") : "", + clip_type: this.widgets.find(w => w.name === "clip_type")?.value || "stable_diffusion", + clip_device: this.widgets.find(w => w.name === "clip_device")?.value || "default", + vae_name: this.widgets.find(w => w.name === "vae_name")?.value || "" + }; + }; const applyPresetData = (data) => { const setWidgetValue = (name, value) => {