Overhaul Studio controls and add image batch from one still.
Video and Image pickers, thumbwheels, aspect icons, and a Scale to MP paddle; extra prompts default to batch so each run starts from the original image. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+24
-37
@@ -42,39 +42,27 @@
|
||||
Remove
|
||||
</button>
|
||||
</div>
|
||||
<div class="mt-1.5 grid grid-cols-2 gap-2">
|
||||
<label class="block min-w-0">
|
||||
<span class="mb-0.5 flex justify-between text-[10px] uppercase tracking-wider text-zinc-500">
|
||||
<span>Model</span>
|
||||
<span class="tabular-nums normal-case text-zinc-400">{{ formatLoraStrength(item.strengthModel) }}</span>
|
||||
</span>
|
||||
<input
|
||||
type="range"
|
||||
class="aigen-slider w-full"
|
||||
:min="LORA_STRENGTH_MIN"
|
||||
:max="LORA_STRENGTH_MAX"
|
||||
:step="LORA_STRENGTH_STEP"
|
||||
:value="item.strengthModel"
|
||||
:disabled="disabled"
|
||||
@input="setStrength(index, 'strengthModel', $event)"
|
||||
>
|
||||
</label>
|
||||
<label class="block min-w-0" :class="{ 'opacity-50': !clipStrength }">
|
||||
<span class="mb-0.5 flex justify-between text-[10px] uppercase tracking-wider text-zinc-500">
|
||||
<span>CLIP</span>
|
||||
<span class="tabular-nums normal-case text-zinc-400">{{ formatLoraStrength(item.strengthClip) }}</span>
|
||||
</span>
|
||||
<input
|
||||
type="range"
|
||||
class="aigen-slider w-full"
|
||||
:min="LORA_STRENGTH_MIN"
|
||||
:max="LORA_STRENGTH_MAX"
|
||||
:step="LORA_STRENGTH_STEP"
|
||||
:value="item.strengthClip"
|
||||
:disabled="disabled || !clipStrength"
|
||||
@input="setStrength(index, 'strengthClip', $event)"
|
||||
>
|
||||
</label>
|
||||
<div class="mt-1.5 flex flex-wrap gap-3">
|
||||
<Thumbwheel
|
||||
:model-value="item.strengthModel"
|
||||
label="Model"
|
||||
:min="LORA_STRENGTH_MIN"
|
||||
:max="LORA_STRENGTH_MAX"
|
||||
:step="LORA_STRENGTH_STEP"
|
||||
compact
|
||||
:disabled="disabled"
|
||||
@update:model-value="setStrength(index, 'strengthModel', $event)"
|
||||
/>
|
||||
<Thumbwheel
|
||||
:model-value="item.strengthClip"
|
||||
label="CLIP"
|
||||
:min="LORA_STRENGTH_MIN"
|
||||
:max="LORA_STRENGTH_MAX"
|
||||
:step="LORA_STRENGTH_STEP"
|
||||
compact
|
||||
:disabled="disabled || !clipStrength"
|
||||
@update:model-value="setStrength(index, 'strengthClip', $event)"
|
||||
/>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -107,7 +95,6 @@ import {
|
||||
LORA_STRENGTH_MIN,
|
||||
LORA_STRENGTH_STEP,
|
||||
clampLoraStrength,
|
||||
formatLoraStrength,
|
||||
loraDisplayName,
|
||||
loraIdentityKey,
|
||||
makeLoraStackItem,
|
||||
@@ -208,8 +195,8 @@ function onDragEnd() {
|
||||
dragOverIndex.value = null
|
||||
}
|
||||
|
||||
function setStrength(index: number, key: 'strengthModel' | 'strengthClip', event: Event) {
|
||||
const value = clampLoraStrength((event.target as HTMLInputElement).value)
|
||||
model.value = model.value.map((item, i) => i === index ? { ...item, [key]: value } : item)
|
||||
function setStrength(index: number, key: 'strengthModel' | 'strengthClip', value: number) {
|
||||
const next = clampLoraStrength(value)
|
||||
model.value = model.value.map((item, i) => i === index ? { ...item, [key]: next } : item)
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user