From 9171ab68bc4b374f1a10514b2b8b5c6c958d9996 Mon Sep 17 00:00:00 2001 From: Sean Sube Date: Sat, 11 Feb 2023 15:02:27 -0600 Subject: [PATCH] chore(api): link to diffusers and d8ahazard licenses --- README.md | 9 +++++++++ api/onnx_web/convert/diffusion_original.py | 10 +++++++--- api/onnx_web/convert/diffusion_stable.py | 11 +++++++++++ 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2e2412a0..c57d2c07 100644 --- a/README.md +++ b/README.md @@ -505,6 +505,15 @@ Please see [the Known Errors section of the user guide](https://github.com/ssube ## Credits +Some of the conversion code was copied or derived from code in: + +- https://github.com/huggingface/diffusers/blob/main/scripts/convert_stable_diffusion_checkpoint_to_onnx.py + - https://github.com/huggingface/diffusers/blob/main/LICENSE +- https://github.com/d8ahazard/sd_dreambooth_extension/blob/main/dreambooth/sd_to_diff.py + - https://github.com/d8ahazard/sd_dreambooth_extension/blob/main/license.md + +Those parts have their own license with additional restrictions and may need permission for commercial usage. + Getting this set up and running on AMD would not have been possible without guides by: - https://gist.github.com/harishanand95/75f4515e6187a6aa3261af6ac6f61269 diff --git a/api/onnx_web/convert/diffusion_original.py b/api/onnx_web/convert/diffusion_original.py index 96459187..4a3db675 100644 --- a/api/onnx_web/convert/diffusion_original.py +++ b/api/onnx_web/convert/diffusion_original.py @@ -1,12 +1,16 @@ ### -# From: +# Parts of this file are copied or derived from: # https://github.com/d8ahazard/sd_dreambooth_extension/blob/main/dreambooth/diff_to_sd.py # https://github.com/huggingface/diffusers/blob/main/scripts/convert_original_stable_diffusion_to_diffusers.py # # Originally by https://github.com/d8ahazard and https://github.com/huggingface +# Those portions *are not* covered by the MIT licensed used for the rest of the onnx-web project. +# In particular, you cannot use this converter for commercial purposes without permission. # -# d8ahazard portions do not include a license header or file -# HuggingFace portions used under the Apache License, Version 2.0 +# d8ahazard code used under No-Commercial License with Limited Commercial Use +# https://github.com/d8ahazard/sd_dreambooth_extension/blob/main/license.md +# HuggingFace code used under the Apache License, Version 2.0 +# https://github.com/huggingface/diffusers/blob/main/LICENSE ### import json diff --git a/api/onnx_web/convert/diffusion_stable.py b/api/onnx_web/convert/diffusion_stable.py index e1708f98..eb34b533 100644 --- a/api/onnx_web/convert/diffusion_stable.py +++ b/api/onnx_web/convert/diffusion_stable.py @@ -1,3 +1,14 @@ +### +# Parts of this file are copied or derived from: +# https://github.com/huggingface/diffusers/blob/main/scripts/convert_stable_diffusion_checkpoint_to_onnx.py +# +# Originally by https://github.com/huggingface +# Those portions *are not* covered by the MIT licensed used for the rest of the onnx-web project. +# +# HuggingFace code used under the Apache License, Version 2.0 +# https://github.com/huggingface/diffusers/blob/main/LICENSE +### + from logging import getLogger from os import mkdir, path from pathlib import Path