Repository navigation
feat(website): add the Nvidia VFX Nodes launch page #19664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
8ad8e90
feat(website): add draft NVIDIA RTX Video nodes landing page
june-bump 83adbe4
feat(website): add before/after compare module to the NVIDIA RTX page
june-bump 30f29bf
fix(website): tune the NVIDIA RTX page for phones
june-bump 1552612
fix(website): review fixes for the before/after slider section
june-bump 498d13e
fix(website): keep all three before/after tabs visible on phones
june-bump 8b8c0f5
fix(website): apply copy review to the NVIDIA RTX landing page
june-bump b2a6f1f
fix(website): point the NVIDIA VFX page at the renamed GitHub repo
june-bump 939f8a5
fix(website): separate open-source nodes from the proprietary nvidia-…
june-bump 2df344b
fix(website): call the NVIDIA RTX nodes custom nodes in the hero
june-bump 3beb0b5
fix(website): rename the True HDR tab to SDR-to-HDR and shorten its g…
june-bump 8dbc266
fix(website): open weights caption on the NVIDIA RTX gallery card
june-bump df07374
fix(website): state the Apache-2.0 node license in the NVIDIA RTX FAQ
june-bump b709fae
feat(website): real SDR-to-HDR clips in the NVIDIA RTX before/after s…
june-bump 43514dd
feat(website): play a single side-by-side clip in the NVIDIA RTX SDR-…
june-bump 98a1e56
fix(website): serve the NVIDIA RTX side-by-side clip from media.comfy…
june-bump 453a18e
feat(website): list the NVIDIA RTX effects as bullets beside the side…
june-bump db6248a
fix(website): drop the intro line under the NVIDIA RTX clip heading
june-bump cdf556f
feat(website): TRY NOW link to Comfy Cloud under the NVIDIA RTX clip …
june-bump 13b1507
feat(website): move the NVIDIA VFX page to /nvidia-vfx and redirect t…
june-bump 553011f
feat(website): lead the NVIDIA VFX page with the side-by-side clip an…
june-bump 590c927
feat(website): phone encode and poster for the NVIDIA VFX hero; show …
june-bump 6ff3024
refactor(website): extract the single-clip showcase from the before/a…
june-bump 4067300
refactor(website): drop the unused single-clip section variant; pin t…
june-bump 0fd18c2
feat(website): gallery showcase tiles, full-width expandable card, he…
june-bump 204fb67
feat(website): NVIDIA VFX page launch content
june-bump 758855b
Merge branch 'main' into the NVIDIA VFX landing page branch
june-bump 63a9434
refactor(website): split the model-launch gallery into card and media…
june-bump 32dcaee
fix(website): address review of the Nvidia VFX launch page
june-bump 4ce7d2c
Merge branch 'main' into claude/nvidia-rtx-landing-page-14cea6
DrJKL f4e2cfa
Merge branch 'main' into claude/nvidia-rtx-landing-page-14cea6
claude b305649
Merge branch 'main' into claude/nvidia-rtx-landing-page-14cea6
DrJKL File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| import { expect } from '@playwright/test' | ||
|
|
||
| import { test } from './fixtures/blockExternalMedia' | ||
|
|
||
| test.describe('Nvidia VFX Nodes launch page @smoke', () => { | ||
| test.beforeEach(async ({ page }) => { | ||
| await page.goto('/nvidia-vfx') | ||
| }) | ||
|
|
||
| test('introduces the nodes and opens the Cloud template', async ({ | ||
| page | ||
| }) => { | ||
| await expect( | ||
| page.getByRole('heading', { level: 1, name: 'Nvidia VFX Nodes' }) | ||
| ).toBeVisible() | ||
| await expect( | ||
| page.getByRole('link', { name: 'TRY ON COMFY CLOUD' }) | ||
| ).toHaveAttribute('href', /template=utility_nvidia_rtx_video_enhance/) | ||
| }) | ||
|
|
||
| test('switches the before and after clips with the tabs', async ({ | ||
| page | ||
| }) => { | ||
| await page | ||
| .getByRole('heading', { level: 2, name: 'One clip, two states.' }) | ||
| .scrollIntoViewIfNeeded() | ||
| const before = page.getByTestId('video-compare-before') | ||
| const after = page.getByTestId('video-compare-after') | ||
|
|
||
| await expect(before).toHaveAttribute('src', /super-resolution-before\.mp4$/) | ||
|
|
||
| await page.getByRole('tab', { name: 'Frame Generation' }).click() | ||
|
|
||
| await expect(before).toHaveAttribute('src', /frame-generation-before\.mp4$/) | ||
| await expect(after).toHaveAttribute('src', /frame-generation-after\.mp4$/) | ||
| await expect( | ||
| page.getByText( | ||
| 'Multiply frame rate up to 16× with Frame Generation for smooth slow motion.', | ||
| { exact: true } | ||
| ) | ||
| ).toBeVisible() | ||
| }) | ||
|
|
||
| test('opens the workflow screenshot full screen and closes it on Escape', async ({ | ||
| page | ||
| }) => { | ||
| const tile = page.getByTestId('gallery-card-media') | ||
| await tile.scrollIntoViewIfNeeded() | ||
| const dialog = page.getByRole('dialog') | ||
|
|
||
| await expect(async () => { | ||
| await tile.getByRole('button', { name: 'Fullscreen' }).click() | ||
| await expect(dialog).toBeVisible({ timeout: 1000 }) | ||
| }).toPass() | ||
| await expect( | ||
| dialog.getByRole('img', { name: /chained in one ComfyUI workflow/ }) | ||
| ).toBeVisible() | ||
|
|
||
| await page.keyboard.press('Escape') | ||
|
|
||
| await expect(dialog).toBeHidden() | ||
| }) | ||
| }) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
140 changes: 140 additions & 0 deletions
140
apps/website/src/components/common/VideoCompareSlider.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,140 @@ | ||
| import userEvent from '@testing-library/user-event' | ||
| import { render, screen, waitFor } from '@testing-library/vue' | ||
| import { describe, expect, it, vi } from 'vitest' | ||
| import { createSSRApp, h } from 'vue' | ||
| import { renderToString } from 'vue/server-renderer' | ||
|
|
||
| import VideoCompareSlider from './VideoCompareSlider.vue' | ||
|
|
||
| const props = { | ||
| beforeSrc: 'before.webm', | ||
| afterSrc: 'after.webm', | ||
| beforeLabel: 'Before', | ||
| afterLabel: 'After', | ||
| sliderLabel: 'Comparison slider' | ||
| } | ||
|
|
||
| async function renderSlider() { | ||
| render(VideoCompareSlider, { props }) | ||
| const slider = screen.getByRole('slider', { name: 'Comparison slider' }) | ||
| const surface = screen.getByTestId('video-compare-surface') | ||
| const beforeVideo = screen.getByTestId<HTMLVideoElement>( | ||
| 'video-compare-before' | ||
| ) | ||
| const afterVideo = screen.getByTestId<HTMLVideoElement>('video-compare-after') | ||
| await waitFor(() => expect(beforeVideo).toHaveAttribute('src', 'before.webm')) | ||
| return { slider, surface, beforeVideo, afterVideo } | ||
| } | ||
|
|
||
| async function pressAt( | ||
| user: ReturnType<typeof userEvent.setup>, | ||
| surface: HTMLElement, | ||
| clientX: number, | ||
| keys = '[MouseLeft>]' | ||
| ) { | ||
| vi.spyOn(surface, 'getBoundingClientRect').mockReturnValue( | ||
| new DOMRect(100, 0, 400, 225) | ||
| ) | ||
| await user.pointer([{ keys, target: surface, coords: { clientX } }]) | ||
| } | ||
|
|
||
| describe('VideoCompareSlider', () => { | ||
| it('renders no clip sources on the server', async () => { | ||
| const html = await renderToString( | ||
| createSSRApp({ render: () => h(VideoCompareSlider, props) }) | ||
| ) | ||
|
|
||
| expect(html).toContain('role="slider"') | ||
| expect(html).not.toContain('before.webm') | ||
| expect(html).not.toContain('after.webm') | ||
| }) | ||
|
|
||
| it('starts at the midpoint with the after clip revealed on the right', async () => { | ||
| const { slider, afterVideo } = await renderSlider() | ||
|
|
||
| expect(afterVideo).toHaveAttribute('src', 'after.webm') | ||
| expect(slider).toHaveAttribute('aria-valuenow', '50') | ||
| expect(afterVideo.style.clipPath).toBe('inset(0 0 0 50%)') | ||
| expect(screen.getByText('Before')).toBeVisible() | ||
| expect(screen.getByText('After')).toBeVisible() | ||
| }) | ||
|
|
||
| it('moves with the keyboard and clips the after clip to match', async () => { | ||
| const user = userEvent.setup() | ||
| const { slider, afterVideo } = await renderSlider() | ||
|
|
||
| slider.focus() | ||
| await user.keyboard('{Shift>}{ArrowRight}{/Shift}') | ||
| expect(slider).toHaveAttribute('aria-valuenow', '60') | ||
| expect(afterVideo.style.clipPath).toBe('inset(0 0 0 60%)') | ||
|
|
||
| await user.keyboard('{Home}') | ||
| expect(slider).toHaveAttribute('aria-valuenow', '0') | ||
| }) | ||
|
|
||
| it('jumps to the pressed point and follows the pointer while held', async () => { | ||
| const user = userEvent.setup() | ||
| const { slider, surface } = await renderSlider() | ||
|
|
||
| await pressAt(user, surface, 200) | ||
| expect(slider).toHaveAttribute('aria-valuenow', '25') | ||
|
|
||
| await user.pointer([{ coords: { clientX: 400 } }]) | ||
| expect(slider).toHaveAttribute('aria-valuenow', '75') | ||
| }) | ||
|
|
||
| it('ignores presses from other buttons', async () => { | ||
| const user = userEvent.setup() | ||
| const { slider, surface } = await renderSlider() | ||
|
|
||
| await pressAt(user, surface, 200, '[MouseRight>]') | ||
| await user.pointer([{ coords: { clientX: 400 } }]) | ||
|
|
||
| expect(slider).toHaveAttribute('aria-valuenow', '50') | ||
| }) | ||
|
|
||
| it.for([ | ||
| { release: 'pointerup', event: () => new Event('pointerup') }, | ||
| { release: 'pointercancel', event: () => new Event('pointercancel') }, | ||
| { | ||
| release: 'a move with no button held', | ||
| event: () => new PointerEvent('pointermove', { clientX: 400, buttons: 0 }) | ||
| } | ||
| ])('stops following the pointer after $release', async ({ event }) => { | ||
| const user = userEvent.setup() | ||
| const { slider, surface } = await renderSlider() | ||
| await pressAt(user, surface, 200) | ||
|
|
||
| window.dispatchEvent(event()) | ||
| await user.pointer([{ coords: { clientX: 400 } }]) | ||
|
|
||
| expect(slider).toHaveAttribute('aria-valuenow', '25') | ||
| }) | ||
|
|
||
| it.for([ | ||
| { before: 4, after: 1, expected: 4 }, | ||
| { before: 4, after: 3.9, expected: 3.9 } | ||
| ])( | ||
| 'puts the after clip at $expected when it is at $after and the before clip is at $before', | ||
| async ({ before, after, expected }) => { | ||
| const { beforeVideo, afterVideo } = await renderSlider() | ||
|
|
||
| beforeVideo.currentTime = before | ||
| afterVideo.currentTime = after | ||
| beforeVideo.dispatchEvent(new Event('timeupdate')) | ||
|
|
||
| expect(afterVideo.currentTime).toBe(expected) | ||
| } | ||
| ) | ||
|
|
||
| it('resumes the after clip when it has paused while the before clip plays', async () => { | ||
| const { beforeVideo, afterVideo } = await renderSlider() | ||
| vi.spyOn(beforeVideo, 'paused', 'get').mockReturnValue(false) | ||
| vi.spyOn(afterVideo, 'paused', 'get').mockReturnValue(true) | ||
| const play = vi.spyOn(afterVideo, 'play').mockResolvedValue() | ||
|
|
||
| beforeVideo.dispatchEvent(new Event('timeupdate')) | ||
|
|
||
| expect(play).toHaveBeenCalledOnce() | ||
| }) | ||
| }) |
162 changes: 162 additions & 0 deletions
162
apps/website/src/components/common/VideoCompareSlider.vue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,162 @@ | ||
| <script setup lang="ts"> | ||
| import { cn } from '@comfyorg/tailwind-utils' | ||
| import { useEventListener, useMounted } from '@vueuse/core' | ||
| import { ref, useTemplateRef } from 'vue' | ||
| import type { HTMLAttributes } from 'vue' | ||
|
|
||
| import { | ||
| COMPARE_MAX, | ||
| COMPARE_MIN, | ||
| positionFromPointer, | ||
| stepPosition | ||
| } from './videoCompare' | ||
|
|
||
| const SYNC_TOLERANCE_S = 0.15 | ||
|
|
||
| const { | ||
| beforeSrc, | ||
| afterSrc, | ||
| beforeLabel, | ||
| afterLabel, | ||
| sliderLabel, | ||
| class: className | ||
| } = defineProps<{ | ||
| beforeSrc: string | ||
| afterSrc: string | ||
| beforeLabel: string | ||
| afterLabel: string | ||
| sliderLabel: string | ||
| class?: HTMLAttributes['class'] | ||
| }>() | ||
|
|
||
| const position = defineModel<number>('position', { default: 50 }) | ||
|
|
||
| const container = useTemplateRef<HTMLElement>('container') | ||
| const beforeVideo = useTemplateRef<HTMLVideoElement>('beforeVideo') | ||
| const afterVideo = useTemplateRef<HTMLVideoElement>('afterVideo') | ||
| const isDragging = ref(false) | ||
| const isMounted = useMounted() | ||
|
|
||
| function moveTo(clientX: number) { | ||
| const bounds = container.value?.getBoundingClientRect() | ||
| if (!bounds) return | ||
| position.value = positionFromPointer(clientX, bounds) | ||
| } | ||
|
|
||
| function onPointerDown(event: PointerEvent) { | ||
| if (event.button !== 0) return | ||
| isDragging.value = true | ||
| moveTo(event.clientX) | ||
| } | ||
|
|
||
| useEventListener('pointermove', (event) => { | ||
| if (!isDragging.value) return | ||
| if (event.buttons === 0) { | ||
| isDragging.value = false | ||
| return | ||
| } | ||
| moveTo(event.clientX) | ||
| }) | ||
| useEventListener(['pointerup', 'pointercancel'], () => { | ||
| isDragging.value = false | ||
| }) | ||
|
|
||
| function onKeyDown(event: KeyboardEvent) { | ||
| const next = stepPosition(position.value, event.key, event.shiftKey) | ||
| if (next === undefined) return | ||
| event.preventDefault() | ||
| position.value = next | ||
| } | ||
|
|
||
| function syncAfterToBefore() { | ||
| const before = beforeVideo.value | ||
| const after = afterVideo.value | ||
| if (!before || !after) return | ||
| if (!before.paused && after.paused) void after.play().catch(() => undefined) | ||
| if (Math.abs(after.currentTime - before.currentTime) > SYNC_TOLERANCE_S) { | ||
| after.currentTime = before.currentTime | ||
| } | ||
| } | ||
| </script> | ||
|
|
||
| <template> | ||
| <div | ||
| ref="container" | ||
| data-testid="video-compare-surface" | ||
| :class=" | ||
| cn( | ||
| 'relative isolate aspect-video w-full cursor-ew-resize touch-pan-y overflow-hidden bg-primary-comfy-ink select-none', | ||
| className | ||
| ) | ||
| " | ||
| @pointerdown="onPointerDown" | ||
| > | ||
| <video | ||
| ref="beforeVideo" | ||
| :key="beforeSrc" | ||
| data-testid="video-compare-before" | ||
| :src="isMounted ? beforeSrc : undefined" | ||
| autoplay | ||
| loop | ||
| muted | ||
| playsinline | ||
| aria-hidden="true" | ||
| class="absolute inset-0 size-full object-cover" | ||
| @timeupdate="syncAfterToBefore" | ||
| /> | ||
| <video | ||
| ref="afterVideo" | ||
| :key="afterSrc" | ||
| data-testid="video-compare-after" | ||
| :src="isMounted ? afterSrc : undefined" | ||
| autoplay | ||
| loop | ||
| muted | ||
| playsinline | ||
| aria-hidden="true" | ||
| class="absolute inset-0 size-full object-cover" | ||
| :style="{ clipPath: `inset(0 0 0 ${position}%)` }" | ||
| /> | ||
|
june-bump marked this conversation as resolved.
Resolved
|
||
|
|
||
| <span | ||
| class="pointer-events-none absolute top-4 left-4 rounded-full bg-transparency-ink-t80 px-3 py-1 text-xs font-bold tracking-wide text-primary-warm-white uppercase" | ||
| > | ||
| {{ beforeLabel }} | ||
| </span> | ||
| <span | ||
| class="pointer-events-none absolute top-4 right-4 rounded-full bg-transparency-ink-t80 px-3 py-1 text-xs font-bold tracking-wide text-primary-warm-white uppercase" | ||
| > | ||
| {{ afterLabel }} | ||
| </span> | ||
|
|
||
| <div | ||
| role="slider" | ||
| tabindex="0" | ||
| :aria-label="sliderLabel" | ||
| :aria-valuemin="COMPARE_MIN" | ||
| :aria-valuemax="COMPARE_MAX" | ||
| :aria-valuenow="Math.round(position)" | ||
| :aria-valuetext="`${Math.round(position)}%`" | ||
| class="absolute inset-y-0 w-0.5 -translate-x-1/2 touch-none bg-primary-warm-white outline-none focus-visible:ring-2 focus-visible:ring-primary-comfy-yellow" | ||
| :style="{ left: `${position}%` }" | ||
| @keydown="onKeyDown" | ||
| > | ||
| <span | ||
| class="absolute top-1/2 left-1/2 flex size-9 -translate-1/2 items-center justify-center rounded-full bg-primary-warm-white text-primary-comfy-ink shadow-lg" | ||
| aria-hidden="true" | ||
| > | ||
| <svg | ||
| viewBox="0 0 24 24" | ||
| fill="none" | ||
| stroke="currentColor" | ||
| stroke-width="2" | ||
| stroke-linecap="round" | ||
| stroke-linejoin="round" | ||
| class="size-4" | ||
| > | ||
| <path d="M8 12H16M8 12L11 9M8 12L11 15M16 12L13 9M16 12L13 15" /> | ||
| </svg> | ||
| </span> | ||
| </div> | ||
| </div> | ||
| </template> | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SHOULD FIX — the clips ignore
prefers-reduced-motion, and nothing can stop them.Both
<video>elements here areautoplay loop muted playsinlinewith nocontrols, and there is no pause affordance anywhere in the section.Measured at 1440x900 with
reducedMotion: 'reduce', section scrolled into view and left alone: both clips reportpaused: falseandcurrentTimeadvances across samples and wraps at the loop point. So a visitor who has asked for reduced motion gets two indefinitely looping 1280x720 clips with no way to stop them.The inconsistency is inside this same page and this same PR:
currentTime: 0under reduce;ScrollCarousel.vue:59-68, added by this PR, gates autoplay on!prefersReducedMotion();VideoPlayer.vue:174-181is the established pattern for autoplaying video.WCAG 2.2.2 (Level A) covers auto-playing motion over five seconds with no pause mechanism. Either gate playback the way
ScrollCarouseldoes, or add a pause control. Where the fix lands is your call.