Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 42 additions & 18 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ const imageInputsSummary = computed(() => {
if (form.ref_images.length) parts.push(`${form.ref_images.length} refs`);
} else {
if (form.end_image) parts.push("end");
if (form.ref_images.length) parts.push(`${form.ref_images.length} refs`);
if (form.control_frames.length) parts.push(`${form.control_frames.length} frames`);
}
return parts.length ? parts.join(" · ") : "No images";
Expand Down Expand Up @@ -793,24 +794,47 @@ onBeforeUnmount(() => {
</div>
</div>

<div v-else class="group">
<label>Control Frames</label>
<ImageDropzone
label="Control Frames"
description="Upload ordered conditioning frames. The server preserves the array order."
:items="form.control_frames"
multiple
@select="assignImages('control_frames', $event)"
@clear="clearImage('control_frames')"
/>
<div v-if="!form.control_frames.length" class="hint">No files selected.</div>
<div v-else class="file-list">
<div v-for="(item, index) in form.control_frames" :key="item.name + index" class="file-chip file-chip--preview">
<button class="file-chip__thumb-button" type="button" @click="openLightbox(item.dataUrl, item.name)">
<img class="file-chip__thumb" :src="item.dataUrl" :alt="item.name" />
</button>
<span class="file-chip__name">{{ item.name }}</span>
<button class="icon-button" type="button" @click="removeCollectionImage('control_frames', index)">Remove</button>
<div v-else>
<div class="group">
<label>Reference Images</label>
<ImageDropzone
label="Reference Images"
description="Multiple reference images supported."
:items="form.ref_images"
multiple
@select="assignImages('ref_images', $event)"
@clear="clearImage('ref_images')"
/>
<div v-if="!form.ref_images.length" class="hint">No files selected.</div>
<div v-else class="file-list">
<div v-for="(item, index) in form.ref_images" :key="item.name + index" class="file-chip file-chip--preview">
<button class="file-chip__thumb-button" type="button" @click="openLightbox(item.dataUrl, item.name)">
<img class="file-chip__thumb" :src="item.dataUrl" :alt="item.name" />
</button>
<span class="file-chip__name">{{ item.name }}</span>
<button class="icon-button" type="button" @click="removeCollectionImage('ref_images', index)">Remove</button>
</div>
</div>
</div>
<div class="group stack-top">
<label>Control Frames</label>
<ImageDropzone
label="Control Frames"
description="Upload ordered conditioning frames. The server preserves the array order."
:items="form.control_frames"
multiple
@select="assignImages('control_frames', $event)"
@clear="clearImage('control_frames')"
/>
<div v-if="!form.control_frames.length" class="hint">No files selected.</div>
<div v-else class="file-list">
<div v-for="(item, index) in form.control_frames" :key="item.name + index" class="file-chip file-chip--preview">
<button class="file-chip__thumb-button" type="button" @click="openLightbox(item.dataUrl, item.name)">
<img class="file-chip__thumb" :src="item.dataUrl" :alt="item.name" />
</button>
<span class="file-chip__name">{{ item.name }}</span>
<button class="icon-button" type="button" @click="removeCollectionImage('control_frames', index)">Remove</button>
</div>
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions src/lib/form-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ export function buildVideoRequestBody(form: GenerationForm) {
init_image: form.init_image ? form.init_image.dataUrl : null,
end_image: form.end_image ? form.end_image.dataUrl : null,
control_frames: form.control_frames.map((item) => item.dataUrl),
ref_images: form.ref_images.map((item) => item.dataUrl),
high_noise_sample_params: buildSampleParams(form.high_noise_sample_params, -1),
};
}
Expand Down