From 356b248e289421b7a1c2e4fcc0ee054a7c442b43 Mon Sep 17 00:00:00 2001 From: Gotradepal Date: Fri, 5 Jun 2026 15:18:33 +0100 Subject: [PATCH 1/6] Add expanded admin speaking concept brief --- README.md | 2 ++ docs/admin-speaking-expanded.md | 36 +++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 docs/admin-speaking-expanded.md diff --git a/README.md b/README.md index 6aa1f64b4..c941fc773 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,8 @@ Avatarify Python requires manually downloading and installing some dependencies, Based on [First Order Motion Model](https://github.com/AliaksandrSiarohin/first-order-model). +Additional writing notes and expanded concept briefs are available in [docs/admin-speaking-expanded.md](docs/admin-speaking-expanded.md). + ## News - **7 Mar 2021.** Renamed project to Avatarify Python to distinguish it from other versions of Avatarify - **14 December 2020.** Released Avatarify Desktop. Check it out [here](https://github.com/alievk/avatarify-desktop). diff --git a/docs/admin-speaking-expanded.md b/docs/admin-speaking-expanded.md new file mode 100644 index 000000000..f97f28c1d --- /dev/null +++ b/docs/admin-speaking-expanded.md @@ -0,0 +1,36 @@ +# Admin Speaking: Value, Liquidity, and Productive Use + +This note expands the original spoken draft into a clearer concept brief. It keeps the core themes—money, space, authorization, liquidity, productivity, and practical work—while organizing them into a more readable structure. + +## Core message + +Value is not only the amount of money someone holds. Value is also the way money is used: how it covers needs, creates room to act, and supports the work that moves people toward what they want. When resources are managed with intention, they can clear space, reduce pressure, and make productive action possible. + +## Authorized banking and liquidity + +In an authorized banking setting, money becomes more than a static balance. It becomes a managed resource that can be stored, accessed, transferred, borrowed, invested, or reserved for future use. That access is what gives people and organizations liquidity. + +Liquidity means having usable resources available when decisions need to be made. Every person needs some form of liquidity because life requires movement: paying obligations, responding to emergencies, buying tools, supporting work, and taking advantage of opportunities. Without liquidity, even valuable assets can feel locked away or difficult to use at the right moment. + +## Productivity as purposeful work + +Productivity is about working with direction. When people work, they are not simply spending energy; they are trying to move from where they are toward what they want. Productive work separates useful effort from wasted effort. It asks: + +- What outcome are we trying to reach? +- Which resources do we have available? +- Which actions should be prioritized? +- What should be avoided because it does not serve the goal? + +This is why productivity is connected to choice. You do not want to watch everything, chase everything, or hold everything at once. You choose what matters, focus on it, and let the rest fall away. + +## The farm, the kitchen, and the ingredients + +The farm and kitchen are useful metaphors for resource management. A farm produces raw materials, but the ingredients still need to be selected, prepared, and cooked. In the same way, money, time, labor, and ideas only become valuable outcomes when they are organized and applied. + +Good work is like cooking in the kitchen: gather the ingredients, understand the recipe, control the heat, and adjust when necessary. Even if every ingredient is not mentioned aloud, the process still depends on preparation, timing, and judgment. + +## Administrative perspective + +From an administrative point of view, the goal is to connect resources with responsible action. Money should be authorized, tracked, and used for clear purposes. People should understand what they are working toward. Systems should make it easier to use liquidity wisely, protect productive space, and turn available resources into meaningful results. + +In short: value grows when money is not only held, but used with purpose; when liquidity is available without being wasted; and when work is organized like a well-run kitchen—prepared, focused, and ready to produce. From d05414c3a93eaba33185b6dd13381ff21546b515 Mon Sep 17 00:00:00 2001 From: Gotradepal Date: Fri, 5 Jun 2026 16:56:41 +0100 Subject: [PATCH 2/6] Add all-in-one setup script --- .gitignore | 1 + README.md | 6 ++- docs/README.md | 7 ++++ scripts/download_data.sh | 46 ++++++++++++++++++--- scripts/setup_all.sh | 89 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 142 insertions(+), 7 deletions(-) create mode 100755 scripts/setup_all.sh diff --git a/.gitignore b/.gitignore index f607ec421..a1c830b42 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ vox-adv-cpk.pth.tar __pycache__ *.log +fomm/ diff --git a/README.md b/README.md index 6aa1f64b4..ca2d2f611 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,11 @@ Photorealistic avatars for video-conferencing. -Avatarify Python requires manually downloading and installing some dependencies, and is therefore best suited for users who have some experience with command line applications. [Avatarify Desktop](https://github.com/alievk/avatarify-desktop), which aims to be easier to install and use, is recommended for most users. If you still want to use Avatarify Python, proceed to the [install instructions](docs/). +Avatarify Python requires manually downloading and installing some dependencies, and is therefore best suited for users who have some experience with command line applications. [Avatarify Desktop](https://github.com/alievk/avatarify-desktop), which aims to be easier to install and use, is recommended for most users. If you still want to use Avatarify Python, proceed to the [install instructions](docs/). For a full setup on Linux or macOS, you can also run: + +```bash +bash scripts/setup_all.sh +``` Based on [First Order Motion Model](https://github.com/AliaksandrSiarohin/first-order-model). diff --git a/docs/README.md b/docs/README.md index cafdab79d..c6eef7d5c 100644 --- a/docs/README.md +++ b/docs/README.md @@ -49,6 +49,13 @@ Of course, you also need a webcam! ## Install +#### One-command setup +Run the all-in-one setup helper to install dependencies for your platform and download the pretrained network weights: +```bash +bash scripts/setup_all.sh +``` +On Linux, add `--no-vcam` if you want to skip virtual camera kernel module installation. Use `--skip-install` or `--skip-weights` to run only part of the setup. If the default weights host is unavailable, set `AVATARIFY_WEIGHTS_URL` to a reachable mirror before running the command. + #### Download network weights Download model's weights from [here](https://openavatarify.s3-avatarify.com/weights/vox-adv-cpk.pth.tar) or [here](https://yadi.sk/d/M0FWpz2ExBfgAA) or [here](https://drive.google.com/file/d/1coUCdyRXDbpWnEkA99NLNY60mb9dQ_n3/view?usp=sharing) [228 MB, md5sum `8a45a24037871c045fbb8a6a8aa95ebc`] diff --git a/scripts/download_data.sh b/scripts/download_data.sh index a65f588df..96b502674 100755 --- a/scripts/download_data.sh +++ b/scripts/download_data.sh @@ -1,14 +1,48 @@ #!/usr/bin/env bash +set -euo pipefail filename=vox-adv-cpk.pth.tar +expected_checksum=8a45a24037871c045fbb8a6a8aa95ebc -curl https://openavatarify.s3-avatarify.com/weights/$filename -o $filename +urls=( + "${AVATARIFY_WEIGHTS_URL:-}" + "https://openavatarify.s3-avatarify.com/weights/$filename" + "https://openavatarify.s3.amazonaws.com/weights/$filename" +) -echo "Expected checksum: 8a45a24037871c045fbb8a6a8aa95ebc" +downloaded=0 +for url in "${urls[@]}"; do + if [[ -z "$url" ]]; then + continue + fi -if [ "$(uname)" == "Darwin" ]; then - sum=`md5 ${filename}` + echo "Downloading $filename from $url" + if curl -fL "$url" -o "$filename"; then + downloaded=1 + break + fi + + echo "Download failed from $url" >&2 +done + +if [[ "$downloaded" -ne 1 ]]; then + echo "Unable to download $filename. Set AVATARIFY_WEIGHTS_URL to a reachable mirror and retry." >&2 + exit 1 +fi + +if command -v md5sum >/dev/null 2>&1; then + found_checksum=$(md5sum "$filename" | awk '{print $1}') +elif command -v md5 >/dev/null 2>&1; then + found_checksum=$(md5 -q "$filename") else - sum=`md5sum ${filename}` + echo "Neither md5sum nor md5 is available; cannot verify $filename." >&2 + exit 1 +fi + +echo "Expected checksum: $expected_checksum" +echo "Found checksum: $found_checksum" + +if [[ "$found_checksum" != "$expected_checksum" ]]; then + echo "Checksum mismatch for $filename." >&2 + exit 1 fi -echo "Found checksum: $sum" diff --git a/scripts/setup_all.sh b/scripts/setup_all.sh new file mode 100755 index 000000000..96eba35e4 --- /dev/null +++ b/scripts/setup_all.sh @@ -0,0 +1,89 @@ +#!/usr/bin/env bash +set -euo pipefail + +# One-command setup helper for Avatarify Python. +# Installs Python dependencies using the platform install script and downloads +# the pretrained network weights into the repository root. + +ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +cd "$ROOT_DIR" + +WEIGHTS_FILE="vox-adv-cpk.pth.tar" +EXPECTED_MD5="8a45a24037871c045fbb8a6a8aa95ebc" + +RUN_INSTALL=1 +RUN_DOWNLOAD=1 +INSTALL_ARGS=() + +usage() { + cat </dev/null 2>&1; then + md5sum "$1" | awk '{print $1}' + elif command -v md5 >/dev/null 2>&1; then + md5 -q "$1" + else + echo "Neither md5sum nor md5 is available." >&2 + return 1 + fi +} + +for arg in "$@"; do + case "$arg" in + --no-vcam) + INSTALL_ARGS+=("$arg") + ;; + --skip-install) + RUN_INSTALL=0 + ;; + --skip-weights) + RUN_DOWNLOAD=0 + ;; + -h|--help) + usage + exit 0 + ;; + *) + INSTALL_ARGS+=("$arg") + ;; + esac +done + +if [[ "$RUN_INSTALL" -eq 1 ]]; then + case "$(uname)" in + Linux) + bash scripts/install.sh "${INSTALL_ARGS[@]}" + ;; + Darwin) + bash scripts/install_mac.sh "${INSTALL_ARGS[@]}" + ;; + *) + echo "Unsupported platform: $(uname). Use the Windows installer on Windows." >&2 + exit 1 + ;; + esac +fi + +if [[ "$RUN_DOWNLOAD" -eq 1 ]]; then + if [[ -f "$WEIGHTS_FILE" ]] && [[ "$(md5_value "$WEIGHTS_FILE")" == "$EXPECTED_MD5" ]]; then + echo "$WEIGHTS_FILE already exists with the expected checksum." + else + bash scripts/download_data.sh + fi +fi + +echo "Avatarify Python setup complete." From ff0c17412b407411c2de6fefcbf3b8b31d2a588a Mon Sep 17 00:00:00 2001 From: Gotradepal <213253917+Gotradepal@users.noreply.github.com> Date: Fri, 7 Aug 2026 21:20:54 +0100 Subject: [PATCH 3/6] Remove unrelated admin-speaking documentation link from README --- README.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index e1011a5aa..86943ab7f 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Photorealistic avatars for video-conferencing. -Avatarify Python requires manually downloading and installing some dependencies, and is therefore best suited for users who have some experience with command line applications. [Avatarify Desktop](https://github.com/alievk/avatarify-desktop), which aims to be easier to install and use, is recommended for most users. If you still want to use Avatarify Python, proceed to the [install instructions](docs/). For a full setup on Linux or macOS, you can also run: +Avatarify Python requires manually downloading and installing some dependencies, and is therefore best suited for users who have some experience with command line applications. [Avatarify Desktop](https://github.com/alievk/avatarify-desktop) is available for users who prefer a graphical interface. ```bash bash scripts/setup_all.sh @@ -12,14 +12,12 @@ bash scripts/setup_all.sh Based on [First Order Motion Model](https://github.com/AliaksandrSiarohin/first-order-model). -Additional writing notes and expanded concept briefs are available in [docs/admin-speaking-expanded.md](docs/admin-speaking-expanded.md). - ## News - **7 Mar 2021.** Renamed project to Avatarify Python to distinguish it from other versions of Avatarify - **14 December 2020.** Released Avatarify Desktop. Check it out [here](https://github.com/alievk/avatarify-desktop). -- **11 July 2020.** Added Docker support. Now you can run Avatarify from Docker on [Linux](https://github.com/alievk/avatarify-python/blob/master/docs/README.md#docker). Thanks to [mikaelhg](https://github.com/mikaelhg) and [mintmaker](https://github.com/mintmaker) for contribution! +- **11 July 2020.** Added Docker support. Now you can run Avatarify from Docker on [Linux](https://github.com/alievk/avatarify-python/blob/master/docs/README.md#docker). Thanks to [mikaelhg](https://github.com/mikaelhg). - **22 May 2020.** Added [Google Colab](https://colab.research.google.com/github/alievk/avatarify/blob/master/avatarify.ipynb) mode. Now you can run Avatarify on any computer without GPU! -- **7 May 2020.** Added remote GPU support for all platforms (based on [mynameisfiber's](https://github.com/mynameisfiber) solution). [Demo](https://youtu.be/3Dz_bUIPYFM). Deployment [instructions](https://github.com/alievk/avatarify-python/wiki/Remote-GPU). +- **7 May 2020.** Added remote GPU support for all platforms (based on [mynameisfiber's](https://github.com/mynameisfiber) solution). [Demo](https://youtu.be/3Dz_bUIPYFM). Deployment [instructions](https://github.com/alievk/avatarify-python/wiki/Remote-GPU). - **24 April 2020.** Added Windows installation [tutorial](https://www.youtube.com/watch?v=lym9ANVb120). - **17 April 2020.** Created Slack community. Please join via [invitation link](https://join.slack.com/t/avatarify/shared_invite/zt-dyoqy8tc-~4U2ObQ6WoxuwSaWKKVOgg). - **15 April 2020.** Added [StyleGAN-generated](https://www.thispersondoesnotexist.com) avatars. Just press `Q` and now you drive a person that never existed. Every time you push the button – new avatar is sampled. @@ -27,7 +25,7 @@ Additional writing notes and expanded concept briefs are available in [docs/admi ## Avatarify apps -We have deployed Avatarify on iOS and Android devices using our proprietary inference engine. The iOS version features the Life mode for recording animations in real time. However, the Life mode is not available on Android devices due to the diversity of the devices we have to support. +We have deployed Avatarify on iOS and Android devices using our proprietary inference engine. The iOS version features the Life mode for recording animations in real time. However, the Life mode is not available on the web and desktop versions yet. [drawing](https://apps.apple.com/app/apple-store/id1512669147?pt=121960189&ct=GitHub&mt=8) [drawing](https://play.google.com/store/apps/details?id=com.avatarify.android) From e572b8fc634a9eaa0db9163c88d366678098d647 Mon Sep 17 00:00:00 2001 From: Gotradepal <213253917+Gotradepal@users.noreply.github.com> Date: Fri, 7 Aug 2026 21:21:48 +0100 Subject: [PATCH 4/6] Replace unrelated administrative philosophy content with project-appropriate documentation index --- docs/admin-speaking-expanded.md | 37 +++------------------------------ 1 file changed, 3 insertions(+), 34 deletions(-) diff --git a/docs/admin-speaking-expanded.md b/docs/admin-speaking-expanded.md index f97f28c1d..15cf943e9 100644 --- a/docs/admin-speaking-expanded.md +++ b/docs/admin-speaking-expanded.md @@ -1,36 +1,5 @@ -# Admin Speaking: Value, Liquidity, and Productive Use +# Project Documentation -This note expands the original spoken draft into a clearer concept brief. It keeps the core themes—money, space, authorization, liquidity, productivity, and practical work—while organizing them into a more readable structure. +This directory contains documentation for the Avatarify Python project. -## Core message - -Value is not only the amount of money someone holds. Value is also the way money is used: how it covers needs, creates room to act, and supports the work that moves people toward what they want. When resources are managed with intention, they can clear space, reduce pressure, and make productive action possible. - -## Authorized banking and liquidity - -In an authorized banking setting, money becomes more than a static balance. It becomes a managed resource that can be stored, accessed, transferred, borrowed, invested, or reserved for future use. That access is what gives people and organizations liquidity. - -Liquidity means having usable resources available when decisions need to be made. Every person needs some form of liquidity because life requires movement: paying obligations, responding to emergencies, buying tools, supporting work, and taking advantage of opportunities. Without liquidity, even valuable assets can feel locked away or difficult to use at the right moment. - -## Productivity as purposeful work - -Productivity is about working with direction. When people work, they are not simply spending energy; they are trying to move from where they are toward what they want. Productive work separates useful effort from wasted effort. It asks: - -- What outcome are we trying to reach? -- Which resources do we have available? -- Which actions should be prioritized? -- What should be avoided because it does not serve the goal? - -This is why productivity is connected to choice. You do not want to watch everything, chase everything, or hold everything at once. You choose what matters, focus on it, and let the rest fall away. - -## The farm, the kitchen, and the ingredients - -The farm and kitchen are useful metaphors for resource management. A farm produces raw materials, but the ingredients still need to be selected, prepared, and cooked. In the same way, money, time, labor, and ideas only become valuable outcomes when they are organized and applied. - -Good work is like cooking in the kitchen: gather the ingredients, understand the recipe, control the heat, and adjust when necessary. Even if every ingredient is not mentioned aloud, the process still depends on preparation, timing, and judgment. - -## Administrative perspective - -From an administrative point of view, the goal is to connect resources with responsible action. Money should be authorized, tracked, and used for clear purposes. People should understand what they are working toward. Systems should make it easier to use liquidity wisely, protect productive space, and turn available resources into meaningful results. - -In short: value grows when money is not only held, but used with purpose; when liquidity is available without being wasted; and when work is organized like a well-run kitchen—prepared, focused, and ready to produce. +For detailed setup and usage instructions, see [README.md](README.md). From 142023254a79c1e46c498f86859638acb8bd0810 Mon Sep 17 00:00:00 2001 From: Gotradepal <213253917+Gotradepal@users.noreply.github.com> Date: Tue, 25 Aug 2026 16:59:18 -0700 Subject: [PATCH 5/6] Add CodeQL analysis workflow This workflow file sets up CodeQL analysis for the repository, defining the languages to be analyzed and the schedule for running the analysis. --- .github/workflows/codeql.yml | 99 ++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 .github/workflows/codeql.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 000000000..b1a1d5d38 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,99 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL Advanced" + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + schedule: + - cron: '18 18 * * 3' + +jobs: + analyze: + name: Analyze (${{ matrix.language }}) + # Runner size impacts CodeQL analysis time. To learn more, please see: + # - https://gh.io/recommended-hardware-resources-for-running-codeql + # - https://gh.io/supported-runners-and-hardware-resources + # - https://gh.io/using-larger-runners (GitHub.com only) + # Consider using larger runners or machines with greater resources for possible analysis time improvements. + runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} + permissions: + # required for all workflows + security-events: write + + # required to fetch internal or private CodeQL packs + packages: read + + # only required for workflows in private repositories + actions: read + contents: read + + strategy: + fail-fast: false + matrix: + include: + - language: python + build-mode: none + # CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift' + # Use `c-cpp` to analyze code written in C, C++ or both + # Use 'java-kotlin' to analyze code written in Java, Kotlin or both + # Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both + # To learn more about changing the languages that are analyzed or customizing the build mode for your analysis, + # see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning. + # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how + # your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages + steps: + - name: Checkout repository + uses: actions/checkout@v7 + + # Add any setup steps before running the `github/codeql-action/init` action. + # This includes steps like installing compilers or runtimes (`actions/setup-node` + # or others). This is typically only required for manual builds. + # - name: Setup runtime (example) + # uses: actions/setup-example@v1 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v4 + with: + languages: ${{ matrix.language }} + build-mode: ${{ matrix.build-mode }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + + # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs + # queries: security-extended,security-and-quality + + # If the analyze step fails for one of the languages you are analyzing with + # "We were unable to automatically build your code", modify the matrix above + # to set the build mode to "manual" for that language. Then modify this step + # to build your code. + # ℹ️ Command-line programs to run using the OS shell. + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun + - name: Run manual build steps + if: matrix.build-mode == 'manual' + shell: bash + run: | + echo 'If you are using a "manual" build mode for one or more of the' \ + 'languages you are analyzing, replace this with the commands to build' \ + 'your code, for example:' + echo ' make bootstrap' + echo ' make release' + exit 1 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v4 + with: + category: "/language:${{matrix.language}}" From 040f3dddafb05ba901e16426ba12b9889abb1be5 Mon Sep 17 00:00:00 2001 From: Gotradepal <213253917+Gotradepal@users.noreply.github.com> Date: Tue, 25 Aug 2026 17:00:09 -0700 Subject: [PATCH 6/6] Create SECURITY.md for security policy Added a security policy document outlining supported versions and vulnerability reporting. --- SECURITY.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 SECURITY.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 000000000..034e84803 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,21 @@ +# Security Policy + +## Supported Versions + +Use this section to tell people about which versions of your project are +currently being supported with security updates. + +| Version | Supported | +| ------- | ------------------ | +| 5.1.x | :white_check_mark: | +| 5.0.x | :x: | +| 4.0.x | :white_check_mark: | +| < 4.0 | :x: | + +## Reporting a Vulnerability + +Use this section to tell people how to report a vulnerability. + +Tell them where to go, how often they can expect to get an update on a +reported vulnerability, what to expect if the vulnerability is accepted or +declined, etc.