325 Commits

Author SHA1 Message Date
torzdf 83fdd5f938 Train: Migrate data loading to Torch (#1540) 2026-04-16 19:19:53 +01:00
torzdf aa066ad7b2 bugfix: Aligned faces. Fix padding calculation 2026-04-08 10:02:06 +01:00
torzdf c83e3b53fe bugfix: Manual tool - prevent error on no masks 2026-04-05 17:12:30 +01:00
torzdf 32f427c00c Alignments: Migrate typed-dicts to dataclasses 2026-04-05 12:10:05 +01:00
torzdf 6ca67ce25b Bugfix: Manual tool. Correctly detect frames folder on load 2026-03-31 12:49:00 +01:00
torzdf cb2eace572 Remove legacy face set support 2026-03-31 00:03:05 +01:00
torzdf 0a0d1fabf0 convert bugfixes:
- ffmpeg writer: Exit audio buffer when no audio available
  - convert: correctly apply y-offset
  - Fix color adjust when "none" selected
2026-03-28 14:13:10 +00:00
torzdf 6ae823141c bugfix: vertical-offset in convert and preview 2026-03-27 15:11:05 +00:00
torzdf c8abd1b428 bugfix: Inference model. Make more robust to esoteric layouts 2026-03-27 09:36:01 +00:00
torzdf 7c0665fffa Replace imageio with pyav/ffmpeg-binaries (#1534) 2026-03-24 17:25:12 +00:00
torzdf d21781264d Extraction Overhaul (#1533)
* Extract refactor
2026-03-20 23:52:37 +00:00
torzdf dd2323bc70 Backported updates:
- Docs: Centralize sphinx requirements
- Logging: Handle Torch warnings and logging within our logging module
- Logging: More robust array logging handling
- Alignments: Store arrays as list in alignments file
- Alignments: Minor constants + Pose updates
- Add insightface_resnet network
- Update requirements
2026-03-12 10:27:16 +00:00
torzdf 3326639c3b bugfix: manual tool. Convert np.int32 to int 2026-02-20 10:03:57 +00:00
torzdf 837bc2d51d Faceswap 3 (#1516)
* FaceSwap 3 (#1515)
* Update extract pipeline
* Update requirements + setup for nvidia
* Remove allow-growth option
* tf.keras to keras updates
* lib.model.losses - Port + fix all loss functions for Keras3
* lib.model - port initializers, layers. normalization to Keras3
* lib.model.autoclip to Keras 3
* Update mixed precision layer storage
* model file to .keras format
* Restructure nn_blocks to initialize layers in __init__
* Tensorboard
  - Trainer: Add Torch compatible Tensorboard callbacks
  - GUI event reader remove TF dependency
* Loss logging
  - Flush TB logs on save
  - Replace TB live iterator for GUI
* Backup models on total loss drop rather than per side
* Update all models to Keras3 Compat
* Remove lib.model.session
* Update clip ViT to Keras 3
* plugins.extract.mask.unet-dfl - Fix for Keras3/Torch backend
* Port AdaBelief to Keras 3
* setup.py:
  - Add --dev flag for dev tool install
* Fix Keras 3 syntax
* Fix LR Finder for Keras 3
* Fix mixed precision switching for Keras  3
* Add more optimizers + open up config setting
* train: Remove updating FS1 weights to FS2 models
* Alignments: Remove support for legacy .json files
* tools.model:
  - Remove TF Saved Format saving
  - Fix Backup/Restore + Nan-Scan
* Fix inference model creation for Keras 3
* Preview tool: Fix for Keras3
* setup.py: Configure keras backend
* train: Migration of FS2 models to FS3
* Training: Default coverage to 100%
* Remove DirectML backend
* Update setup for MacOS
* GUI: Force line reading to UTF-8
* Remove redundant Tensorflow references
* Remove redundant code
* Legacy model loading: Fix TFLamdaOp scalar ops and DepthwiseConv2D
* Add vertical offset option for training
* Github actions: Add more python versions
* Add python version to workflow names
* Github workflow: Exclude Python 3.12 for macOS
* Implement custom training loop
* Fs3 - Add RTX5xxx and ROCm 6.1-6.4 support (#1511)
* setup.py: Add Cuda/ROCm version select options
* bump minimum python version to 3.11
* Switch from setup.cgf to pyproject.toml
* Documentation: Update all docs to use automodapi
* Allow sysinfo to run with missing packages + correctly install tk under Linux
* Bugfix: dot naming convention in clip models
* lib.config: Centralise globally rather than passing as object
- Add torch DataParallel for multi-gpu training
  - GUI: Group switches together when generating cli args
  - CLI: Remove deprecated multi-character argparse args
  - Refactor:
    - Centralise tensorboard reading/writing + unit tests
    - Create trainer plugin interfaces + add original + distributed
* Update installers
2025-12-21 02:45:11 +00:00
torzdf 57027092af bugfix: Correctly generate thumbnails for alignments when frames are missing 2025-11-06 17:51:56 +00:00
torzdf 7d80bdbba3 bugfix: setup.py - Don't delimit package specs 2025-02-26 17:55:36 +00:00
torzdf b6ac7b8039 bugfix: Manual tool. Allow working with image folders at EEN values > 1 2024-07-05 18:46:10 +01:00
torzdf ea63f1e64a Mask tool. Add ability to output custom imported masks 2024-06-28 13:50:14 +01:00
torzdf 696692dc08 Fixups
- Deprecations - display correct long argument
  - Minor spelling + linting
2024-04-21 16:22:42 +01:00
torzdf 96528ee3e8 lib.align.detected_face: Split Mask objects to own aligned_mask module 2024-04-19 12:25:00 +01:00
torzdf 2bad105dc8 bugfix: Alignment tool, auto-detect alignments
- Random linting and typing
2024-04-19 11:33:52 +01:00
torzdf d75898f718 Bugfixes for video file alignments storage:
- extract/convert: Load images with correct video extension
  - Manual tool: Cache thumbnails with correct extension
  - Mask tool + Preview tool:: Update legacy alignment keys for pre-video extension storage
2024-04-18 12:45:33 +01:00
torzdf 3f69d9feab manual tool: bugfx: don't error when getting mesh for non-existant face 2024-04-17 14:16:33 +01:00
torzdf 957734dfc0 convert: Bugfix: Update legacy .png video alignments to include video file extension 2024-04-17 12:37:47 +01:00
torzdf 3d5b962d29 linting: typo-fix 2024-04-16 11:15:54 +01:00
torzdf 1c081aea7d Add ability to export and import alignment data (#1383)
* tools.alignments - add export job

* plugins.extract: Update __repr__ for ExtractorBatch dataclass

* plugins.extract: Initial implementation of external import plugins

* plugins.extract: Disable lm masks on ROI alignment data import

* lib.align: Add `landmark_type` property to AlignedFace and return dummy data for ROI Landmarks pose estimate

* plugins.extract: Add centering config item for align import and fix filename mapping for images

* plugins.extract: Log warning on downstream plugins on limited alignment data

* tools: Fix plugins for 4 point ROI landmarks (alignments, sort, mask)

* tools.manual: Fix for 2D-4 ROI landmarks

* training: Fix for 4 point ROI landmarks

* lib.convert: Average color plugin. Avoid divide by zero errors

* extract - external:
  - Default detector to 'external' when importing alignments
  - Handle different frame origin co-ordinates

* alignments: Store video extension in alignments file

* plugins.extract.external: Handle video file keys

* plugins.extract.external: Output warning if missing data

* locales + docs

* plugins.extract.align.external: Roll the corner points to top-left for different origins

* Clean up

* linting fix
2024-04-15 12:19:15 +01:00
torzdf 95b4431c57 Deprecate multi-character cli switches 2024-04-05 13:51:57 +01:00
torzdf ab8199e243 linting + typing 2024-04-03 15:30:46 +01:00
torzdf 70c064ca7d Minor fixups and linting 2024-04-03 15:14:32 +01:00
torzdf 983901466f linting: Reduce Class min-public-methods and fix spacing 2024-04-03 14:37:48 +01:00
torzdf a9d87ae007 linting: Remove pylint hint for logger 2024-04-03 14:03:54 +01:00
torzdf 2b08b8d2a6 typofix: tools.manual lower loglevel for mask removal 2024-03-25 18:55:29 +00:00
torzdf 63b4d91281 Bugfix: Mask tool - correctly name imported mask 2024-03-18 19:38:10 +00:00
torzdf af95dbb310 Bugfix: mask tool. Prevent hangiing when input is folder of frames 2024-03-13 18:21:04 +00:00
torzdf 7a16f753cc Add Mask importing to the mask tool (#1376)
* lib.align.alignments: expose count_faces_in_frame
* tools.mask: refactor and fix frame output to display all masks in a single frame
* tools.mask: add import mask process
* manual tool: Remove NN masks on landmark edit
2024-03-12 13:17:35 +00:00
torzdf f23c87c899 bugfix: Preview tool regression 2023-09-29 14:50:52 +01:00
torzdf a660eda8e1 Convert: Add face scale option 2023-09-09 18:40:36 +01:00
torzdf 12814ce049 bugfix: Manual tool - face filtering 2023-07-12 08:23:48 +01:00
torzdf 8fb96b0d6e mask tool: log and exit if batch not using folder 2023-06-30 09:42:52 +01:00
torzdf 4b20316975 bugfix: manual tool - alignments saving 2023-06-28 18:43:37 +01:00
torzdf efa4471243 typing:
- tools.manual.detected_faces
  - tools.manual.thumbnails
2023-06-28 18:30:17 +01:00
torzdf 6a3b674bef Rebase code (#1326)
* Remove tensorflow_probability requirement

* setup.py - fix progress bars

* requirements.txt: Remove pre python 3.9 packages

* update apple requirements.txt

* update INSTALL.md

* Remove python<3.9 code

* setup.py - fix Windows Installer

* typing: python3.9 compliant

* Update pytest and readthedocs python versions

* typing fixes

* Python Version updates
  - Reduce max version to 3.10
  - Default to 3.10 in installers
  - Remove incompatible 3.11 tests

* Update dependencies

* Downgrade imageio dep for Windows

* typing: merge optional unions and fixes

* Updates
  - min python version 3.10
  - typing to python 3.10 spec
  - remove pre-tf2.10 code
  - Add conda tests

* train: re-enable optimizer saving

* Update dockerfiles

* Update setup.py
  - Apple Conda deps to setup.py
  - Better Cuda + dependency handling

* bugfix: Patch logging to prevent Autograph errors

* Update dockerfiles

* Setup.py - Setup.py - stdout to utf-8

* Add more OSes to github Actions

* suppress mac-os end to end test
2023-06-27 11:27:47 +01:00
torzdf 03f5c671bc Remove plaidML support (#1325)
* Remove PlaidML reference from readme files

* Remove AMD option from installers

* remove amd requirements and update setup.py

* remove plaidml test from CI workflow

* gpustats: remove plaidml backend

* plaid removals:
  - faceswap.py - python version check
  - setup.cfg - plaidml typing ignore
  - lib.keras_utils - All plaid code
  - lib.launcher.py - All plaidml checks and configuration

* remove tf2.2 specific code from GUI event reader

* lib.model - remove all plaidml implementations

* plugins.extract - remove plaidml code

* plugins.train remove plaidml code

* lib.convert - remove plaidml code

* tools.model: remove plaidml code

* Remove plaidML tests from unit tests

* remove plaidml_utils and docsting cleanups

* Remove plaidML refs from configs

* fix keras imports
2023-06-21 12:57:33 +01:00
torzdf 82e927d3e7 bugfix: Preview tool Don't error if too few images 2023-06-18 11:38:43 +01:00
torzdf 216ef38763 alignments tool - batch jobs to run in process 2023-02-24 01:29:10 +00:00
torzdf ec95c19534 alignments tool - Add batch mode 2023-02-24 00:38:28 +00:00
torzdf a076afa910 bugfix: mask tool memory leak in batch-mode 2023-02-21 12:47:18 +00:00
torzdf d0a8d59812 mask tool: Add batch-mode 2023-02-20 23:51:20 +00:00
torzdf cd94b7e046 Mask tool update:
- Allow creation of masks on face sets without an alignments file
  - Auto-detect alignments file location when not provided
2023-02-20 15:05:23 +00:00
torzdf 2028579756 Preview - Allow mask color/opacity configuration
- typing: lib.config
  - docs: lib.config
  - bugfix: popup_configure - keep assets on top
2023-02-13 15:03:34 +00:00