Skip to content

Conversation

@dotlambda
Copy link

AlbumentationsX is a drop-in replacement for Albumentations

https://github.com/albumentations-team/AlbumentationsX

@martinsbruveris
Copy link

But unfortunately, the licences are not compatible.

  • Insightface is published under the MIT licence
  • The free version of AlbumentationsX is published under the AGPL licence.

Including AlbumentationsX into Insightface would make all of Insightface fall under the AGPL licence unless the user has paid for AlbumentationsX.

@dotlambda
Copy link
Author

dotlambda commented Sep 9, 2025

Including AlbumentationsX into Insightface would make all of Insightface fall under the AGPL licence unless the user has paid for AlbumentationsX.

That's not true. Insightface only uses Albumentations' API, so its code can have a different license.
EDIT: I guess it's not quite clear whether using a Python module is considered "linking" to it.
Second edit: Also, even if using a Python module is considered linking, Insightface would only have to use a GPL-compatible license, which the MIT license falls under.

@martinsbruveris
Copy link

martinsbruveris commented Sep 9, 2025

But it would create quite severe restrictions on any project that wants to depend on Insightface because of the transitive dependence on AlbumentationsX. Even if Insightface's licence could remain the same, projects using Insightface would have to abide by the restrictions of AlbumentationsX's licence.

@nttstar
Copy link
Collaborator

nttstar commented Sep 10, 2025

Hi all, thank you for the valuable discussion. I also did find that the albumentations library needs to be updated. Is there a clear answer regarding the license issue at the moment?

@deepinsight deepinsight deleted a comment from Jimmy-ajia Sep 10, 2025
@deepinsight deepinsight deleted a comment from Jimmy-ajia Sep 10, 2025
@martinsbruveris
Copy link

This is my understanding of the consequences of upgrading Albumentations to AlbumentationsX.

  • Insightface is licenced under the MIT licence. The only requirement it imposes upon users of the code is to include the licence file. It is not a copyleft licence, i.e., it does not require redistributing the source code of any derivative works.
  • Albumentations (the original, not deprecated) is also licenced under the MIT licence.
  • AlbumentationsX has a dual licence structure: users can pay for a a commercial licence without copyleft requirements. But the free version is licenced under AGPL. Like GPL, this does include a copyleft provision: any derivatives or modifications of AlbumentationsX must also be licensed under the same licence. AGPL also expands the notion of "distributing" software, to also include software served over the network (so SaaS models).
  • This means that AlbumentationsX cannot be used commercially, including server-side, without open-sourcing the whole application. This restriction is new and did not exist with Albumentations.
  • This means that if Insighface adopts AlbumentationsX, then any project using Insighface will fall under these terms. It will be a significant blocker to the use of Insightface in corporate settings (even for non-commercial or side projects, simply because of the danger of licence contamination), unless there is a commercial licence for AlbumentationsX is place.

This does not address the open question (rightly raised by @dotlambda ) of whether Insightface itself does or does not have to be licenced under AGPL. Does importing AlbumentationsX already mean that Insightface is a derivative work? That I do not know.

But from my perspective, the licence implications to users of Insighface are problematic enough that I would recommend instead to remove Albumentations from the library and replace it with some other data augmentation library.

@dotlambda
Copy link
Author

dotlambda commented Sep 10, 2025

This does not address the open question (rightly raised by @dotlambda ) of whether Insightface itself does or does not have to be licenced under AGPL. Does importing AlbumentationsX already mean that Insightface is a derivative work?

It does not:

you must release your program under a license compatible with the GPL

https://www.gnu.org/licenses/gpl-faq.html#LinkingWithGPL

Note again that the MIT license is in fact compatible.

@aaronliu0130
Copy link

aaronliu0130 commented Dec 2, 2025

As mentioned, you can link an MIT project against a(n A)GPL project. In addition to dotlambda's link, https://www.gnu.org/licenses/license-list.html#Expat is where the FSF says the MIT license is compatible.

@awsr
Copy link

awsr commented Dec 22, 2025

I think you might be mixing up AGPL and LGPL. The MIT license is NOT compatible with the AGPL license.

The AGPL license has stricter requirements in terms of requiring the availability of source code for derivative works, and @martinsbruveris is correct with their analysis in #2794 (comment).

Also, from part of https://www.gnu.org/licenses/gpl-faq.html#MereAggregation:

...
If the modules are included in the same executable file, they are definitely combined in one program. If modules are designed to run linked together in a shared address space, that almost surely means combining them into one program.

By contrast, pipes, sockets and command-line arguments are communication mechanisms normally used between two separate programs. So when they are used for communication, the modules normally are separate programs. But if the semantics of the communication are intimate enough, exchanging complex internal data structures, that too could be a basis to consider the two parts as combined into a larger program.

@Jimmy-ajia
Copy link

Jimmy-ajia commented Dec 22, 2025 via email

@aaronliu0130
Copy link

aaronliu0130 commented Dec 22, 2025

(I agree that importing counts as linking/combined.) The link @dotlambda provided is about the GPL, not the LGPL. It all but certainly applies to the AGPL too as the provisions it references are not compromised by AGPL's only difference, the "addition" of section 13. Though the GPL is not compatible with the MIT/Expat License, as I mentioned above, the FSF has explicitly stated that the MIT/Expat License is compatible with the GPL, and that is what matters for whether we can import albumentationsx.

This is a lax, permissive non-copyleft free software license, compatible with the GNU GPL.

Some people call this license “the MIT License,” [...]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants