Skip to content
Draft
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
13 changes: 13 additions & 0 deletions THIRD-PARTY-NOTICES
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ Wan 2.1 / Wan 2.2 Apache-2.0 https://github.com/Wan-Video/Wan2.1
Wan-Video team. Model weights are downloaded from upstream at runtime
and are not redistributed in this repository.

Real-ESRGAN BSD-3-Clause https://github.com/xinntao/Real-ESRGAN
BasicSR Apache-2.0 https://github.com/XPixelGroup/BasicSR
The optional Real-ESRGAN integration implements RRDBNet and compact SRVGG
architecture definitions compatible with public Real-ESRGAN checkpoints.
Model weights are downloaded from upstream at runtime and are not
redistributed in this repository.

================================================================================
Optional integration: integrations/omnidreams
================================================================================
Expand Down Expand Up @@ -100,6 +107,12 @@ aiohttp Apache-2.0 https://github.com/aio-libs/aiohttp
aiortc BSD-3-Clause https://github.com/aiortc/aiortc
opencv-python-headless Apache-2.0 https://github.com/opencv/opencv-python

================================================================================
Optional integration: integrations/realesrgan
================================================================================

opencv-python-headless Apache-2.0 https://github.com/opencv/opencv-python

================================================================================
Source-level redistributions
================================================================================
Expand Down
56 changes: 56 additions & 0 deletions feed_uplift_video.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/usr/bin/env bash
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -euo pipefail

cd "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

usage() {
cat <<'EOF'
Usage:
./feed_uplift_video.sh /path/to/input.mp4 [flashdreams-feed-frames args...]

Environment:
UPLIFT_SERVER Server address. Default: 127.0.0.1:8090
UPLIFT_TARGET_FPS Feed rate. Default: 30

Examples:
./feed_uplift_video.sh /tmp/clip.mp4
UPLIFT_SERVER=galaxy-ts4-108:8090 ./feed_uplift_video.sh /tmp/clip.mp4
./feed_uplift_video.sh /tmp/clip.mp4 --no_pace
./feed_uplift_video.sh /tmp/clip.mp4 --max_chunks 20
EOF
}

