-
-
Notifications
You must be signed in to change notification settings - Fork 308
Add local and OGAD remote video generation to Mobile #697
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
Open
alichherawalla
wants to merge
129
commits into
main
Choose a base branch
from
feature/local-video-generation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+9,838
−1,241
Open
Changes from all commits
Commits
Show all changes
129 commits
Select commit
Hold shift + click to select a range
454bccb
build(mobile): add native video playback dependency [skip ci]
alichherawalla 50c5046
feat(media): store synced videos and update Pro integration [skip ci]
alichherawalla d42bbb1
feat(gallery): play save and delete videos on mobile [skip ci]
alichherawalla 6e936cd
test(sync): cover received videos and chat attachment cleanup
alichherawalla 3b80a82
feat(video): add shared native lifecycle and iOS Metal generation [sk…
alichherawalla d46a539
feat(video): add Android Vulkan generation and scoped media export [s…
alichherawalla 2b2c7f3
feat(models): manage complete video packs and resumable downloads [sk…
alichherawalla 0f42fb9
feat(remote): discover OGAD video models and resume remote jobs [skip…
alichherawalla 26bf6fd
feat(models): add video search selection settings and storage control…
alichherawalla 3adb2ba
feat(video): own generation recovery gallery and media export [skip ci]
alichherawalla 421c95d
feat(chat): route video turns and tools through shared generation sta…
alichherawalla 80ec42e
build(video): prepare pinned runtimes through CocoaPods and Gradle [s…
alichherawalla 397a438
chore(ios): refresh pod checksums for physical device build [skip ci]
alichherawalla 7b13e9a
fix(models): match video browsing to the text model flow [skip ci]
alichherawalla 4777c92
fix(downloads): preserve video pack identity and validation progress …
alichherawalla 9adcd03
fix(chat): allow local and remote video-only chat entry [skip ci]
alichherawalla f05fd82
fix(models): share text detail hierarchy with video browsing [skip ci]
alichherawalla a8c5fc9
feat(settings): allow hiding the dev sync status bar [skip ci]
alichherawalla b0e52ba
fix(video): use shared memory failure and override flow [skip ci]
alichherawalla 519674a
fix(video): show generation progress inline in chat [skip ci]
alichherawalla 49ad751
fix(settings): keep typed slider values visible [skip ci]
alichherawalla a806a96
fix(navigation): return from Pro page to Home [skip ci]
alichherawalla 8d2d149
feat(video): load LTX and Hunyuan packs on mobile [skip ci]
alichherawalla 2dcffb7
fix(video): use CPU conditioning on Android [skip ci]
alichherawalla e87d2fa
fix(video): show prompt processing and elapsed time [skip ci]
alichherawalla 42256cf
perf(video): optimize Android debug engine kernels [skip ci]
alichherawalla b7312ff
fix(text): try GPU after NPU load failure [skip ci]
alichherawalla 62b1df7
build(video): bundle Qualcomm DSP runtimes [skip ci]
alichherawalla 9e65d09
fix(android): prepare DSP assets before packaging [skip ci]
alichherawalla b26d6cc
feat(video): select and report Android NPU execution [skip ci]
alichherawalla d22d20e
fix(video): respect buffer ownership across NPU fallback [skip ci]
alichherawalla 995d324
fix(video): separate outputs across convolution fallback [skip ci]
alichherawalla cb7e96a
fix(video): keep NPU memory cap off GPU fallback [skip ci]
alichherawalla a4847ed
fix(video): show sampling when step zero starts [skip ci]
alichherawalla 9a2576d
fix(video): stream NPU weights to reduce Android memory [skip ci]
alichherawalla 30d7946
fix(image): validate pinned model packs before registration [skip ci]
alichherawalla d653f2f
feat(image): expose the mobile SD runtime with hardware fallback [ski…
alichherawalla 75b5488
feat(image): connect Qwen packs to mobile model and generation flows …
alichherawalla 5e764cd
feat(sync): describe portable mobile SD image packs [skip ci]
alichherawalla af12fc3
fix(video): name the frame decoding stage [skip ci]
alichherawalla e33aae2
fix(image): preserve active model residency and shared image identity…
alichherawalla 2643722
fix(image): reuse verified pack parts and update transfer integration…
alichherawalla c277ec1
fix(video): bound Android GPU decode graphs [skip ci]
alichherawalla 8d85823
fix(image): recover verified SD packs after interrupted registration …
alichherawalla 1986b23
style(image): normalize integrity helper whitespace [skip ci]
alichherawalla c261d94
fix(video): avoid Adreno crash inside device-fault diagnostics [skip ci]
alichherawalla d4d5807
feat(image): search and download compatible SD packs from Hugging Fac…
alichherawalla 986e046
fix(video): show OGAD stages on mobile clients [skip ci]
alichherawalla 7b6b36a
chore(video): record Adreno shader compile details [skip ci]
alichherawalla c8323ea
fix(video): route unsafe Adreno float matvec to fallback backend [ski…
alichherawalla 9564462
fix(sync): include video retry completion correction [skip ci]
alichherawalla 6b5858b
fix(video): use CPU Wan decode on affected Adreno devices [skip ci]
alichherawalla d9c81bc
fix(build): use macOS host compiler for Vulkan shader generator [skip…
alichherawalla 6810e0c
fix(video): report iOS background interruption [skip ci]
alichherawalla 5d489af
fix(video): distinguish generation failures from load errors [skip ci]
alichherawalla c7850b0
fix(ios): stream model checksums during startup [skip ci]
alichherawalla a97958b
chore(ios): refresh installed pod spec checksums [skip ci]
alichherawalla f4883a4
feat(video): show reused frame previews and decode progress [skip ci]
alichherawalla 48481c9
feat(video): report decode sections and reuse final frame preview [sk…
alichherawalla 340b824
fix(video): honor full precision attention on Hexagon [skip ci]
alichherawalla a101a2e
feat(mobile): use themed video player controls and picture in picture…
alichherawalla 8003ebf
fix(ios): rebuild video preview runtime for physical devices [skip ci]
alichherawalla e59e738
fix(mobile): fit video controls and picture in picture in one bar [sk…
alichherawalla d42d193
fix(mobile): show the first video frame before playback [skip ci]
alichherawalla 0182a30
fix(chat): remove extra frame and caption from generated videos [skip…
alichherawalla 2e4e47a
fix(video): use active app theme for player controls [skip ci]
alichherawalla cdf5737
fix(video): keep Android attention buffers safe across devices [skip ci]
alichherawalla 67cd2db
fix(ios): keep local generation awake and log background admission [s…
alichherawalla b0b252f
fix(video): route unsafe Adreno attention through fallback [skip ci]
alichherawalla 53e4d5d
fix(video): use catalog names in mobile model labels [skip ci]
alichherawalla 62bc123
fix(video): show iOS background interruption while engine stops [skip…
alichherawalla ed7a6f4
fix(video): respect download cancellation and count pack storage [ski…
alichherawalla 755cd74
feat(video): include compatible packs in mobile auto setup [skip ci]
alichherawalla 6dc25d5
chore(pro): update video transfer display names [skip ci]
alichherawalla a7ef3ac
fix(video): bound Adreno attention work per dispatch [skip ci]
alichherawalla ca25ae3
perf(video): keep Adreno attention chunks on the GPU [skip ci]
alichherawalla 4acdb1b
chore(video): log native progress changes for device checks [skip ci]
alichherawalla 879acf4
fix(android): bound Adreno video attention dispatches [skip ci]
alichherawalla e572ae4
perf(video): share GPU query storage across attention chunks [skip ci]
alichherawalla 885abdb
fix(android): keep video generation screen awake [skip ci]
alichherawalla 0cd8fbb
fix(video): exclude model cache from iOS backups [skip ci]
alichherawalla 54750d6
docs(video): refresh mobile integration audit and limits [skip ci]
alichherawalla 3cc57c9
fix(image): keep cancellation from starting overlapping SD work [skip…
alichherawalla 3b08e42
fix(litert): report requested accelerator and fallback [skip ci]
alichherawalla 3b75e36
fix(image): use model-aware resolution controls [skip ci]
alichherawalla 2c3a965
fix(ios): bound Wan decode graphs and report chunk progress [skip ci]
alichherawalla 39f97ab
fix(image): retain residency lock through late SD load [skip ci]
alichherawalla 2fd3175
fix(image): verify SD file sizes before pack registration [skip ci]
alichherawalla 1df1f0d
fix(image): account for failed SD load cleanup [skip ci]
alichherawalla 490814b
chore(pro): update video transfer integrity checks [skip ci]
alichherawalla 4f0a96a
fix(image): retain admission until cancelled request settles [skip ci]
alichherawalla b4faf2f
fix(video): log Android latent and decode numeric summaries [skip ci]
alichherawalla f874fd4
Update Pro pricing copy for monthly plan
alichherawalla 21b0440
feat(settings): move shared generation controls to General
alichherawalla d1b8bd0
test(settings): cover General controls on both surfaces
alichherawalla dca21cd
fix: show saved video generation details in chat [skip ci]
alichherawalla 6e19d08
feat(settings): show default system prompt in chat Text settings
alichherawalla f9dae27
fix: recover active Android video after React reload [skip ci]
alichherawalla bb537c1
fix: retain video completion after bridge disposal [skip ci]
alichherawalla eaeeec9
feat(video): show auto setup pack files [skip ci]
alichherawalla 93220a4
fix(onboarding): read device RAM before auto setup [skip ci]
alichherawalla dc67ffa
feat(onboarding): choose auto setup model downloads [skip ci]
alichherawalla 340e440
fix(onboarding): explain video auto setup exclusion [skip ci]
alichherawalla 2c295f5
fix(onboarding): offer video on 12 GB devices [skip ci]
alichherawalla 52ee407
fix(onboarding): trust bundled video engine [skip ci]
alichherawalla ff55f7f
fix(video): preserve sampling state across reload [skip ci]
alichherawalla b85a21c
feat: stream lightweight SD image previews on mobile [skip ci]
alichherawalla 96fcdce
Add selectable model downloads to Mobile Auto Setup
alichherawalla c688eb8
feat: load SD checkpoints and preserve RGBA image output [skip ci]
alichherawalla 00b89f1
feat(image): support complete SD checkpoints on mobile [skip ci]
alichherawalla 96f9cd5
fix(video): show pending stop until native work ends [skip ci]
alichherawalla 8f9d6f4
feat(video): add short Android backend diagnostics [skip ci]
alichherawalla 69fc04c
fix: retain iOS image backend and failure diagnostics [skip ci]
alichherawalla 66f8111
Make Mobile Auto Setup choices compact
alichherawalla 0a9571a
fix: keep video loading counts out of sampling progress [skip ci]
alichherawalla 0a2e6fa
Tighten Mobile Auto Setup layout
alichherawalla 1e98df1
feat: add mobile design partner details and email draft
alichherawalla 448e8c8
feat: show design partner offer below Pro pricing
alichherawalla 2a54562
feat: link Settings Pro card to design partner offer
alichherawalla 0ec6a8b
copy: update small business design partner eligibility
alichherawalla e1bf5d2
fix(mobile): simplify included Auto Setup models
alichherawalla 8c9e818
fix: report SD image runtime without inferred hardware [skip ci]
alichherawalla 6a250c3
fix: handle resend while native video is stopping [skip ci]
alichherawalla 113224d
copy: use dedicated design partner contact address
alichherawalla 92df184
fix: keep Pro offers compact and make actions visible
alichherawalla 95eac44
fix: use compact navigation rows for Pro secondary actions
alichherawalla ef87de9
copy: describe Pro memory Sync and approved actions
alichherawalla cab26f8
fix: state text hardware and global settings scope [skip ci]
alichherawalla fe4248f
fix(mobile): give Auto Setup actions accessible touch areas
alichherawalla 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
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
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
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
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
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
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
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
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,54 @@ | ||
| cmake_minimum_required(VERSION 3.22) | ||
| project(appmodules LANGUAGES C CXX) | ||
| include(${REACT_ANDROID_DIR}/cmake-utils/ReactNative-application.cmake) | ||
| set(CMAKE_CXX_STANDARD 17) | ||
| set(CMAKE_C_VISIBILITY_PRESET hidden) | ||
| set(CMAKE_CXX_VISIBILITY_PRESET hidden) | ||
| set(SD_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE) | ||
| set(SD_BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE) | ||
| set(SD_BUILD_SHARED_GGML_LIB OFF CACHE BOOL "" FORCE) | ||
| set(GGML_NATIVE OFF CACHE BOOL "" FORCE) | ||
| set(SD_WEBP OFF CACHE BOOL "" FORCE) | ||
| set(SD_WEBM OFF CACHE BOOL "" FORCE) | ||
| set(SD_METAL OFF CACHE BOOL "" FORCE) | ||
| set(SD_VULKAN ON CACHE BOOL "" FORCE) | ||
| set(SD_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../.video-build/source") | ||
| set(GGML_HEXAGON ON CACHE BOOL "" FORCE) | ||
| set(OFFGRID_VIDEO_HEXAGON_CMAKE "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../scripts/video/hexagon-prebuilt.cmake") | ||
| if(NOT EXISTS "${SD_SOURCE}/CMakeLists.txt") | ||
| message(FATAL_ERROR "Run scripts/prepare-video-runtime.sh before building Android.") | ||
| endif() | ||
| set(SPIRV-Headers_DIR "${SD_SOURCE}/../vulkan-header-prefix/share/cmake/SPIRV-Headers") | ||
| set(Vulkan_INCLUDE_DIR "${SD_SOURCE}/../vulkan-header-prefix/include" CACHE PATH "Pinned Vulkan headers" FORCE) | ||
| string(TOLOWER "${CMAKE_HOST_SYSTEM_NAME}" VIDEO_HOST_OS) | ||
| # The NDK shader compiler can be too old for the pinned runtime. Use the host | ||
| # shaderc installation, or an explicit -DVulkan_GLSLC_EXECUTABLE path. | ||
| find_program(Vulkan_GLSLC_EXECUTABLE NAMES glslc glslc.exe | ||
| HINTS "${SD_SOURCE}/../shaderc/bin" NO_CMAKE_FIND_ROOT_PATH REQUIRED) | ||
| if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin") | ||
| # The NDK prepends its compiler directory even for host-program discovery. | ||
| # Its clang cannot compile against the current macOS SDK. Use Xcode's host | ||
| # toolchain for the shader generator; model libraries still use the NDK. | ||
| execute_process(COMMAND xcrun --sdk macosx --find clang | ||
| OUTPUT_VARIABLE VIDEO_HOST_CC OUTPUT_STRIP_TRAILING_WHITESPACE COMMAND_ERROR_IS_FATAL ANY) | ||
| execute_process(COMMAND xcrun --sdk macosx --find clang++ | ||
| OUTPUT_VARIABLE VIDEO_HOST_CXX OUTPUT_STRIP_TRAILING_WHITESPACE COMMAND_ERROR_IS_FATAL ANY) | ||
| else() | ||
| find_program(VIDEO_HOST_CC NAMES clang gcc cl NO_CMAKE_FIND_ROOT_PATH REQUIRED) | ||
| find_program(VIDEO_HOST_CXX NAMES clang++ g++ cl NO_CMAKE_FIND_ROOT_PATH REQUIRED) | ||
| endif() | ||
| set(GGML_VULKAN_SHADERS_GEN_TOOLCHAIN "${CMAKE_BINARY_DIR}/video-host-toolchain.cmake") | ||
| file(WRITE "${GGML_VULKAN_SHADERS_GEN_TOOLCHAIN}" | ||
| "set(CMAKE_C_COMPILER \"${VIDEO_HOST_CC}\")\nset(CMAKE_CXX_COMPILER \"${VIDEO_HOST_CXX}\")\nset(CMAKE_MAKE_PROGRAM \"${CMAKE_MAKE_PROGRAM}\" CACHE FILEPATH \"Host build tool\" FORCE)\n") | ||
| add_subdirectory("${SD_SOURCE}" runtime) | ||
| # Keep model execution representative in debug apps. Unoptimized tensor kernels | ||
| # make CPU conditioning take minutes even though the app remains responsive. | ||
| foreach(VIDEO_RUNTIME_TARGET stable-diffusion ggml-base ggml-cpu ggml-vulkan ggml-hexagon) | ||
| if(TARGET ${VIDEO_RUNTIME_TARGET}) | ||
| target_compile_options(${VIDEO_RUNTIME_TARGET} PRIVATE $<$<CONFIG:Debug>:-O3>) | ||
| endif() | ||
| endforeach() | ||
| add_library(offgrid_video SHARED video/video-jni.cpp) | ||
| target_include_directories(offgrid_video PRIVATE "${SD_SOURCE}/include" "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../native/video/common") | ||
| target_link_libraries(offgrid_video PRIVATE stable-diffusion android log) | ||
| target_link_options(offgrid_video PRIVATE "-Wl,--exclude-libs,ALL" "-Wl,-z,max-page-size=16384") |
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.
📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: off-grid-ai/OGAM
Length of output: 15553
🤖 get_repo_knowledge executed:
get_repo_knowledge off-grid-ai/OGAM /tmp/coderabbit-repo-knowledge/off-grid-ai-ogam-7c31431c/architecture /tmp/coderabbit-repo-knowledge/off-grid-ai-ogam-7c31431c/conventionsLength of output: 35501
🏁 Script executed:
Repository: off-grid-ai/OGAM
Length of output: 28165
🌐 Web query:
Gradle 8 task validation task uses this output of task without declaring explicit or implicit dependency FileCollection builtBy official documentation💡 Result:
Declare the task dependency on the generated asset directory itself.
Line 93 adds
.video-build/hexagon-assetsas a plain asset source directory.prepareVideoRuntimewrites the Hexagon libraries below that directory. The current dependency hook covers onlyconfigureCMake*andmerge*Assetstasks. Other Android Gradle Plugin tasks can consume the asset source directory without depending onprepareVideoRuntime.Attach the producer to the source directory so every consumer inherits the dependency.
🔧 Proposed fix
📝 Committable suggestion
🤖 Prompt for AI Agents