561 Commits

Author SHA1 Message Date
torzdf f530cb7508 bugfix: Phaze-A, correctly set mobilenetv3 kwargs 2026-08-05 12:39:25 +01:00
torzdf 87ac39eb9e bugfix: TFLambdaOp to ScalarOp on legacy update 2026-08-02 14:35:30 +01:00
torzdf acdcfa8796 bugfix: Villain model. Correctly build lowmem variant 2026-06-24 11:08:45 +01:00
torzdf 7aa85b29aa extract bugfixes: vgg-obstructed model path + unet-dfl output shape 2026-05-21 12:02:26 +01:00
torzdf 815b11f104 Migrate optimizers to torch (#1547) 2026-05-21 08:44:57 +01:00
torzdf a0ff721004 Completely remove Keras from loss calculations (#1545)
* training: Completely remove Keras from loss calculations
2026-05-09 19:07:30 +01:00
torzdf f7aa56a037 bugfix: Native torch loss functions running in Keras 2026-04-24 18:12:42 +01:00
torzdf fc1dcd1fd0 bugfix: Loss function device allocation 2026-04-24 10:24:24 +01:00
torzdf 4dc652cb7f bugfix: FS2 to 3 SeparableConv2D update 2026-04-21 19:15:22 +01:00
torzdf 16fea0ebff Most loss functions to torch 2026-04-21 19:14:55 +01:00
torzdf ed70efdf3f hrnet: Slightly improved weights 2026-04-20 10:09:13 +01:00
torzdf e6ae291cd4 lpips: To torch + crop feature map zero-padding 2026-04-20 09:15:26 +01:00
torzdf 83fdd5f938 Train: Migrate data loading to Torch (#1540) 2026-04-16 19:19:53 +01:00
torzdf 7203cf3dea bugfix: Align - Fix re-feed OOB cropping + loosen HRNet BBox 2026-04-05 19:14:34 +01: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 2ad87b1682 Bugfix: Fix mixed precision 2026-03-17 18:32:52 +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 342e19d56e bugfix: Mask tool for bisenet-fp 2026-01-05 12:29:50 +00:00
torzdf 81b6002c35 Bugfixes:
- Convert: Fix error when 'learn mask' has been selected
  - Bisenet-FP mask: Correctly store mask for face or head centering
2025-12-31 14:24:16 +00:00
torzdf c53dcca287 Bugfixes:
- Keras 2 to 3, remove 'group' parameter from Conv2DTranspose
  - Suppress Keras warning about backend padding differences
  - Flatten non-list Fully Connected inputs to silence Keras warnings
2025-12-27 14:01:17 +00:00
torzdf 030b4fa879 bugfix: Keras 2to3, store dtypes in Keras3 friendly manner 2025-12-23 15:10:48 +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 102c8b4f90 bugfix: Correctly set learning rate from learning rate finder on restart 2025-11-21 22:51:20 +00:00
torzdf 381b06f6d3 training: Add Learning Rate Warmup 2025-11-21 17:52:45 +00:00
torzdf 05857b63e1 bugfix: Correctly set learning rate from LR Finder when resuming 2025-11-21 15:19:12 +00:00
torzdf c8652ecaac Training preview: Correctly display blur/kernel amount on mask 2024-06-02 16:25:30 +01:00
torzdf 8c3bc39454 bugfix: Patch writer. Correctly split frame number from the end of filenames 2024-05-10 21:48:38 +01:00
torzdf 696692dc08 Fixups
- Deprecations - display correct long argument
  - Minor spelling + linting
2024-04-21 16:22:42 +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 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 97a842112c lib.align.aligned_face - Add split_mask method 2024-04-03 13:57:19 +01:00
torzdf 4502824481 Add mask dilation/erosion option for training 2024-03-26 18:06:48 +00:00
torzdf 1d3c59c351 Bugfix: Extract error on rotate faces 2024-03-20 15:24:30 +00:00
torzdf b25f48431d bugfix: Patch writer - handle filenames which are only numeric 2024-01-10 13:05:35 +00:00
torzdf 4557331cb9 bugfix: Preview in GUI when converting to vid/gif 2023-10-24 23:47:08 +01:00
torzdf 8e6c6c3500 patch writer: Sort the json file by key 2023-10-04 10:47:59 +01:00
torzdf 3336772ff1 bugfix: patch writer - remove hard coded values 2023-09-30 12:19:04 +01:00
torzdf e80ae046d5 Convert - Patch writer (#1352)
* Add cli-args and config opts for patch writer
* Add supporting code to convert funcs
* writers
  - move frame count functions to _base
  - Add kwargs for pre_encode
* scripts/lib convert - add code for patch writer
* lib.image.encode_image - Add cv2.imencode args
* patch_defaults: Add face index location option
* Add patch writer with PNG support
* Send correct matrix to patch plugin
* Add canvas origin option
* Add Tiff format to Patch Writer
* Docs and locales
* Add ROI to output
* convert: choose warp border by face count
2023-09-28 11:55:38 +01:00
torzdf 603fdc2a35 Phaze A - Allow outputs divisible by 16 2023-09-01 09:50:47 +01:00
torzdf cf0efff6ba Learning Rate finder (#1341)
* Add LR Finder support structure

* Move trainer.Feeder to lib.training.generator

* Expose model.io

* Add lr_finder

* Update docs and locales

* Pre-PR fixups
  - Fix training graph not displaying
  - CI fixes
  - Switch lr finder progress to tqdm
  - Exit lr finder early on NaN
  - Display lr finder progress in GUI
2023-08-22 17:07:36 +01:00
torzdf 68a3322748 bugfix: train - fix learn_mask training 2023-08-09 19:37:24 +01:00
torzdf 0bba6ffd8b bugfix: train - fix occasional mem leak in preview 2023-08-06 13:16:32 +01:00
torzdf c34756c828 fixes
- Farl weight name fix
  - Embedding layers to fp32
  - nn_blocks - unique names for conv_output
  - Phaze-A - Add clipfaker presets
2023-07-11 23:11:47 +01:00
torzdf c4204c7d8a Updates:
- Remove clipfaker
    - Add clip to Phaze-A
    - streamline clip to vision only
    - update lib.model.networks
    - Docs and tests update
    - Phaze-A - add option to flatten bottleneck
2023-07-08 17:20:39 +01:00
torzdf 6a3b4ed4b3 Training fixes:
- Fix mixed precision layer storing and switching
  - typofix in _requirements_base.txt
  - lib.model.layers - cleanup, docs and tests fixes
  - lib.model.nn_blocks - typing fixes
2023-07-08 16:47:25 +01:00
torzdf 2bf529ad65 bugfix: Optimizer save error on older models 2023-06-30 12:14:23 +01:00