From 1628c79145804a4e84909aaa5f29fd1bb7e1dcd8 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Thu, 9 Jul 2026 06:46:45 +0000 Subject: [PATCH] diffusion: add AGPL-3.0 SPDX header to Krea2 / LoRA / ControlNet files Five studio diffusion source files added by earlier sub-PRs (Krea 2 Turbo, Images LoRA, ControlNet) were missing the AGPL-3.0 SPDX header the rest of studio/backend carries. Add it so the whole backend is consistently licensed. --- studio/backend/core/inference/diffusion_krea2.py | 3 +++ studio/backend/core/inference/diffusion_lora.py | 3 +++ studio/backend/tests/test_diffusion_controlnet.py | 3 +++ studio/backend/tests/test_diffusion_krea2.py | 3 +++ studio/backend/tests/test_diffusion_lora.py | 3 +++ 5 files changed, 15 insertions(+) diff --git a/studio/backend/core/inference/diffusion_krea2.py b/studio/backend/core/inference/diffusion_krea2.py index 86a1d0413c..2c246e1569 100644 --- a/studio/backend/core/inference/diffusion_krea2.py +++ b/studio/backend/core/inference/diffusion_krea2.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: AGPL-3.0-only +# Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0 + """Krea 2 pipeline loader: assembles ``Krea2Pipeline`` from per-component loads. Why not ``Krea2Pipeline.from_pretrained``: the ``krea/Krea-2-Turbo`` repo was exported diff --git a/studio/backend/core/inference/diffusion_lora.py b/studio/backend/core/inference/diffusion_lora.py index 5d886cf1bd..bcd296bf2a 100644 --- a/studio/backend/core/inference/diffusion_lora.py +++ b/studio/backend/core/inference/diffusion_lora.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: AGPL-3.0-only +# Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0 + """Shared LoRA support for the Studio diffusion backends. Both engines apply LoRA differently -- the native stable-diffusion.cpp CLI selects diff --git a/studio/backend/tests/test_diffusion_controlnet.py b/studio/backend/tests/test_diffusion_controlnet.py index d7783c7d35..b8ac050db6 100644 --- a/studio/backend/tests/test_diffusion_controlnet.py +++ b/studio/backend/tests/test_diffusion_controlnet.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: AGPL-3.0-only +# Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0 + """Tests for diffusion ControlNet support: discovery/resolve/preprocess/gate helpers, the request-model validation, the family wiring, and the diffusers ControlNet pipe manager.""" diff --git a/studio/backend/tests/test_diffusion_krea2.py b/studio/backend/tests/test_diffusion_krea2.py index 86ff8fdcb0..74556e2179 100644 --- a/studio/backend/tests/test_diffusion_krea2.py +++ b/studio/backend/tests/test_diffusion_krea2.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: AGPL-3.0-only +# Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0 + """Unit tests for the Krea 2 per-component pipeline loader (CPU-only, no network).""" from __future__ import annotations diff --git a/studio/backend/tests/test_diffusion_lora.py b/studio/backend/tests/test_diffusion_lora.py index 6b1a980e7f..fb5c2d1f6c 100644 --- a/studio/backend/tests/test_diffusion_lora.py +++ b/studio/backend/tests/test_diffusion_lora.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: AGPL-3.0-only +# Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0 + """Tests for diffusion LoRA support: the shared helpers, request-model validation, the native prompt-tag/dir wiring, and the diffusers set_adapters manager."""