Skip to content

Commit 94a6741

Browse files
committed
Merge branch 'master' into fs3
2 parents 8073752 + b020756 commit 94a6741

File tree

6 files changed

+18
-34
lines changed

6 files changed

+18
-34
lines changed

.install/linux/faceswap_setup_x64.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,10 +338,11 @@ conda_install() {
338338
info "Installing Miniconda3..."
339339
yellow ; fname="$(basename -- $DL_CONDA)"
340340
bash "$TMP_DIR/$fname" -b -p "$DIR_CONDA"
341+
"$CONDA_EXECUTABLE" tos accept
341342
if $CONDA_TO_PATH ; then
342343
info "Adding Miniconda3 to PATH..."
343344
yellow ; "$CONDA_EXECUTABLE" init
344-
"$CONDA_EXECUTABLE" config --set auto_activate_base false
345+
"$CONDA_EXECUTABLE" config --set auto_activate false
345346
fi
346347
fi
347348
}

.install/macos/faceswap_setup_macos.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,10 +379,11 @@ conda_install() {
379379
info "Installing Miniconda3..."
380380
yellow ; fname="$(basename -- $DL_CONDA)"
381381
bash "$TMP_DIR/$fname" -b -p "$DIR_CONDA"
382+
"$CONDA_EXECUTABLE" tos accept
382383
if $CONDA_TO_PATH ; then
383384
info "Adding Miniconda3 to PATH..."
384385
yellow ; "$CONDA_EXECUTABLE" init zsh bash
385-
"$CONDA_EXECUTABLE" config --set auto_activate_base false
386+
"$CONDA_EXECUTABLE" config --set auto_activate false
386387
fi
387388
fi
388389
}

.install/windows/install.nsi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,8 @@ FunctionEnd
361361
Function SetEnvironment
362362
DetailPrint "Initializing Conda..."
363363
SetDetailsPrint listonly
364+
ExecDos::exec /NOUNLOAD /ASYNC /DETAILED "$\"$dirConda\Scripts\conda.exe$\" tos accept"
365+
pop $0
364366
ExecDos::exec /NOUNLOAD /ASYNC /DETAILED "$\"$dirConda\scripts\activate.bat$\" && conda update -y -n base -c defaults conda && conda deactivate"
365367
pop $0
366368
ExecDos::wait $0

README.md

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# deepfakes_faceswap
2+
3+
### Important information for **Patreon** and **PayPal** supporters. Please see this forum post: https://forum.faceswap.dev/viewtopic.php?f=14&t=3120
4+
25
<p align="center">
36
<a href="https://faceswap.dev"><img src="https://i.imgur.com/zHvjHnb.png"></img></a>
47
<br />FaceSwap is a tool that utilizes deep learning to recognize and swap faces in pictures and videos.
@@ -21,11 +24,13 @@
2124
<br />Jennifer Lawrence/Steve Buscemi FaceSwap using the Villain model
2225
</p>
2326

