react-native-facefusion 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -0
- package/README.md +259 -0
- package/android/build.gradle +129 -0
- package/android/src/main/AndroidManifest.xml +66 -0
- package/android/src/main/cpp/CMakeLists.txt +73 -0
- package/android/src/main/java/com/facefusion/BitmapDecode.kt +112 -0
- package/android/src/main/java/com/facefusion/ContentGate.kt +86 -0
- package/android/src/main/java/com/facefusion/DeviceProbe.kt +158 -0
- package/android/src/main/java/com/facefusion/FaceCrop.kt +57 -0
- package/android/src/main/java/com/facefusion/FacefusionModule.kt +396 -0
- package/android/src/main/java/com/facefusion/FacefusionPackage.kt +37 -0
- package/android/src/main/java/com/facefusion/FacefusionPreviewView.kt +30 -0
- package/android/src/main/java/com/facefusion/FacefusionPreviewViewManager.kt +25 -0
- package/android/src/main/java/com/facefusion/GallerySave.kt +82 -0
- package/android/src/main/java/com/facefusion/ModelDownload.kt +351 -0
- package/android/src/main/java/com/facefusion/ModelPaths.kt +120 -0
- package/android/src/main/java/com/facefusion/PhotoSwap.kt +125 -0
- package/android/src/main/java/com/facefusion/PipeGuard.kt +74 -0
- package/android/src/main/java/com/facefusion/PreviewSurfaceHolder.kt +104 -0
- package/android/src/main/java/com/facefusion/SourceFaces.kt +125 -0
- package/android/src/main/java/com/facefusion/SwapConfig.kt +31 -0
- package/android/src/main/java/com/facefusion/TargetFaces.kt +88 -0
- package/android/src/main/java/com/facefusion/VideoSwap.kt +501 -0
- package/android/src/main/java/com/facefusion/VideoSwapService.kt +85 -0
- package/android/src/main/java/com/facefusion/mobile/NativePipe.kt +192 -0
- package/lib/module/FacefusionPreview.js +6 -0
- package/lib/module/FacefusionPreview.js.map +1 -0
- package/lib/module/FacefusionPreview.native.js +15 -0
- package/lib/module/FacefusionPreview.native.js.map +1 -0
- package/lib/module/NativeFacefusion.js +53 -0
- package/lib/module/NativeFacefusion.js.map +1 -0
- package/lib/module/detectSourceFaces.js +6 -0
- package/lib/module/detectSourceFaces.js.map +1 -0
- package/lib/module/detectSourceFaces.native.js +15 -0
- package/lib/module/detectSourceFaces.native.js.map +1 -0
- package/lib/module/detectTargetFaces.js +6 -0
- package/lib/module/detectTargetFaces.js.map +1 -0
- package/lib/module/detectTargetFaces.native.js +13 -0
- package/lib/module/detectTargetFaces.native.js.map +1 -0
- package/lib/module/index.js +11 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/models.js +16 -0
- package/lib/module/models.js.map +1 -0
- package/lib/module/models.native.js +43 -0
- package/lib/module/models.native.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/probeDevice.js +6 -0
- package/lib/module/probeDevice.js.map +1 -0
- package/lib/module/probeDevice.native.js +14 -0
- package/lib/module/probeDevice.native.js.map +1 -0
- package/lib/module/saveToGallery.js +6 -0
- package/lib/module/saveToGallery.js.map +1 -0
- package/lib/module/saveToGallery.native.js +15 -0
- package/lib/module/saveToGallery.native.js.map +1 -0
- package/lib/module/swapPhoto.js +6 -0
- package/lib/module/swapPhoto.js.map +1 -0
- package/lib/module/swapPhoto.native.js +16 -0
- package/lib/module/swapPhoto.native.js.map +1 -0
- package/lib/module/swapVideo.js +12 -0
- package/lib/module/swapVideo.js.map +1 -0
- package/lib/module/swapVideo.native.js +29 -0
- package/lib/module/swapVideo.native.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/FacefusionPreview.d.ts +4 -0
- package/lib/typescript/src/FacefusionPreview.d.ts.map +1 -0
- package/lib/typescript/src/FacefusionPreview.native.d.ts +142 -0
- package/lib/typescript/src/FacefusionPreview.native.d.ts.map +1 -0
- package/lib/typescript/src/NativeFacefusion.d.ts +291 -0
- package/lib/typescript/src/NativeFacefusion.d.ts.map +1 -0
- package/lib/typescript/src/detectSourceFaces.d.ts +3 -0
- package/lib/typescript/src/detectSourceFaces.d.ts.map +1 -0
- package/lib/typescript/src/detectSourceFaces.native.d.ts +11 -0
- package/lib/typescript/src/detectSourceFaces.native.d.ts.map +1 -0
- package/lib/typescript/src/detectTargetFaces.d.ts +3 -0
- package/lib/typescript/src/detectTargetFaces.d.ts.map +1 -0
- package/lib/typescript/src/detectTargetFaces.native.d.ts +9 -0
- package/lib/typescript/src/detectTargetFaces.native.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +11 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/models.d.ts +7 -0
- package/lib/typescript/src/models.d.ts.map +1 -0
- package/lib/typescript/src/models.native.d.ts +31 -0
- package/lib/typescript/src/models.native.d.ts.map +1 -0
- package/lib/typescript/src/probeDevice.d.ts +3 -0
- package/lib/typescript/src/probeDevice.d.ts.map +1 -0
- package/lib/typescript/src/probeDevice.native.d.ts +10 -0
- package/lib/typescript/src/probeDevice.native.d.ts.map +1 -0
- package/lib/typescript/src/saveToGallery.d.ts +2 -0
- package/lib/typescript/src/saveToGallery.d.ts.map +1 -0
- package/lib/typescript/src/saveToGallery.native.d.ts +9 -0
- package/lib/typescript/src/saveToGallery.native.d.ts.map +1 -0
- package/lib/typescript/src/swapPhoto.d.ts +3 -0
- package/lib/typescript/src/swapPhoto.d.ts.map +1 -0
- package/lib/typescript/src/swapPhoto.native.d.ts +12 -0
- package/lib/typescript/src/swapPhoto.native.d.ts.map +1 -0
- package/lib/typescript/src/swapVideo.d.ts +6 -0
- package/lib/typescript/src/swapVideo.d.ts.map +1 -0
- package/lib/typescript/src/swapVideo.native.d.ts +20 -0
- package/lib/typescript/src/swapVideo.native.d.ts.map +1 -0
- package/package.json +132 -0
- package/patches/ffjni-analyse-faces.patch +63 -0
- package/scripts/check-tarball.sh +68 -0
- package/scripts/fetch-upstream.sh +91 -0
- package/src/FacefusionPreview.native.tsx +18 -0
- package/src/FacefusionPreview.tsx +9 -0
- package/src/NativeFacefusion.ts +324 -0
- package/src/detectSourceFaces.native.tsx +17 -0
- package/src/detectSourceFaces.tsx +10 -0
- package/src/detectTargetFaces.native.tsx +15 -0
- package/src/detectTargetFaces.tsx +10 -0
- package/src/index.tsx +25 -0
- package/src/models.native.tsx +45 -0
- package/src/models.tsx +23 -0
- package/src/probeDevice.native.tsx +13 -0
- package/src/probeDevice.tsx +7 -0
- package/src/saveToGallery.native.tsx +16 -0
- package/src/saveToGallery.tsx +9 -0
- package/src/swapPhoto.native.tsx +20 -0
- package/src/swapPhoto.tsx +12 -0
- package/src/swapVideo.native.tsx +40 -0
- package/src/swapVideo.tsx +31 -0
- package/third_party/facefusion-mobile/NOTICE +49 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# NOTICE — third-party source: facefusion-mobile
|
|
2
|
+
|
|
3
|
+
This directory holds the C++ inference engine used by this package. It is **not our
|
|
4
|
+
code**. It is vendored from another project so that re-syncing stays close to a file
|
|
5
|
+
copy (ADR-0004) — as close as it can stay now that one small patch exists; see
|
|
6
|
+
"Modifications" below and `docs/02-upstream.md` § Patches.
|
|
7
|
+
|
|
8
|
+
| | |
|
|
9
|
+
|---|---|
|
|
10
|
+
| Project | `facefusion-mobile` |
|
|
11
|
+
| Author | AbrahamPaulJ |
|
|
12
|
+
| Source | https://github.com/AbrahamPaulJ/facefusion-mobile |
|
|
13
|
+
| Upstream path | `work/android/app/src/main/cpp/` |
|
|
14
|
+
| Pinned commit | `bf633acee030772deb2f2068866c0c0a17de24ba` (2026-08-30) |
|
|
15
|
+
| Vendored on | 2026-08-30 |
|
|
16
|
+
| Modifications | **one patch** — `patches/ffjni-analyse-faces.patch`, applied automatically by `scripts/fetch-upstream.sh` after every fetch. Adds a single new JNI export to `ffjni.cpp` (`analyseFaces`); changes no existing function. See `docs/02-upstream.md` § Patches. |
|
|
17
|
+
|
|
18
|
+
## Files
|
|
19
|
+
|
|
20
|
+
The hashes below are of the **pristine, pre-patch** files as fetched — `scripts/
|
|
21
|
+
fetch-upstream.sh` checks these right after cloning, before it applies anything, so
|
|
22
|
+
they verify upstream's actual bytes rather than our patched result.
|
|
23
|
+
|
|
24
|
+
| File | SHA-256 (at the pinned commit, before patching) |
|
|
25
|
+
|---|---|
|
|
26
|
+
| `cpp/ffcv.cpp` | `08d23da6e579b6cfca0de3618b2fc0da1182cb7e6190332e37adeafe2b15838d` |
|
|
27
|
+
| `cpp/ffcv.h` | `cd43cb596fdef378e173386d54fee13cd690795a9e59f732bc1c5b7d81e88d09` |
|
|
28
|
+
| `cpp/ffjni.cpp` | `a957f0df308aa4bb1788fcebcb6eb99be7736422edb6beebc62a0f1106cbb9c8` |
|
|
29
|
+
| `cpp/ffpipe.cpp` | `e0c308356abefbd84dc2f647ad1c392aa0f924570de9e66269fd47f804e3005d` |
|
|
30
|
+
| `cpp/ffpipe.h` | `ce99f9ff2b89e8e0f852dab2803a3b13b139404055f5d9e31959b9a28688f3c0` |
|
|
31
|
+
| `cpp/ffqnn.cpp` | `d00379a9833881f2735596b16eb01d1999fa2eb86237948290c37647497e04ca` |
|
|
32
|
+
| `cpp/ffqnn.h` | `762447796eaa2f88d443200ccab9cd6162822d54944571b9a429a658c657b533` |
|
|
33
|
+
|
|
34
|
+
Upstream's own `CMakeLists.txt` is deliberately **not** copied. Ours lives at
|
|
35
|
+
`android/src/main/cpp/CMakeLists.txt` because the source paths and the QNN include
|
|
36
|
+
roots differ in this repo; the compiler flags and the link line are identical.
|
|
37
|
+
|
|
38
|
+
## Licence
|
|
39
|
+
|
|
40
|
+
Upstream publishes **no LICENSE file**. Under copyright law that is *all rights
|
|
41
|
+
reserved*: the code may be read, but not redistributed. Permission has not yet been
|
|
42
|
+
requested.
|
|
43
|
+
|
|
44
|
+
Because of that, **`cpp/` is gitignored and is not part of this repository.** Nothing
|
|
45
|
+
here redistributes upstream's work. Run `scripts/fetch-upstream.sh` to place the files
|
|
46
|
+
on your own machine, which is a clone you are already entitled to make.
|
|
47
|
+
|
|
48
|
+
If upstream grants a licence, un-ignore `cpp/`, commit it with the licence text beside
|
|
49
|
+
this file, and delete this paragraph. See `docs/05-licensing.md` §1.
|