The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.
TypeScript agentai-chatai-studioall-in-onecoding-agentdesktop-appfluximage-generationlinuxllmlocal-ailocal-llmopen-sourceprivacyself-hostedstable-diffusionuncensoreduncensored-aivideo-generationwindows
fix(create): the video preview says it is a still, and says when none comes (C45)
purple5ee90e26febd
diff --git a/src/components/create/experimental/OutputView.tsx b/src/components/create/experimental/OutputView.tsxindex 885b6d30..71b0ad3d 100644--- a/src/components/create/experimental/OutputView.tsx+++ b/src/components/create/experimental/OutputView.tsx@@ -94,6 +94,9 @@ export function GeneratingView() {const progress = useCreateStore((s) => s.progress)// B28: the sampler's newest picture while a video renders.const preview = useRenderPreviewStore((s) => s.url)+ const previewAsked = useRenderPreviewStore((s) => s.asked)+ // C45: asked for, the sampler is running, and still no picture.+ const noPreview = previewAsked && !preview && (progressPhase === 'sampling' || progressPhase === 'decoding')const isLoading = progressPhase === 'loading-model' || progressPhase === 'loading-clip' || progressPhase === 'loading-vae'const beat = phaseBeat(progressPhase)@@ -129,11 +132,19 @@ export function GeneratingView() {{preview && (<figure className="flex flex-col items-center gap-1" data-testid="render-live-preview"><img src={preview} alt="Live preview of the video being rendered" className="max-h-56 max-w-[22rem] rounded-lg border border-white/10 object-contain" />+ {/* C45 (Discord 05.11.): read as a broken video preview.+ ComfyUI decodes one frame of the video latent per step, never+ the motion, so the caption says it is a still on purpose. */}<figcaption className="t-micro text-gray-500 text-center max-w-[22rem]">- Rough preview of the first frame, sharper with every step. Cancel if it is going the wrong way.+ Still of the first frame, not the motion: ComfyUI previews one frame while it renders. It gets sharper with every step, the video plays when it is done. Cancel if it is going the wrong way.</figcaption></figure>)}+ {noPreview && (+ <p data-testid="render-no-preview" className="t-micro text-gray-500 text-center max-w-[22rem]">+ No preview picture for this run. ComfyUI sends one from its December 2025 versions on, and not for every model. The video shows here when it is done.+ </p>+ )}<p className="t-body text-gray-300 tracking-wide">{progressText || 'Generating…'}</p>{isLoading && !isMlxImageHost() && <ColdLoadLine />}{progress > 0 && (diff --git a/src/components/create/experimental/__tests__/video-vorschau-standbild-beschriftet.test.tsx b/src/components/create/experimental/__tests__/video-vorschau-standbild-beschriftet.test.tsxnew file mode 100644index 00000000..f969414f--- /dev/null+++ b/src/components/create/experimental/__tests__/video-vorschau-standbild-beschriftet.test.tsx@@ -0,0 +1,59 @@+// @vitest-environment jsdom+/**+ * C45 (3.1.0, Discord 05.11.): "the render preview shows only a still,+ * or nothing". ComfyUI decodes one frame of a video latent per sampling step,+ * never the motion, so a moving preview is not something it sends. The still+ * now says it is the first frame on purpose. And when the run asked for+ * previews but none comes while it samples (a ComfyUI older than December+ * 2025 ignores the request; not every model has a preview decoder), the+ * waiting area says so instead of staying blank.+ *+ * Run: npx vitest run src/components/create/experimental/__tests__/video-vorschau-standbild-beschriftet.test.tsx+ */+import { describe, it, expect, beforeEach, afterEach } from 'vitest'+import { readFileSync } from 'node:fs'+import { resolve } from 'node:path'+import { render, screen, cleanup } from '@testing-library/react'+import { GeneratingView } from '../OutputView'+import { useRenderPreviewStore } from '../../../../stores/renderPreviewStore'+import { useCreateStore } from '../../../../stores/createStore'++const phase = (p: string) => useCreateStore.setState({ progressPhase: p, progressText: '', progress: 40 } as never)++beforeEach(() => { useRenderPreviewStore.setState({ url: null, asked: false } as never); phase('sampling') })+afterEach(cleanup)++describe('C45: the video preview while it renders', () => {+ it('the still says it is the first frame, not the motion', () => {+ useRenderPreviewStore.setState({ url: 'data:image/jpeg;base64,/9j/', asked: true } as never)+ render(<GeneratingView />)+ const cap = screen.getByTestId('render-live-preview').textContent ?? ''+ expect(cap).toContain('Still of the first frame, not the motion')+ expect(cap).toContain('the video plays when it is done')+ expect(screen.queryByTestId('render-no-preview')).toBeNull()+ })++ it('asked for, sampling, and no picture: it says why', () => {+ useRenderPreviewStore.setState({ url: null, asked: true } as never)+ render(<GeneratingView />)+ expect(screen.getByTestId('render-no-preview').textContent).toContain('No preview picture for this run')+ })++ it('quiet while a model still loads, and on runs that never asked (pictures, Mac, cloud)', () => {+ useRenderPreviewStore.setState({ url: null, asked: true } as never)+ phase('loading-model')+ render(<GeneratingView />)+ expect(screen.queryByTestId('render-no-preview')).toBeNull()+ cleanup()+ useRenderPreviewStore.setState({ url: null, asked: false } as never)+ phase('sampling')+ render(<GeneratingView />)+ expect(screen.queryByTestId('render-no-preview')).toBeNull()+ })++ it('Create marks a video run as asking and clears it at the end', () => {+ const src = readFileSync(resolve(__dirname, '..', '..', '..', '..', 'hooks', 'useCreate.ts'), 'utf8')+ expect(src).toMatch(/if \(livePreview\) \{\n\s+useRenderPreviewStore\.getState\(\)\.setUrl\(null\)\n\s+useRenderPreviewStore\.getState\(\)\.setAsked\(true\)/)+ expect(src).toMatch(/setUrl\(null\)\n\s+useRenderPreviewStore\.getState\(\)\.setAsked\(false\)/)+ })+})diff --git a/src/hooks/useCreate.ts b/src/hooks/useCreate.tsindex 7540815b..993e5edb 100644--- a/src/hooks/useCreate.ts+++ b/src/hooks/useCreate.ts@@ -2187,6 +2187,7 @@ export function useCreate() {const livePreview = mode === 'video'if (livePreview) {useRenderPreviewStore.getState().setUrl(null)+ useRenderPreviewStore.getState().setAsked(true)offPreview = comfyWS.onPreview((url) => useRenderPreviewStore.getState().setUrl(url))}let promptId: string@@ -2645,6 +2646,7 @@ export function useCreate() {if (renderEviction) void restoreChatBackendsAfterRender(renderEviction)offPreview?.()useRenderPreviewStore.getState().setUrl(null)+ useRenderPreviewStore.getState().setAsked(false)// B27: and ComfyUI's memory goes back when the setting says so.scheduleFreeAfterRender(freeAfterRenderMode(useSettingsStore.getState().settings.freeAfterRender),diff --git a/src/stores/renderPreviewStore.ts b/src/stores/renderPreviewStore.tsindex 3ef2a725..b038b305 100644--- a/src/stores/renderPreviewStore.ts+++ b/src/stores/renderPreviewStore.ts@@ -13,9 +13,17 @@ import { create } from 'zustand'interface RenderPreviewState {url: string | nullsetUrl: (url: string | null) => void+ /** C45 (3.1.0): this run asked ComfyUI for previews. With none arriving+ * by the time it samples, the waiting area says why instead of staying+ * blank (an older ComfyUI ignores the request, and not every model has+ * a preview decoder). */+ asked: boolean+ setAsked: (asked: boolean) => void}export const useRenderPreviewStore = create<RenderPreviewState>((set) => ({url: null,setUrl: (url) => set({ url }),+ asked: false,+ setAsked: (asked) => set({ asked }),}))