Skip to content

Commit

Permalink
feat: add video display in Create.vue and let comfyUi.ts process vide…
Browse files Browse the repository at this point in the history
…os III

Signed-off-by: julianbollig <julian.bollig@tngtech.com>
  • Loading branch information
julianbollig committed Feb 24, 2025
1 parent c562d59 commit 452395e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 16 deletions.
12 changes: 0 additions & 12 deletions WebUI/external/workflows/Video.json
Original file line number Diff line number Diff line change
Expand Up @@ -272,18 +272,6 @@
"title": "CLIPLoader (GGUF)"
}
},
"112": {
"inputs": {
"images": [
"8",
0
]
},
"class_type": "PreviewImage",
"_meta": {
"title": "Preview Image"
}
},
"115": {
"inputs": {
"a": 25
Expand Down
2 changes: 1 addition & 1 deletion WebUI/src/assets/js/store/comfyUi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ export const useComfyUi = defineStore(
state: 'done',
imageUrl: `${comfyBaseUrl.value}/view?filename=${gifFromOutput.workflow}&type=${gifFromOutput.type}&subfolder=${gifFromOutput.subfolder ?? ''}`,
videoUrl: `${comfyBaseUrl.value}/view?filename=${gifFromOutput.filename}&type=${gifFromOutput.type}&subfolder=${gifFromOutput.subfolder ?? ''}`,
videoFormat: gifFromOutput.format,
videoFormat: gifFromOutput.format.replace('video/h264-mp4', 'video/mp4'), // 'video/h264-mp4' is not a valid MIME type
}
}
imageGeneration.updateImage(newImage!)
Expand Down
5 changes: 2 additions & 3 deletions WebUI/src/views/Create.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,11 @@
<!-- eslint-disable vue/require-v-for-key -->
<div
v-for="image in imageGeneration.generatedImages"
class="p-1 max-w-768px max-h-512px"
v-show="selectedImageId === image.id"
>
<!-- eslint-enable -->
<img v-if="!isVideo(image)" :src="image.imageUrl" />
<video v-else>
<img class="p-1 max-w-768px max-h-512px" v-if="!isVideo(image)" :src="image.imageUrl" />
<video class="p-1 max-w-768px max-h-512px" v-else controls>
<source :src="image.videoUrl" :type="image.videoFormat" />
</video>
</div>
Expand Down

0 comments on commit 452395e

Please sign in to comment.