27+
2428
![Build Status](https://github.com/deepfakes/faceswap/actions/workflows/pytest.yml/badge.svg) [![Documentation Status](https://readthedocs.org/projects/faceswap/badge/?version=latest)](https://faceswap.readthedocs.io/en/latest/?badge=latest)
2529

2630
Make sure you check out [INSTALL.md](INSTALL.md) before getting started.
2731

2832
- [deepfakes\_faceswap](#deepfakes_faceswap)
33+
- [Important information for **Patreon** and **PayPal** supporters. Please see this forum post: https://forum.faceswap.dev/viewtopic.php?f=14\&t=3120](#important-information-for-patreon-and-paypal-supporters-please-see-this-forum-post-httpsforumfaceswapdevviewtopicphpf14t3120)
2934
- [Manifesto](#manifesto)
3035
- [FaceSwap has ethical uses.](#faceswap-has-ethical-uses)
3136
- [How To setup and run the project](#how-to-setup-and-run-the-project)
@@ -48,12 +53,6 @@ Make sure you check out [INSTALL.md](INSTALL.md) before getting started.
4853
- [For devs](#for-devs)
4954
- [For non-dev advanced users](#for-non-dev-advanced-users)
5055
- [For end-users](#for-end-users)
51-
- [For haters](#for-haters)
52-
- [About github.com/deepfakes](#about-githubcomdeepfakes)
53-
- [What is this repo?](#what-is-this-repo)
54-
- [Why this repo?](#why-this-repo)
55-
- [Why is it named 'deepfakes' if it is not /u/deepfakes?](#why-is-it-named-deepfakes-if-it-is-not-udeepfakes)
56-
- [What if /u/deepfakes feels bad about that?](#what-if-udeepfakes-feels-bad-about-that)
5756
- [About machine learning](#about-machine-learning)
5857
- [How does a computer know how to recognize/shape faces? How does machine learning work? What is a neural network?](#how-does-a-computer-know-how-to-recognizeshape-faces-how-does-machine-learning-work-what-is-a-neural-network)
5958

@@ -171,25 +170,6 @@ Creator of the Unbalanced and OHR models, as well as expanding various capabilit
171170
- Be patient. This is a relatively new technology for developers as well. Much effort is already being put into making this program easy to use for the average user. It just takes time!
172171
- **Notice** Any issue related to running the code has to be opened in the [faceswap Forum](https://faceswap.dev/forum)!
173172

174-
## For haters
175-
Sorry, no time for that.
176-
177-
# About github.com/deepfakes
178-
179-
## What is this repo?
180-
It is a community repository for active users.
181-
182-
## Why this repo?
183-
The joshua-wu repo seems not active. Simple bugs like missing _http://_ in front of urls have not been solved since days.
184-
185-
## Why is it named 'deepfakes' if it is not /u/deepfakes?
186-
1. Because a typosquat would have happened sooner or later as project grows
187-
2. Because we wanted to recognize the original author
188-
3. Because it will better federate contributors and users
189-
190-
## What if /u/deepfakes feels bad about that?
191-
This is a friendly typosquat, and it is fully dedicated to the project. If /u/deepfakes wants to take over this repo/user and drive the project, he is welcomed to do so (Raise an issue, and he will be contacted on Reddit). Please do not send /u/deepfakes messages for help with the code you find here.
192-
193173
# About machine learning
194174

195175
## How does a computer know how to recognize/shape faces? How does machine learning work? What is a neural network?

requirements/_requirements_base.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@ tqdm>=4.66
22
psutil>=5.9.0
33
numexpr>=2.8.7
44
numpy>=1.26.0,<2.0.0
5-
opencv-python>=4.9.0.0
5+
opencv-python>=4.9.0.0,<4.12.0.0 # >=4.12 pulls in numpy2.x
66
pillow>=10.3.0
77
scikit-learn>=1.4.2
88
fastcluster>=1.2.6
99
matplotlib>=3.8.4
1010
imageio>=2.33.1
11-
imageio-ffmpeg>=0.4.9
11+
# ffmpeg binary >=0.6.0 breaks convert.
12+
# TODO fix convert to use latest binary
13+
imageio-ffmpeg>=0.4.9,<0.6.0
1214
ffmpy>=0.3.0
1315
pywin32>=305 ; sys_platform == "win32"
1416
torchvision>=0.17.2,<0.19.0

setup.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import sys
1414
import typing as T
1515
from shutil import which
16-
from subprocess import list2cmdline, PIPE, Popen, run, STDOUT
16+
from subprocess import PIPE, Popen, run, STDOUT
1717

1818
from lib.logger import log_setup
1919

@@ -485,7 +485,7 @@ def _parse_requirements(cls, packages: list[str]) -> list[Requirement]:
485485
list[:class:`packaging.Requirement`]
486486
List of Requirement objects that are valid for the current environment
487487
"""
488-
requirements = [Requirement(p) for p in packages]
488+
requirements = [Requirement(p.split("#", maxsplit=1)[0]) for p in packages]
489489
retval = [r for r in requirements if r.marker is None or r.marker.evaluate()]
490490
if len(retval) != len(requirements):
491491
logger.debug("Filtered invalid packages %s",
@@ -1074,8 +1074,6 @@ def _install_setup_packages(self) -> None:
10741074
pkg_str = str(pkg)
10751075
if self._env.is_conda:
10761076
cmd = ["conda", "install", "-y", "-c", "defaults", "--override-channels"]
1077-
if any(char in pkg_str for char in (" ", "<", ">", "*", "|")):
1078-
pkg_str = f"\"{pkg_str}\""
10791077
else:
10801078
cmd = [sys.executable, "-m", "pip", "install", "--no-cache-dir"]
10811079
if self._env.is_admin:
@@ -1555,7 +1553,7 @@ def __init__(self,
15551553
is_gui: bool) -> None:
15561554
super().__init__(environment, package, command, is_gui)
15571555
self._cmd = which(command[0], path=os.environ.get('PATH', os.defpath))
1558-
self._cmdline = list2cmdline(command)
1556+
self._cmdline = " ".join(command)
15591557
logger.debug("cmd: '%s', cmdline: '%s'", self._cmd, self._cmdline)
15601558

15611559
self._pbar = re.compile(r"(?:eta\s[\d\W]+)|(?:\s+\|\s+\d+%)\Z")

0 commit comments

Comments
 (0)