if [[ $# -lt 1 || "${1:-}" == "-h" || "${1:-}" == "--help" ]]; then
usage
exit 0
fi

INPUT_VIDEO="$1"
shift

SERVER="${UPLIFT_SERVER:-${FLASHVSR_UPLIFT_SERVER:-127.0.0.1:8090}}"
TARGET_FPS="${UPLIFT_TARGET_FPS:-${FLASHVSR_TARGET_FPS:-30}}"

export PYTHONPATH="integrations/flashvsr:flashdreams${PYTHONPATH:+:${PYTHONPATH}}"

echo "Feeding ${INPUT_VIDEO} continuously to uplift server at ${SERVER}"
exec uv run --package flashdreams --extra serving flashdreams-feed-frames \
--server "${SERVER}" \
--input "${INPUT_VIDEO}" \
--target_fps "${TARGET_FPS}" \
"$@"
1 change: 1 addition & 0 deletions flashdreams/flashdreams/scripts/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
flashdreams-run wan21-i2v-14b-480p --prompt "..." --image-path frame.png
flashdreams-run --no-instantiate template-offline # resolve config only
flashdreams-run wan21-t2v-1.3b-480p --postprocess.preset flashvsr-v1.1-sparse-2.0
flashdreams-run wan21-t2v-1.3b-480p --postprocess.preset realesrgan

# Multi-GPU via context-parallelism (integration transformers auto-detect
# CP size from the launcher's WORLD group). ``--no-python`` tells
Expand Down
4 changes: 4 additions & 0 deletions flashdreams/flashdreams/serving/uplift/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

"""Shared gRPC uplift protocol, client, and browser-viewer utilities."""
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

"""Generated protobuf modules for FlashVSR gRPC serving."""

"""Generated protobuf modules for FlashDreams video uplift serving."""
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@

syntax = "proto3";

package flashvsr;
package flashdreams.uplift;

// ---------------------------------------------------------------------------
// FlashVSR gRPC Service
// FlashDreams video uplift gRPC service
//
// Streaming video super-resolution (2× or 4×) using a diffusion-based model.
// Streaming video super-resolution (2× or 4×) using any server-side model
// implementation that speaks this protocol.
// Two usage patterns:
//
// Unary chunk-by-chunk flow (best for integration into existing pipelines):
Expand All @@ -36,7 +37,7 @@ package flashvsr;
// get_status — liveness/readiness check
// ---------------------------------------------------------------------------

service FlashVSR {
service VideoUplift {
rpc get_status (StatusRequest) returns (StatusResponse);
rpc start_session (StartSessionRequest) returns (StartSessionResponse);
rpc end_session (EndSessionRequest) returns (EndSessionResponse);
Expand All @@ -53,7 +54,7 @@ message StatusRequest {}
message StatusResponse {
bool ready = 1; // true once the model is loaded
string device = 2; // e.g. "cuda:0"
string model_name = 3; // e.g. "FlashVSR-v1.1"
string model_name = 3; // e.g. "FlashVSR-v1.1" or "RealESRGAN/x2plus"
repeated string active_sessions = 4; // currently open session IDs
}

Expand Down
56 changes: 56 additions & 0 deletions flashdreams/flashdreams/serving/uplift/protos/uplift_pb2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# -*- coding: utf-8 -*-
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
# Generated by the protocol buffer compiler. DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: flashdreams/serving/uplift/protos/uplift.proto
# Protobuf Python Version: 6.31.1
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import runtime_version as _runtime_version
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
_runtime_version.ValidateProtobufRuntimeVersion(
_runtime_version.Domain.PUBLIC,
6,
31,
1,
'',
'flashdreams/serving/uplift/protos/uplift.proto'
)
# @@protoc_insertion_point(imports)

_sym_db = _symbol_database.Default()




DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n.flashdreams/serving/uplift/protos/uplift.proto\x12\x12\x66lashdreams.uplift\"\x0f\n\rStatusRequest\"\\\n\x0eStatusResponse\x12\r\n\x05ready\x18\x01 \x01(\x08\x12\x0e\n\x06\x64\x65vice\x18\x02 \x01(\t\x12\x12\n\nmodel_name\x18\x03 \x01(\t\x12\x17\n\x0f\x61\x63tive_sessions\x18\x04 \x03(\t\"y\n\x13StartSessionRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x14\n\x0cinput_height\x18\x02 \x01(\x05\x12\x13\n\x0binput_width\x18\x03 \x01(\x05\x12\r\n\x05scale\x18\x04 \x01(\x05\x12\x14\n\x0csparse_ratio\x18\x05 \x01(\x02\"J\n\x14StartSessionResponse\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x0f\n\x07success\x18\x02 \x01(\x08\x12\r\n\x05\x65rror\x18\x03 \x01(\t\"\'\n\x11\x45ndSessionRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\"%\n\x12\x45ndSessionResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\"\xbb\x02\n\x13UpscaleChunkRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x14\n\x0cinput_height\x18\x02 \x01(\x05\x12\x13\n\x0binput_width\x18\x03 \x01(\x05\x12\r\n\x05scale\x18\x04 \x01(\x05\x12\x14\n\x0csparse_ratio\x18\x05 \x01(\x02\x12\x12\n\nframes_rgb\x18\x06 \x01(\x0c\x12\x12\n\nnum_frames\x18\x07 \x01(\x05\x12\x0e\n\x06height\x18\x08 \x01(\x05\x12\r\n\x05width\x18\t \x01(\x05\x12\x13\n\x0b\x63hunk_index\x18\n \x01(\x05\x12\x39\n\x0e\x66rame_encoding\x18\x0b \x01(\x0e\x32!.flashdreams.uplift.FrameEncoding\x12\x13\n\x0b\x66rames_jpeg\x18\x0c \x03(\x0c\x12\x14\n\x0c\x64isplay_only\x18\r \x01(\x08\"\xc1\x01\n\x14UpscaleChunkResponse\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x12\n\nframes_rgb\x18\x02 \x01(\x0c\x12\x12\n\nnum_frames\x18\x03 \x01(\x05\x12\x0e\n\x06height\x18\x04 \x01(\x05\x12\r\n\x05width\x18\x05 \x01(\x05\x12\x13\n\x0b\x63hunk_index\x18\x06 \x01(\x05\x12\x12\n\nelapsed_ms\x18\x07 \x01(\x02\x12\r\n\x05\x65rror\x18\x08 \x01(\t\x12\x16\n\x0e\x66rames_omitted\x18\t \x01(\x08*D\n\rFrameEncoding\x12\x1a\n\x16\x46RAME_ENCODING_RAW_RGB\x10\x00\x12\x17\n\x13\x46RAME_ENCODING_JPEG\x10\x01\x32\xf0\x03\n\x0bVideoUplift\x12S\n\nget_status\x12!.flashdreams.uplift.StatusRequest\x1a\".flashdreams.uplift.StatusResponse\x12\x62\n\rstart_session\x12\'.flashdreams.uplift.StartSessionRequest\x1a(.flashdreams.uplift.StartSessionResponse\x12\\\n\x0b\x65nd_session\x12%.flashdreams.uplift.EndSessionRequest\x1a&.flashdreams.uplift.EndSessionResponse\x12\x62\n\rupscale_chunk\x12\'.flashdreams.uplift.UpscaleChunkRequest\x1a(.flashdreams.uplift.UpscaleChunkResponse\x12\x66\n\rupscale_video\x12\'.flashdreams.uplift.UpscaleChunkRequest\x1a(.flashdreams.uplift.UpscaleChunkResponse(\x01\x30\x01\x62\x06proto3')

_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'flashdreams.serving.uplift.protos.uplift_pb2', _globals)
if not _descriptor._USE_C_DESCRIPTORS:
DESCRIPTOR._loaded_options = None
_globals['_FRAMEENCODING']._serialized_start=974
_globals['_FRAMEENCODING']._serialized_end=1042
_globals['_STATUSREQUEST']._serialized_start=70
_globals['_STATUSREQUEST']._serialized_end=85
_globals['_STATUSRESPONSE']._serialized_start=87
_globals['_STATUSRESPONSE']._serialized_end=179
_globals['_STARTSESSIONREQUEST']._serialized_start=181
_globals['_STARTSESSIONREQUEST']._serialized_end=302
_globals['_STARTSESSIONRESPONSE']._serialized_start=304
_globals['_STARTSESSIONRESPONSE']._serialized_end=378
_globals['_ENDSESSIONREQUEST']._serialized_start=380
_globals['_ENDSESSIONREQUEST']._serialized_end=419
_globals['_ENDSESSIONRESPONSE']._serialized_start=421
_globals['_ENDSESSIONRESPONSE']._serialized_end=458
_globals['_UPSCALECHUNKREQUEST']._serialized_start=461
_globals['_UPSCALECHUNKREQUEST']._serialized_end=776
_globals['_UPSCALECHUNKRESPONSE']._serialized_start=779
_globals['_UPSCALECHUNKRESPONSE']._serialized_end=972
_globals['_VIDEOUPLIFT']._serialized_start=1045
_globals['_VIDEOUPLIFT']._serialized_end=1541
# @@protoc_insertion_point(module_scope)
Loading
Loading