diff --git a/stable-diffusion-xl-base-1.0/.gitattributes b/.gitattributes similarity index 91% rename from stable-diffusion-xl-base-1.0/.gitattributes rename to .gitattributes index 7691f136a2661ab8fa1e9396a024016ae8aa4799..ecbac6f07e4f359fe5100e942532a1c2be9b3e89 100644 --- a/stable-diffusion-xl-base-1.0/.gitattributes +++ b/.gitattributes @@ -25,12 +25,10 @@ *.safetensors filter=lfs diff=lfs merge=lfs -text saved_model/**/* filter=lfs diff=lfs merge=lfs -text *.tar.* filter=lfs diff=lfs merge=lfs -text -*.tar filter=lfs diff=lfs merge=lfs -text *.tflite filter=lfs diff=lfs merge=lfs -text *.tgz filter=lfs diff=lfs merge=lfs -text *.wasm filter=lfs diff=lfs merge=lfs -text *.xz filter=lfs diff=lfs merge=lfs -text *.zip filter=lfs diff=lfs merge=lfs -text *.zst filter=lfs diff=lfs merge=lfs -text -*tfevents* filter=lfs diff=lfs merge=lfs -text -01.png filter=lfs diff=lfs merge=lfs -text +*tfevents* filter=lfs diff=lfs merge=lfs -text \ No newline at end of file diff --git a/controlnet-canny-sdxl-1.0/config.json b/cn-canny-edge-cache/config.json similarity index 91% rename from controlnet-canny-sdxl-1.0/config.json rename to cn-canny-edge-cache/config.json index c38f38aa9f7b635abd06ccd5d211870d9c8c150b..5b0fd9aa01f7805c39dc2764a3068c6931571778 100644 --- a/controlnet-canny-sdxl-1.0/config.json +++ b/cn-canny-edge-cache/config.json @@ -1,7 +1,7 @@ { "_class_name": "ControlNetModel", - "_diffusers_version": "0.20.0.dev0", - "_name_or_path": "../controlnet-1-0-canny/checkpoint-20000/controlnet", + "_diffusers_version": "0.20.0", + "_name_or_path": "diffusers/controlnet-canny-sdxl-1.0", "act_fn": "silu", "addition_embed_type": "text_time", "addition_embed_type_num_heads": 64, diff --git a/controlnet-canny-sdxl-1.0/diffusion_pytorch_model.fp16.safetensors b/cn-canny-edge-cache/diffusion_pytorch_model.safetensors similarity index 100% rename from controlnet-canny-sdxl-1.0/diffusion_pytorch_model.fp16.safetensors rename to cn-canny-edge-cache/diffusion_pytorch_model.safetensors diff --git a/controlnet-canny-sdxl-1.0/.gitattributes b/controlnet-canny-sdxl-1.0/.gitattributes deleted file mode 100644 index 9b9898b45af8ac54cf70db518a6211661af9b205..0000000000000000000000000000000000000000 --- a/controlnet-canny-sdxl-1.0/.gitattributes +++ /dev/null @@ -1,41 +0,0 @@ -*.7z filter=lfs diff=lfs merge=lfs -text -*.arrow filter=lfs diff=lfs merge=lfs -text -*.bin filter=lfs diff=lfs merge=lfs -text -*.bz2 filter=lfs diff=lfs merge=lfs -text -*.ckpt filter=lfs diff=lfs merge=lfs -text -*.ftz filter=lfs diff=lfs merge=lfs -text -*.gz filter=lfs diff=lfs merge=lfs -text -*.h5 filter=lfs diff=lfs merge=lfs -text -*.joblib filter=lfs diff=lfs merge=lfs -text -*.lfs.* filter=lfs diff=lfs merge=lfs -text -*.mlmodel filter=lfs diff=lfs merge=lfs -text -*.model filter=lfs diff=lfs merge=lfs -text -*.msgpack filter=lfs diff=lfs merge=lfs -text -*.npy filter=lfs diff=lfs merge=lfs -text -*.npz filter=lfs diff=lfs merge=lfs -text -*.onnx filter=lfs diff=lfs merge=lfs -text -*.ot filter=lfs diff=lfs merge=lfs -text -*.parquet filter=lfs diff=lfs merge=lfs -text -*.pb filter=lfs diff=lfs merge=lfs -text -*.pickle filter=lfs diff=lfs merge=lfs -text -*.pkl filter=lfs diff=lfs merge=lfs -text -*.pt filter=lfs diff=lfs merge=lfs -text -*.pth filter=lfs diff=lfs merge=lfs -text -*.rar filter=lfs diff=lfs merge=lfs -text -*.safetensors filter=lfs diff=lfs merge=lfs -text -saved_model/**/* filter=lfs diff=lfs merge=lfs -text -*.tar.* filter=lfs diff=lfs merge=lfs -text -*.tar filter=lfs diff=lfs merge=lfs -text -*.tflite filter=lfs diff=lfs merge=lfs -text -*.tgz filter=lfs diff=lfs merge=lfs -text -*.wasm filter=lfs diff=lfs merge=lfs -text -*.xz filter=lfs diff=lfs merge=lfs -text -*.zip filter=lfs diff=lfs merge=lfs -text -*.zst filter=lfs diff=lfs merge=lfs -text -*tfevents* filter=lfs diff=lfs merge=lfs -text -out_bird.png filter=lfs diff=lfs merge=lfs -text -out_couple.png filter=lfs diff=lfs merge=lfs -text -out_room.png filter=lfs diff=lfs merge=lfs -text -out_tornado.png filter=lfs diff=lfs merge=lfs -text -out_women.png filter=lfs diff=lfs merge=lfs -text -out_hug_lab_7.png filter=lfs diff=lfs merge=lfs -text diff --git a/controlnet-canny-sdxl-1.0/README.md b/controlnet-canny-sdxl-1.0/README.md deleted file mode 100644 index ec7222ec028ff0ac3d79d2010623b9cf42b30a8f..0000000000000000000000000000000000000000 --- a/controlnet-canny-sdxl-1.0/README.md +++ /dev/null @@ -1,107 +0,0 @@ ---- -license: openrail++ -base_model: runwayml/stable-diffusion-v1-5 -tags: -- stable-diffusion-xl -- stable-diffusion-xl-diffusers -- text-to-image -- diffusers -- controlnet -inference: false ---- - -# SDXL-controlnet: Canny - -These are controlnet weights trained on stabilityai/stable-diffusion-xl-base-1.0 with canny conditioning. You can find some example images in the following. - -prompt: a couple watching a romantic sunset, 4k photo -![images_0)](./out_couple.png) - -prompt: ultrarealistic shot of a furry blue bird -![images_1)](./out_bird.png) - -prompt: a woman, close up, detailed, beautiful, street photography, photorealistic, detailed, Kodak ektar 100, natural, candid shot -![images_2)](./out_women.png) - -prompt: Cinematic, neoclassical table in the living room, cinematic, contour, lighting, highly detailed, winter, golden hour -![images_3)](./out_room.png) - -prompt: a tornado hitting grass field, 1980's film grain. overcast, muted colors. -![images_0)](./out_tornado.png) - -## Usage - -Make sure to first install the libraries: - -```bash -pip install accelerate transformers safetensors opencv-python diffusers -``` - -And then we're ready to go: - -```python -from diffusers import ControlNetModel, StableDiffusionXLControlNetPipeline, AutoencoderKL -from diffusers.utils import load_image -from PIL import Image -import torch -import numpy as np -import cv2 - -prompt = "aerial view, a futuristic research complex in a bright foggy jungle, hard lighting" -negative_prompt = 'low quality, bad quality, sketches' - -image = load_image("https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/sd_controlnet/hf-logo.png") - -controlnet_conditioning_scale = 0.5 # recommended for good generalization - -controlnet = ControlNetModel.from_pretrained( - "diffusers/controlnet-canny-sdxl-1.0", - torch_dtype=torch.float16 -) -vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16) -pipe = StableDiffusionXLControlNetPipeline.from_pretrained( - "stabilityai/stable-diffusion-xl-base-1.0", - controlnet=controlnet, - vae=vae, - torch_dtype=torch.float16, -) -pipe.enable_model_cpu_offload() - -image = np.array(image) -image = cv2.Canny(image, 100, 200) -image = image[:, :, None] -image = np.concatenate([image, image, image], axis=2) -image = Image.fromarray(image) - -images = pipe( - prompt, negative_prompt=negative_prompt, image=image, controlnet_conditioning_scale=controlnet_conditioning_scale, - ).images - -images[0].save(f"hug_lab.png") -``` - -![images_10)](./out_hug_lab_7.png) - -To more details, check out the official documentation of [`StableDiffusionXLControlNetPipeline`](https://huggingface.co/docs/diffusers/main/en/api/pipelines/controlnet_sdxl). - -### Training - -Our training script was built on top of the official training script that we provide [here](https://github.com/huggingface/diffusers/blob/main/examples/controlnet/README_sdxl.md). - -#### Training data -This checkpoint was first trained for 20,000 steps on laion 6a resized to a max minimum dimension of 384. -It was then further trained for 20,000 steps on laion 6a resized to a max minimum dimension of 1024 and -then filtered to contain only minimum 1024 images. We found the further high resolution finetuning was -necessary for image quality. - -#### Compute -one 8xA100 machine - -#### Batch size -Data parallel with a single gpu batch size of 8 for a total batch size of 64. - -#### Hyper Parameters -Constant learning rate of 1e-4 scaled by batch size for total learning rate of 64e-4 - -#### Mixed precision -fp16 \ No newline at end of file diff --git a/controlnet-canny-sdxl-1.0/diffusion_pytorch_model.bin b/controlnet-canny-sdxl-1.0/diffusion_pytorch_model.bin deleted file mode 100644 index 541b0648d070763730adae8482713dbcb7da2fe2..0000000000000000000000000000000000000000 --- a/controlnet-canny-sdxl-1.0/diffusion_pytorch_model.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:982e12f72cb41031c060de08a5d78ff6912e9b02c6ad91fc480f05a72cad10cb -size 5004438321 diff --git a/controlnet-canny-sdxl-1.0/diffusion_pytorch_model.fp16.bin b/controlnet-canny-sdxl-1.0/diffusion_pytorch_model.fp16.bin deleted file mode 100644 index 8518d03625ac40ef0e1235c5434973d2ed6d7f69..0000000000000000000000000000000000000000 --- a/controlnet-canny-sdxl-1.0/diffusion_pytorch_model.fp16.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a42da57d6e2fd6ec786ccfea1cf1a06d2c1d91b2d8a14c7de3a67553b10b2948 -size 2502401039 diff --git a/controlnet-canny-sdxl-1.0/diffusion_pytorch_model.safetensors b/controlnet-canny-sdxl-1.0/diffusion_pytorch_model.safetensors deleted file mode 100644 index e8ac2fb5f7d12d92b15dae07cbc5122e1f3902b5..0000000000000000000000000000000000000000 --- a/controlnet-canny-sdxl-1.0/diffusion_pytorch_model.safetensors +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ea99040544a999f814fd854575a3aee069a005d026864c8d321b82576706a221 -size 5004167864 diff --git a/controlnet-canny-sdxl-1.0/out_bird.png b/controlnet-canny-sdxl-1.0/out_bird.png deleted file mode 100644 index 947f423ed6da57d3ecf18ce2b96524e879de532e..0000000000000000000000000000000000000000 --- a/controlnet-canny-sdxl-1.0/out_bird.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:596aecc5291798f1f25b665a92110627f7661d13d4eef3ae038b175de9db93c2 -size 6935069 diff --git a/controlnet-canny-sdxl-1.0/out_couple.png b/controlnet-canny-sdxl-1.0/out_couple.png deleted file mode 100644 index 01979e8b8ab9d01e1d77992c124e39034acf2be9..0000000000000000000000000000000000000000 --- a/controlnet-canny-sdxl-1.0/out_couple.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3613a6c3119ccc39d687ed917c8b364f05c17e16c1d9cf0c36816ef07da80868 -size 7286999 diff --git a/controlnet-canny-sdxl-1.0/out_hug_lab_7.png b/controlnet-canny-sdxl-1.0/out_hug_lab_7.png deleted file mode 100644 index a8643c07c888c8ffd3397cfc2344e1a55d1963cb..0000000000000000000000000000000000000000 --- a/controlnet-canny-sdxl-1.0/out_hug_lab_7.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:33d7a1f77d34f565df9910bf8a3276817cb21fa7f4025174f93f1f3517b2a4f1 -size 1967716 diff --git a/controlnet-canny-sdxl-1.0/out_room.png b/controlnet-canny-sdxl-1.0/out_room.png deleted file mode 100644 index 4014b8d67d0423aa8a076843c356815ea730fbf5..0000000000000000000000000000000000000000 --- a/controlnet-canny-sdxl-1.0/out_room.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fce39ad0ca4c081aecd90a2c16118bc38d89ac27c7ca25d59a80d470b1c4ed31 -size 6420362 diff --git a/controlnet-canny-sdxl-1.0/out_tornado.png b/controlnet-canny-sdxl-1.0/out_tornado.png deleted file mode 100644 index 8fca3e2085b95ffd13551ac7530d7669002b64a2..0000000000000000000000000000000000000000 --- a/controlnet-canny-sdxl-1.0/out_tornado.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b2ecd942a61e5ee4f8b5d1c8d108232a0e3a012036eaa4b8865ebfd0b7e15346 -size 8511428 diff --git a/controlnet-canny-sdxl-1.0/out_women.png b/controlnet-canny-sdxl-1.0/out_women.png deleted file mode 100644 index 7823f480bfe51c8fb86fb7a9e3742a11995b3142..0000000000000000000000000000000000000000 --- a/controlnet-canny-sdxl-1.0/out_women.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ada3827272bdd1599372d5d8842a173e054bc1164097c4e347c4bcd7cfcd3c7c -size 7586978 diff --git a/handler.py b/handler.py index 6cf845735373b2171ac72ef2860bb74d9f5b92a7..1ecc93baeac586e35e616bf1d82aea570d781493 100644 --- a/handler.py +++ b/handler.py @@ -10,7 +10,6 @@ import numpy as np import cv2 import controlnet_hinter -# set device device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') if device.type != 'cuda': raise ValueError("need to run on GPU") @@ -18,10 +17,14 @@ if device.type != 'cuda': dtype = torch.bfloat16 if torch.cuda.get_device_capability()[ 0] == 8 else torch.float16 + +SDXL_CACHE = "./sdxl-cache" +CN_CACHE = "./cn-canny-edge-cache" + # for the moment, support only canny edge SDXLCONTROLNET_MAPPING = { "canny_edge": { - "model_id": "diffusers/controlnet-canny-sdxl-1.0", + "model_id": CN_CACHE, "hinter": controlnet_hinter.hint_canny }, "pose": { @@ -99,7 +102,7 @@ class EndpointHandler(): SDXLCONTROLNET_MAPPING[self.control_type]["model_id"], torch_dtype=dtype).to(device) # Load StableDiffusionControlNetPipeline - self.sdxl_id = "stabilityai/stable-diffusion-xl-base-1.0" + self.sdxl_id = SDXL_CACHE # self.stable_diffusion_id = "runwayml/stable-diffusion-v1-5" self.pipe = StableDiffusionXLControlNetPipeline.from_pretrained(self.sdxl_id, controlnet=self.controlnet, diff --git a/scripts/download-weights.py b/scripts/download-weights.py new file mode 100644 index 0000000000000000000000000000000000000000..2ba4824bf91e7fb34c38e7b1f4ad757e72d1e142 --- /dev/null +++ b/scripts/download-weights.py @@ -0,0 +1,48 @@ +# Run this before you deploy it on replicate, because if you don't +# whenever you run the model, it will download the weights from the +# internet, which will take a long time. + +import torch +from diffusers import AutoencoderKL, DiffusionPipeline, ControlNetModel +from diffusers.pipelines.stable_diffusion.safety_checker import ( + StableDiffusionSafetyChecker, +) + +# better_vae = AutoencoderKL.from_pretrained( +# "madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16 +# ) + +# pipe = DiffusionPipeline.from_pretrained( +# "stabilityai/stable-diffusion-xl-base-1.0", +# vae=better_vae, +# torch_dtype=torch.float16, +# use_safetensors=True, +# variant="fp16", +# ) + +# pipe.save_pretrained("./sdxl-cache", safe_serialization=True) + +controlnet = ControlNetModel.from_pretrained( + "diffusers/controlnet-canny-sdxl-1.0", + torch_dtype=torch.float16, use_safetensors=True +) + +controlnet.save_pretrained("./cn-canny-edge-cache", safe_serialization=True) + +# pipe = DiffusionPipeline.from_pretrained( +# "stabilityai/stable-diffusion-xl-refiner-1.0", +# torch_dtype=torch.float16, +# use_safetensors=True, +# variant="fp16", +# ) + +# # TODO - we don't need to save all of this and in fact should save just the unet, tokenizer, and config. +# pipe.save_pretrained("./refiner-cache", safe_serialization=True) + + +# safety = StableDiffusionSafetyChecker.from_pretrained( +# "CompVis/stable-diffusion-safety-checker", +# torch_dtype=torch.float16, +# ) + +# safety.save_pretrained("./safety-cache") diff --git a/stable-diffusion-xl-base-1.0/model_index.json b/sdxl-cache/model_index.json similarity index 84% rename from stable-diffusion-xl-base-1.0/model_index.json rename to sdxl-cache/model_index.json index 6cc5138ddb67e9309c9b4e058e33e52087f1d215..8bbab337547c55cd4880fc6353a227152003ce5b 100644 --- a/stable-diffusion-xl-base-1.0/model_index.json +++ b/sdxl-cache/model_index.json @@ -1,8 +1,8 @@ { "_class_name": "StableDiffusionXLPipeline", - "_diffusers_version": "0.19.0.dev0", + "_diffusers_version": "0.20.0", + "_name_or_path": "stabilityai/stable-diffusion-xl-base-1.0", "force_zeros_for_empty_prompt": true, - "add_watermarker": null, "scheduler": [ "diffusers", "EulerDiscreteScheduler" diff --git a/stable-diffusion-xl-base-1.0/scheduler/scheduler_config.json b/sdxl-cache/scheduler/scheduler_config.json similarity index 91% rename from stable-diffusion-xl-base-1.0/scheduler/scheduler_config.json rename to sdxl-cache/scheduler/scheduler_config.json index e5bc8421e047838523be7acfb6720f167f7382f6..86425ba7f0c40ba95cc187f900dc7c60546741ce 100644 --- a/stable-diffusion-xl-base-1.0/scheduler/scheduler_config.json +++ b/sdxl-cache/scheduler/scheduler_config.json @@ -1,6 +1,6 @@ { "_class_name": "EulerDiscreteScheduler", - "_diffusers_version": "0.19.0.dev0", + "_diffusers_version": "0.20.0", "beta_end": 0.012, "beta_schedule": "scaled_linear", "beta_start": 0.00085, diff --git a/stable-diffusion-xl-base-1.0/text_encoder/config.json b/sdxl-cache/text_encoder/config.json similarity index 70% rename from stable-diffusion-xl-base-1.0/text_encoder/config.json rename to sdxl-cache/text_encoder/config.json index cde352ada4bb95fdad2fc503b8121257cef215a6..e295d776f913cb673987f2c698c9ddeffc131ae0 100644 --- a/stable-diffusion-xl-base-1.0/text_encoder/config.json +++ b/sdxl-cache/text_encoder/config.json @@ -1,4 +1,5 @@ { + "_name_or_path": "/Users/sebastiansemeniuc/.cache/huggingface/hub/models--stabilityai--stable-diffusion-xl-base-1.0/snapshots/bf714989e22c57ddc1c453bf74dab4521acb81d8/text_encoder", "architectures": [ "CLIPTextModel" ], @@ -19,6 +20,6 @@ "pad_token_id": 1, "projection_dim": 768, "torch_dtype": "float16", - "transformers_version": "4.32.0.dev0", + "transformers_version": "4.32.0", "vocab_size": 49408 } diff --git a/stable-diffusion-xl-base-1.0/text_encoder/model.fp16.safetensors b/sdxl-cache/text_encoder/model.safetensors similarity index 100% rename from stable-diffusion-xl-base-1.0/text_encoder/model.fp16.safetensors rename to sdxl-cache/text_encoder/model.safetensors diff --git a/stable-diffusion-xl-base-1.0/text_encoder_2/config.json b/sdxl-cache/text_encoder_2/config.json similarity index 70% rename from stable-diffusion-xl-base-1.0/text_encoder_2/config.json rename to sdxl-cache/text_encoder_2/config.json index da1848b5ed17b676f021578838f12c4023b86379..0ec058abf0ed827918d8d13e0b0133c75f159098 100644 --- a/stable-diffusion-xl-base-1.0/text_encoder_2/config.json +++ b/sdxl-cache/text_encoder_2/config.json @@ -1,4 +1,5 @@ { + "_name_or_path": "/Users/sebastiansemeniuc/.cache/huggingface/hub/models--stabilityai--stable-diffusion-xl-base-1.0/snapshots/bf714989e22c57ddc1c453bf74dab4521acb81d8/text_encoder_2", "architectures": [ "CLIPTextModelWithProjection" ], @@ -19,6 +20,6 @@ "pad_token_id": 1, "projection_dim": 1280, "torch_dtype": "float16", - "transformers_version": "4.32.0.dev0", + "transformers_version": "4.32.0", "vocab_size": 49408 } diff --git a/stable-diffusion-xl-base-1.0/text_encoder_2/model.fp16.safetensors b/sdxl-cache/text_encoder_2/model.safetensors similarity index 100% rename from stable-diffusion-xl-base-1.0/text_encoder_2/model.fp16.safetensors rename to sdxl-cache/text_encoder_2/model.safetensors diff --git a/stable-diffusion-xl-base-1.0/tokenizer/merges.txt b/sdxl-cache/tokenizer/merges.txt similarity index 100% rename from stable-diffusion-xl-base-1.0/tokenizer/merges.txt rename to sdxl-cache/tokenizer/merges.txt diff --git a/stable-diffusion-xl-base-1.0/tokenizer/special_tokens_map.json b/sdxl-cache/tokenizer/special_tokens_map.json similarity index 100% rename from stable-diffusion-xl-base-1.0/tokenizer/special_tokens_map.json rename to sdxl-cache/tokenizer/special_tokens_map.json diff --git a/stable-diffusion-xl-base-1.0/tokenizer/tokenizer_config.json b/sdxl-cache/tokenizer/tokenizer_config.json similarity index 100% rename from stable-diffusion-xl-base-1.0/tokenizer/tokenizer_config.json rename to sdxl-cache/tokenizer/tokenizer_config.json diff --git a/stable-diffusion-xl-base-1.0/tokenizer/vocab.json b/sdxl-cache/tokenizer/vocab.json similarity index 100% rename from stable-diffusion-xl-base-1.0/tokenizer/vocab.json rename to sdxl-cache/tokenizer/vocab.json diff --git a/stable-diffusion-xl-base-1.0/tokenizer_2/merges.txt b/sdxl-cache/tokenizer_2/merges.txt similarity index 100% rename from stable-diffusion-xl-base-1.0/tokenizer_2/merges.txt rename to sdxl-cache/tokenizer_2/merges.txt diff --git a/stable-diffusion-xl-base-1.0/tokenizer_2/special_tokens_map.json b/sdxl-cache/tokenizer_2/special_tokens_map.json similarity index 100% rename from stable-diffusion-xl-base-1.0/tokenizer_2/special_tokens_map.json rename to sdxl-cache/tokenizer_2/special_tokens_map.json diff --git a/stable-diffusion-xl-base-1.0/tokenizer_2/tokenizer_config.json b/sdxl-cache/tokenizer_2/tokenizer_config.json similarity index 100% rename from stable-diffusion-xl-base-1.0/tokenizer_2/tokenizer_config.json rename to sdxl-cache/tokenizer_2/tokenizer_config.json diff --git a/stable-diffusion-xl-base-1.0/tokenizer_2/vocab.json b/sdxl-cache/tokenizer_2/vocab.json similarity index 100% rename from stable-diffusion-xl-base-1.0/tokenizer_2/vocab.json rename to sdxl-cache/tokenizer_2/vocab.json diff --git a/stable-diffusion-xl-base-1.0/unet/config.json b/sdxl-cache/unet/config.json similarity index 87% rename from stable-diffusion-xl-base-1.0/unet/config.json rename to sdxl-cache/unet/config.json index c8714c90f0e2409156da42781954416cb7df36af..e2cdb2eb6ec08d7be192a0696251fe3d7a950147 100644 --- a/stable-diffusion-xl-base-1.0/unet/config.json +++ b/sdxl-cache/unet/config.json @@ -1,6 +1,7 @@ { "_class_name": "UNet2DConditionModel", - "_diffusers_version": "0.19.0.dev0", + "_diffusers_version": "0.20.0", + "_name_or_path": "/Users/sebastiansemeniuc/.cache/huggingface/hub/models--stabilityai--stable-diffusion-xl-base-1.0/snapshots/bf714989e22c57ddc1c453bf74dab4521acb81d8/unet", "act_fn": "silu", "addition_embed_type": "text_time", "addition_embed_type_num_heads": 64, @@ -10,6 +11,7 @@ 10, 20 ], + "attention_type": "default", "block_out_channels": [ 320, 640, diff --git a/stable-diffusion-xl-base-1.0/unet/diffusion_pytorch_model.fp16.safetensors b/sdxl-cache/unet/diffusion_pytorch_model.safetensors similarity index 100% rename from stable-diffusion-xl-base-1.0/unet/diffusion_pytorch_model.fp16.safetensors rename to sdxl-cache/unet/diffusion_pytorch_model.safetensors diff --git a/stable-diffusion-xl-base-1.0/vae_decoder/config.json b/sdxl-cache/vae/config.json similarity index 79% rename from stable-diffusion-xl-base-1.0/vae_decoder/config.json rename to sdxl-cache/vae/config.json index 29a4d9ff621cd8e3b50d80eb10e08450187d29b8..99eeaff07c22dc238d8abd7c44a443158508473e 100644 --- a/stable-diffusion-xl-base-1.0/vae_decoder/config.json +++ b/sdxl-cache/vae/config.json @@ -1,6 +1,7 @@ { "_class_name": "AutoencoderKL", - "_diffusers_version": "0.19.0.dev0", + "_diffusers_version": "0.20.0", + "_name_or_path": "madebyollin/sdxl-vae-fp16-fix", "act_fn": "silu", "block_out_channels": [ 128, @@ -14,13 +15,13 @@ "DownEncoderBlock2D", "DownEncoderBlock2D" ], - "force_upcast": true, + "force_upcast": false, "in_channels": 3, "latent_channels": 4, "layers_per_block": 2, "norm_num_groups": 32, "out_channels": 3, - "sample_size": 1024, + "sample_size": 512, "scaling_factor": 0.13025, "up_block_types": [ "UpDecoderBlock2D", diff --git a/sdxl-cache/vae/diffusion_pytorch_model.safetensors b/sdxl-cache/vae/diffusion_pytorch_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..c4663db966f401ce4f88d6b895023bf966ed6f92 --- /dev/null +++ b/sdxl-cache/vae/diffusion_pytorch_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6353737672c94b96174cb590f711eac6edf2fcce5b6e91aa9d73c5adc589ee48 +size 167335342 diff --git a/stable-diffusion-xl-base-1.0/01.png b/stable-diffusion-xl-base-1.0/01.png deleted file mode 100644 index 70107193a9835c8faa92e4d4ad0648a2656ebd95..0000000000000000000000000000000000000000 --- a/stable-diffusion-xl-base-1.0/01.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f40474e9ef8787d8209c275ade4254fc544dce290922b2e07650911ea255530c -size 4608613 diff --git a/stable-diffusion-xl-base-1.0/LICENSE.md b/stable-diffusion-xl-base-1.0/LICENSE.md deleted file mode 100644 index af7e355e31c0d976933aa0d06759611151ad8c39..0000000000000000000000000000000000000000 --- a/stable-diffusion-xl-base-1.0/LICENSE.md +++ /dev/null @@ -1,60 +0,0 @@ -Copyright (c) 2023 Stability AI -CreativeML Open RAIL++-M License dated July 26, 2023 - -Section I: PREAMBLE -Multimodal generative models are being widely adopted and used, and have the potential to transform the way artists, among other individuals, conceive and benefit from AI or ML technologies as a tool for content creation. -Notwithstanding the current and potential benefits that these artifacts can bring to society at large, there are also concerns about potential misuses of them, either due to their technical limitations or ethical considerations. -In short, this license strives for both the open and responsible downstream use of the accompanying model. When it comes to the open character, we took inspiration from open source permissive licenses regarding the grant of IP rights. Referring to the downstream responsible use, we added use-based restrictions not permitting the use of the model in very specific scenarios, in order for the licensor to be able to enforce the license in case potential misuses of the Model may occur. At the same time, we strive to promote open and responsible research on generative models for art and content generation. -Even though downstream derivative versions of the model could be released under different licensing terms, the latter will always have to include - at minimum - the same use-based restrictions as the ones in the original license (this license). We believe in the intersection between open and responsible AI development; thus, this agreement aims to strike a balance between both in order to enable responsible open-science in the field of AI. -This CreativeML Open RAIL++-M License governs the use of the model (and its derivatives) and is informed by the model card associated with the model. -NOW THEREFORE, You and Licensor agree as follows: -Definitions -"License" means the terms and conditions for use, reproduction, and Distribution as defined in this document. -"Data" means a collection of information and/or content extracted from the dataset used with the Model, including to train, pretrain, or otherwise evaluate the Model. The Data is not licensed under this License. -"Output" means the results of operating a Model as embodied in informational content resulting therefrom. -"Model" means any accompanying machine-learning based assemblies (including checkpoints), consisting of learnt weights, parameters (including optimizer states), corresponding to the model architecture as embodied in the Complementary Material, that have been trained or tuned, in whole or in part on the Data, using the Complementary Material. -"Derivatives of the Model" means all modifications to the Model, works based on the Model, or any other model which is created or initialized by transfer of patterns of the weights, parameters, activations or output of the Model, to the other model, in order to cause the other model to perform similarly to the Model, including - but not limited to - distillation methods entailing the use of intermediate data representations or methods based on the generation of synthetic data by the Model for training the other model. -"Complementary Material" means the accompanying source code and scripts used to define, run, load, benchmark or evaluate the Model, and used to prepare data for training or evaluation, if any. This includes any accompanying documentation, tutorials, examples, etc, if any. -"Distribution" means any transmission, reproduction, publication or other sharing of the Model or Derivatives of the Model to a third party, including providing the Model as a hosted service made available by electronic or other remote means - e.g. API-based or web access. -"Licensor" means the copyright owner or entity authorized by the copyright owner that is granting the License, including the persons or entities that may have rights in the Model and/or distributing the Model. -"You" (or "Your") means an individual or Legal Entity exercising permissions granted by this License and/or making use of the Model for whichever purpose and in any field of use, including usage of the Model in an end-use application - e.g. chatbot, translator, image generator. -"Third Parties" means individuals or legal entities that are not under common control with Licensor or You. -"Contribution" means any work of authorship, including the original version of the Model and any modifications or additions to that Model or Derivatives of the Model thereof, that is intentionally submitted to Licensor for inclusion in the Model by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Model, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." -"Contributor" means Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Model. - -Section II: INTELLECTUAL PROPERTY RIGHTS -Both copyright and patent grants apply to the Model, Derivatives of the Model and Complementary Material. The Model and Derivatives of the Model are subject to additional terms as described in - -Section III. -Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare, publicly display, publicly perform, sublicense, and distribute the Complementary Material, the Model, and Derivatives of the Model. -Grant of Patent License. Subject to the terms and conditions of this License and where and as applicable, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this paragraph) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Model and the Complementary Material, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Model to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Model and/or Complementary Material or a Contribution incorporated within the Model and/or Complementary Material constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for the Model and/or Work shall terminate as of the date such litigation is asserted or filed. -Section III: CONDITIONS OF USAGE, DISTRIBUTION AND REDISTRIBUTION -Distribution and Redistribution. You may host for Third Party remote access purposes (e.g. software-as-a-service), reproduce and distribute copies of the Model or Derivatives of the Model thereof in any medium, with or without modifications, provided that You meet the following conditions: Use-based restrictions as referenced in paragraph 5 MUST be included as an enforceable provision by You in any type of legal agreement (e.g. a license) governing the use and/or distribution of the Model or Derivatives of the Model, and You shall give notice to subsequent users You Distribute to, that the Model or Derivatives of the Model are subject to paragraph 5. This provision does not apply to the use of Complementary Material. You must give any Third Party recipients of the Model or Derivatives of the Model a copy of this License; You must cause any modified files to carry prominent notices stating that You changed the files; You must retain all copyright, patent, trademark, and attribution notices excluding those notices that do not pertain to any part of the Model, Derivatives of the Model. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions - respecting paragraph 4.a. - for use, reproduction, or Distribution of Your modifications, or for any such Derivatives of the Model as a whole, provided Your use, reproduction, and Distribution of the Model otherwise complies with the conditions stated in this License. -Use-based restrictions. The restrictions set forth in Attachment A are considered Use-based restrictions. Therefore You cannot use the Model and the Derivatives of the Model for the specified restricted uses. You may use the Model subject to this License, including only for lawful purposes and in accordance with the License. Use may include creating any content with, finetuning, updating, running, training, evaluating and/or reparametrizing the Model. You shall require all of Your users who use the Model or a Derivative of the Model to comply with the terms of this paragraph (paragraph 5). -The Output You Generate. Except as set forth herein, Licensor claims no rights in the Output You generate using the Model. You are accountable for the Output you generate and its subsequent uses. No use of the output can contravene any provision as stated in the License. - -Section IV: OTHER PROVISIONS -Updates and Runtime Restrictions. To the maximum extent permitted by law, Licensor reserves the right to restrict (remotely or otherwise) usage of the Model in violation of this License. -Trademarks and related. Nothing in this License permits You to make use of Licensors’ trademarks, trade names, logos or to otherwise suggest endorsement or misrepresent the relationship between the parties; and any rights not expressly granted herein are reserved by the Licensors. -Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Model and the Complementary Material (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Model, Derivatives of the Model, and the Complementary Material and assume any risks associated with Your exercise of permissions under this License. -Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Model and the Complementary Material (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. -Accepting Warranty or Additional Liability. While redistributing the Model, Derivatives of the Model and the Complementary Material thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. -If any provision of this License is held to be invalid, illegal or unenforceable, the remaining provisions shall be unaffected thereby and remain valid as if such provision had not been set forth herein. - -END OF TERMS AND CONDITIONS - -Attachment A -Use Restrictions -You agree not to use the Model or Derivatives of the Model: -In any way that violates any applicable national, federal, state, local or international law or regulation; -For the purpose of exploiting, harming or attempting to exploit or harm minors in any way; -To generate or disseminate verifiably false information and/or content with the purpose of harming others; -To generate or disseminate personal identifiable information that can be used to harm an individual; -To defame, disparage or otherwise harass others; -For fully automated decision making that adversely impacts an individual’s legal rights or otherwise creates or modifies a binding, enforceable obligation; -For any use intended to or which has the effect of discriminating against or harming individuals or groups based on online or offline social behavior or known or predicted personal or personality characteristics; -To exploit any of the vulnerabilities of a specific group of persons based on their age, social, physical or mental characteristics, in order to materially distort the behavior of a person pertaining to that group in a manner that causes or is likely to cause that person or another person physical or psychological harm; -For any use intended to or which has the effect of discriminating against individuals or groups based on legally protected characteristics or categories; -To provide medical advice and medical results interpretation; -To generate or disseminate information for the purpose to be used for administration of justice, law enforcement, immigration or asylum processes, such as predicting an individual will commit fraud/crime commitment (e.g. by text profiling, drawing causal relationships between assertions made in documents, indiscriminate and arbitrarily-targeted use). - diff --git a/stable-diffusion-xl-base-1.0/README.md b/stable-diffusion-xl-base-1.0/README.md deleted file mode 100644 index 12973df03b881f09f92e46895d6b3ed7f9a5082c..0000000000000000000000000000000000000000 --- a/stable-diffusion-xl-base-1.0/README.md +++ /dev/null @@ -1,215 +0,0 @@ ---- -license: openrail++ -tags: -- text-to-image -- stable-diffusion ---- -# SD-XL 1.0-base Model Card -![row01](01.png) - -## Model - -![pipeline](pipeline.png) - -[SDXL](https://arxiv.org/abs/2307.01952) consists of an [ensemble of experts](https://arxiv.org/abs/2211.01324) pipeline for latent diffusion: -In a first step, the base model is used to generate (noisy) latents, -which are then further processed with a refinement model (available here: https://huggingface.co/stabilityai/stable-diffusion-xl-refiner-1.0/) specialized for the final denoising steps. -Note that the base model can be used as a standalone module. - -Alternatively, we can use a two-stage pipeline as follows: -First, the base model is used to generate latents of the desired output size. -In the second step, we use a specialized high-resolution model and apply a technique called SDEdit (https://arxiv.org/abs/2108.01073, also known as "img2img") -to the latents generated in the first step, using the same prompt. This technique is slightly slower than the first one, as it requires more function evaluations. - -Source code is available at https://github.com/Stability-AI/generative-models . - -### Model Description - -- **Developed by:** Stability AI -- **Model type:** Diffusion-based text-to-image generative model -- **License:** [CreativeML Open RAIL++-M License](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/blob/main/LICENSE.md) -- **Model Description:** This is a model that can be used to generate and modify images based on text prompts. It is a [Latent Diffusion Model](https://arxiv.org/abs/2112.10752) that uses two fixed, pretrained text encoders ([OpenCLIP-ViT/G](https://github.com/mlfoundations/open_clip) and [CLIP-ViT/L](https://github.com/openai/CLIP/tree/main)). -- **Resources for more information:** Check out our [GitHub Repository](https://github.com/Stability-AI/generative-models) and the [SDXL report on arXiv](https://arxiv.org/abs/2307.01952). - -### Model Sources - -For research purposes, we recommned our `generative-models` Github repository (https://github.com/Stability-AI/generative-models), which implements the most popoular diffusion frameworks (both training and inference) and for which new functionalities like distillation will be added over time. -[Clipdrop](https://clipdrop.co/stable-diffusion) provides free SDXL inference. - -- **Repository:** https://github.com/Stability-AI/generative-models -- **Demo:** https://clipdrop.co/stable-diffusion - - -## Evaluation -![comparison](comparison.png) -The chart above evaluates user preference for SDXL (with and without refinement) over SDXL 0.9 and Stable Diffusion 1.5 and 2.1. -The SDXL base model performs significantly better than the previous variants, and the model combined with the refinement module achieves the best overall performance. - - -### 🧨 Diffusers - -Make sure to upgrade diffusers to >= 0.19.0: -``` -pip install diffusers --upgrade -``` - -In addition make sure to install `transformers`, `safetensors`, `accelerate` as well as the invisible watermark: -``` -pip install invisible_watermark transformers accelerate safetensors -``` - -To just use the base model, you can run: - -```py -from diffusers import DiffusionPipeline -import torch - -pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16, use_safetensors=True, variant="fp16") -pipe.to("cuda") - -# if using torch < 2.0 -# pipe.enable_xformers_memory_efficient_attention() - -prompt = "An astronaut riding a green horse" - -images = pipe(prompt=prompt).images[0] -``` - -To use the whole base + refiner pipeline as an ensemble of experts you can run: - -```py -from diffusers import DiffusionPipeline -import torch - -# load both base & refiner -base = DiffusionPipeline.from_pretrained( - "stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16, variant="fp16", use_safetensors=True -) -base.to("cuda") -refiner = DiffusionPipeline.from_pretrained( - "stabilityai/stable-diffusion-xl-refiner-1.0", - text_encoder_2=base.text_encoder_2, - vae=base.vae, - torch_dtype=torch.float16, - use_safetensors=True, - variant="fp16", -) -refiner.to("cuda") - -# Define how many steps and what % of steps to be run on each experts (80/20) here -n_steps = 40 -high_noise_frac = 0.8 - -prompt = "A majestic lion jumping from a big stone at night" - -# run both experts -image = base( - prompt=prompt, - num_inference_steps=n_steps, - denoising_end=high_noise_frac, - output_type="latent", -).images -image = refiner( - prompt=prompt, - num_inference_steps=n_steps, - denoising_start=high_noise_frac, - image=image, -).images[0] -``` - -When using `torch >= 2.0`, you can improve the inference speed by 20-30% with torch.compile. Simple wrap the unet with torch compile before running the pipeline: -```py -pipe.unet = torch.compile(pipe.unet, mode="reduce-overhead", fullgraph=True) -``` - -If you are limited by GPU VRAM, you can enable *cpu offloading* by calling `pipe.enable_model_cpu_offload` -instead of `.to("cuda")`: - -```diff -- pipe.to("cuda") -+ pipe.enable_model_cpu_offload() -``` - -For more information on how to use Stable Diffusion XL with `diffusers`, please have a look at [the Stable Diffusion XL Docs](https://huggingface.co/docs/diffusers/api/pipelines/stable_diffusion/stable_diffusion_xl). - -### Optimum -[Optimum](https://github.com/huggingface/optimum) provides a Stable Diffusion pipeline compatible with both [OpenVINO](https://docs.openvino.ai/latest/index.html) and [ONNX Runtime](https://onnxruntime.ai/). - -#### OpenVINO - -To install Optimum with the dependencies required for OpenVINO : - -```bash -pip install optimum[openvino] -``` - -To load an OpenVINO model and run inference with OpenVINO Runtime, you need to replace `StableDiffusionXLPipeline` with Optimum `OVStableDiffusionXLPipeline`. In case you want to load a PyTorch model and convert it to the OpenVINO format on-the-fly, you can set `export=True`. - -```diff -- from diffusers import StableDiffusionPipeline -+ from optimum.intel import OVStableDiffusionPipeline - -model_id = "stabilityai/stable-diffusion-xl-base-1.0" -- pipeline = StableDiffusionPipeline.from_pretrained(model_id) -+ pipeline = OVStableDiffusionPipeline.from_pretrained(model_id) -prompt = "A majestic lion jumping from a big stone at night" -image = pipeline(prompt).images[0] -``` - -You can find more examples (such as static reshaping and model compilation) in optimum [documentation](https://huggingface.co/docs/optimum/main/en/intel/inference#stable-diffusion-xl). - - -#### ONNX - -To install Optimum with the dependencies required for ONNX Runtime inference : - -```bash -pip install optimum[onnxruntime] -``` - -To load an ONNX model and run inference with ONNX Runtime, you need to replace `StableDiffusionXLPipeline` with Optimum `ORTStableDiffusionXLPipeline`. In case you want to load a PyTorch model and convert it to the ONNX format on-the-fly, you can set `export=True`. - -```diff -- from diffusers import StableDiffusionPipeline -+ from optimum.onnxruntime import ORTStableDiffusionPipeline - -model_id = "stabilityai/stable-diffusion-xl-base-1.0" -- pipeline = StableDiffusionPipeline.from_pretrained(model_id) -+ pipeline = ORTStableDiffusionPipeline.from_pretrained(model_id) -prompt = "A majestic lion jumping from a big stone at night" -image = pipeline(prompt).images[0] -``` - -You can find more examples in optimum [documentation](https://huggingface.co/docs/optimum/main/en/onnxruntime/usage_guides/models#stable-diffusion-xl). - - -## Uses - -### Direct Use - -The model is intended for research purposes only. Possible research areas and tasks include - -- Generation of artworks and use in design and other artistic processes. -- Applications in educational or creative tools. -- Research on generative models. -- Safe deployment of models which have the potential to generate harmful content. -- Probing and understanding the limitations and biases of generative models. - -Excluded uses are described below. - -### Out-of-Scope Use - -The model was not trained to be factual or true representations of people or events, and therefore using the model to generate such content is out-of-scope for the abilities of this model. - -## Limitations and Bias - -### Limitations - -- The model does not achieve perfect photorealism -- The model cannot render legible text -- The model struggles with more difficult tasks which involve compositionality, such as rendering an image corresponding to “A red cube on top of a blue sphere” -- Faces and people in general may not be generated properly. -- The autoencoding part of the model is lossy. - -### Bias -While the capabilities of image generation models are impressive, they can also reinforce or exacerbate social biases. diff --git a/stable-diffusion-xl-base-1.0/comparison.png b/stable-diffusion-xl-base-1.0/comparison.png deleted file mode 100644 index b66e414aae477b4cab71afecdb09c72ce4d40641..0000000000000000000000000000000000000000 Binary files a/stable-diffusion-xl-base-1.0/comparison.png and /dev/null differ diff --git a/stable-diffusion-xl-base-1.0/pipeline.png b/stable-diffusion-xl-base-1.0/pipeline.png deleted file mode 100644 index 6b1b855d1990dae016602a5855581b4c23cee376..0000000000000000000000000000000000000000 Binary files a/stable-diffusion-xl-base-1.0/pipeline.png and /dev/null differ diff --git a/stable-diffusion-xl-base-1.0/sd_xl_base_1.0.safetensors b/stable-diffusion-xl-base-1.0/sd_xl_base_1.0.safetensors deleted file mode 100644 index a4e26e69370f72c43e5b5f53879919c86bcd6822..0000000000000000000000000000000000000000 --- a/stable-diffusion-xl-base-1.0/sd_xl_base_1.0.safetensors +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:31e35c80fc4829d14f90153f4c74cd59c90b779f6afe05a74cd6120b893f7e5b -size 6938078334 diff --git a/stable-diffusion-xl-base-1.0/sd_xl_base_1.0_0.9vae.safetensors b/stable-diffusion-xl-base-1.0/sd_xl_base_1.0_0.9vae.safetensors deleted file mode 100644 index 7e334115979c000e45c814d460cf7f54b9229897..0000000000000000000000000000000000000000 --- a/stable-diffusion-xl-base-1.0/sd_xl_base_1.0_0.9vae.safetensors +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e6bb9ea85bbf7bf6478a7c6d18b71246f22e95d41bcdd80ed40aa212c33cfeff -size 6938078334 diff --git a/stable-diffusion-xl-base-1.0/sd_xl_offset_example-lora_1.0.safetensors b/stable-diffusion-xl-base-1.0/sd_xl_offset_example-lora_1.0.safetensors deleted file mode 100644 index eae3ad1bb0e28c0b70c7d73900cbdd28913d5f89..0000000000000000000000000000000000000000 --- a/stable-diffusion-xl-base-1.0/sd_xl_offset_example-lora_1.0.safetensors +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4852686128f953d0277d0793e2f0335352f96a919c9c16a09787d77f55cbdf6f -size 49553604 diff --git a/stable-diffusion-xl-base-1.0/text_encoder/model.onnx b/stable-diffusion-xl-base-1.0/text_encoder/model.onnx deleted file mode 100644 index 16986ff245108421dc71885b608d516727aff17a..0000000000000000000000000000000000000000 --- a/stable-diffusion-xl-base-1.0/text_encoder/model.onnx +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e27bafa0b3029ad637ef3ace24ce1efe85b8d0dbd22e03a2e70bda6fc88963a1 -size 492587457 diff --git a/stable-diffusion-xl-base-1.0/text_encoder/model.safetensors b/stable-diffusion-xl-base-1.0/text_encoder/model.safetensors deleted file mode 100644 index 3c727e05ebc4141a78f660895b830eae3d504798..0000000000000000000000000000000000000000 --- a/stable-diffusion-xl-base-1.0/text_encoder/model.safetensors +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5c3d6454dd2d23414b56aa1b5858a72487a656937847b6fea8d0606d7a42cdbc -size 492265168 diff --git a/stable-diffusion-xl-base-1.0/text_encoder/openvino_model.bin b/stable-diffusion-xl-base-1.0/text_encoder/openvino_model.bin deleted file mode 100644 index 9ead401ebe376d6914d3b2c1815e450bd6dbc0fd..0000000000000000000000000000000000000000 --- a/stable-diffusion-xl-base-1.0/text_encoder/openvino_model.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bbc78395c8cee553a17380e9b1a9a47da926c98731ba31306032d7d45fadb29b -size 492242672 diff --git a/stable-diffusion-xl-base-1.0/text_encoder/openvino_model.xml b/stable-diffusion-xl-base-1.0/text_encoder/openvino_model.xml deleted file mode 100644 index bdf9bb61fa91a8c4718f7c1edbb42eccb8935ce0..0000000000000000000000000000000000000000 --- a/stable-diffusion-xl-base-1.0/text_encoder/openvino_model.xml +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ab5cf7327374d8c984f4e963564a329f92c9dad08dac9eee9b8dca86b912f1c9 -size 1057789 diff --git a/stable-diffusion-xl-base-1.0/text_encoder_2/model.onnx b/stable-diffusion-xl-base-1.0/text_encoder_2/model.onnx deleted file mode 100644 index 95fb512aa88272ab6c9d9b07c50965006a316e1a..0000000000000000000000000000000000000000 --- a/stable-diffusion-xl-base-1.0/text_encoder_2/model.onnx +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:162042ac6556e73f93d4172d4c67532c1cbe4dc7a6a8fa7e44dd2e3d7cbb772b -size 1041992 diff --git a/stable-diffusion-xl-base-1.0/text_encoder_2/model.onnx_data b/stable-diffusion-xl-base-1.0/text_encoder_2/model.onnx_data deleted file mode 100644 index 4c82c612e42d333dadba69c7c7ffd922789a21a7..0000000000000000000000000000000000000000 --- a/stable-diffusion-xl-base-1.0/text_encoder_2/model.onnx_data +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3da7ac65349fbd092e836e3eeca2c22811317bc804fd70af157b4550f2d4bcb5 -size 2778639360 diff --git a/stable-diffusion-xl-base-1.0/text_encoder_2/model.safetensors b/stable-diffusion-xl-base-1.0/text_encoder_2/model.safetensors deleted file mode 100644 index ebfad577cacc107c4d5ca0646348d8fed0b03728..0000000000000000000000000000000000000000 --- a/stable-diffusion-xl-base-1.0/text_encoder_2/model.safetensors +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3a6032f63d37ae02bbc74ccd6a27440578cd71701f96532229d0154f55a8d3ff -size 2778702264 diff --git a/stable-diffusion-xl-base-1.0/text_encoder_2/openvino_model.bin b/stable-diffusion-xl-base-1.0/text_encoder_2/openvino_model.bin deleted file mode 100644 index 01c741887674f87da951961f8821d00229382d7e..0000000000000000000000000000000000000000 --- a/stable-diffusion-xl-base-1.0/text_encoder_2/openvino_model.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:549d05154b0c09d46226f85abd48552f0ef999af4f24a95b3fb62d5e7d059570 -size 2778640120 diff --git a/stable-diffusion-xl-base-1.0/text_encoder_2/openvino_model.xml b/stable-diffusion-xl-base-1.0/text_encoder_2/openvino_model.xml deleted file mode 100644 index d7cf6c62efcdd0c258c0a9af14829cd182f55c98..0000000000000000000000000000000000000000 --- a/stable-diffusion-xl-base-1.0/text_encoder_2/openvino_model.xml +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:38f0a4ff68dd918b24908a264140c2ad0e057eca82616f75c17cbf4a099ad6ad -size 2790191 diff --git a/stable-diffusion-xl-base-1.0/unet/diffusion_pytorch_model.safetensors b/stable-diffusion-xl-base-1.0/unet/diffusion_pytorch_model.safetensors deleted file mode 100644 index 8541a4f1ddbe520f88df4d1cebc4e52b93abda0d..0000000000000000000000000000000000000000 --- a/stable-diffusion-xl-base-1.0/unet/diffusion_pytorch_model.safetensors +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:357650fbfb3c7b4d94c1f5fd7664da819ad1ff5a839430484b4ec422d03f710a -size 10270077736 diff --git a/stable-diffusion-xl-base-1.0/unet/model.onnx b/stable-diffusion-xl-base-1.0/unet/model.onnx deleted file mode 100644 index 86e1fe92ed604c18699a65e7c0ae8830fcdb1f90..0000000000000000000000000000000000000000 --- a/stable-diffusion-xl-base-1.0/unet/model.onnx +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6f001c090fb13c0d0f8b0a5916da814712a94400b99471fabe77c1c4a51ecaaf -size 7293842 diff --git a/stable-diffusion-xl-base-1.0/unet/model.onnx_data b/stable-diffusion-xl-base-1.0/unet/model.onnx_data deleted file mode 100644 index 2d4d26541b015344c5f193e4edf4245cfbffb484..0000000000000000000000000000000000000000 --- a/stable-diffusion-xl-base-1.0/unet/model.onnx_data +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7905b71f0044c5ea8fea8ca0451bd73cad53492ad50f964c49c3ff9250afa350 -size 10269854720 diff --git a/stable-diffusion-xl-base-1.0/unet/openvino_model.bin b/stable-diffusion-xl-base-1.0/unet/openvino_model.bin deleted file mode 100644 index f5165afdb69f8a84e35e0cd80621828d62eb9424..0000000000000000000000000000000000000000 --- a/stable-diffusion-xl-base-1.0/unet/openvino_model.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2d586bcb83c004ab07f5899adcac3d46189afe058d6a581570f0a613a010d9ec -size 10269856428 diff --git a/stable-diffusion-xl-base-1.0/unet/openvino_model.xml b/stable-diffusion-xl-base-1.0/unet/openvino_model.xml deleted file mode 100644 index 7ed6af21cb91497dc9002b4b09adf9b97c600284..0000000000000000000000000000000000000000 --- a/stable-diffusion-xl-base-1.0/unet/openvino_model.xml +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:18955f96dffdba5612c4b554451f4ccc947c93e46df010173791654af4d0d7f6 -size 22577438 diff --git a/stable-diffusion-xl-base-1.0/vae/config.json b/stable-diffusion-xl-base-1.0/vae/config.json deleted file mode 100644 index a66a171ba7c8efb1a8fc3bdc64e65318eade8e13..0000000000000000000000000000000000000000 --- a/stable-diffusion-xl-base-1.0/vae/config.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "_class_name": "AutoencoderKL", - "_diffusers_version": "0.20.0.dev0", - "_name_or_path": "../sdxl-vae/", - "act_fn": "silu", - "block_out_channels": [ - 128, - 256, - 512, - 512 - ], - "down_block_types": [ - "DownEncoderBlock2D", - "DownEncoderBlock2D", - "DownEncoderBlock2D", - "DownEncoderBlock2D" - ], - "force_upcast": true, - "in_channels": 3, - "latent_channels": 4, - "layers_per_block": 2, - "norm_num_groups": 32, - "out_channels": 3, - "sample_size": 1024, - "scaling_factor": 0.13025, - "up_block_types": [ - "UpDecoderBlock2D", - "UpDecoderBlock2D", - "UpDecoderBlock2D", - "UpDecoderBlock2D" - ] -} diff --git a/stable-diffusion-xl-base-1.0/vae/diffusion_pytorch_model.fp16.safetensors b/stable-diffusion-xl-base-1.0/vae/diffusion_pytorch_model.fp16.safetensors deleted file mode 100644 index d490d01ec5a179303986f73b7ef0675f014cf016..0000000000000000000000000000000000000000 --- a/stable-diffusion-xl-base-1.0/vae/diffusion_pytorch_model.fp16.safetensors +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bcb60880a46b63dea58e9bc591abe15f8350bde47b405f9c38f4be70c6161e68 -size 167335342 diff --git a/stable-diffusion-xl-base-1.0/vae/diffusion_pytorch_model.safetensors b/stable-diffusion-xl-base-1.0/vae/diffusion_pytorch_model.safetensors deleted file mode 100644 index 1818a529a16a31e664a0107d944fc3c0b91a4855..0000000000000000000000000000000000000000 --- a/stable-diffusion-xl-base-1.0/vae/diffusion_pytorch_model.safetensors +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1598f3d24932bcfe6634e8b618ea1e30ab1d57f5aad13a6d2de446d2199f2341 -size 334643268 diff --git a/stable-diffusion-xl-base-1.0/vae_1_0/config.json b/stable-diffusion-xl-base-1.0/vae_1_0/config.json deleted file mode 100644 index 29a4d9ff621cd8e3b50d80eb10e08450187d29b8..0000000000000000000000000000000000000000 --- a/stable-diffusion-xl-base-1.0/vae_1_0/config.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "_class_name": "AutoencoderKL", - "_diffusers_version": "0.19.0.dev0", - "act_fn": "silu", - "block_out_channels": [ - 128, - 256, - 512, - 512 - ], - "down_block_types": [ - "DownEncoderBlock2D", - "DownEncoderBlock2D", - "DownEncoderBlock2D", - "DownEncoderBlock2D" - ], - "force_upcast": true, - "in_channels": 3, - "latent_channels": 4, - "layers_per_block": 2, - "norm_num_groups": 32, - "out_channels": 3, - "sample_size": 1024, - "scaling_factor": 0.13025, - "up_block_types": [ - "UpDecoderBlock2D", - "UpDecoderBlock2D", - "UpDecoderBlock2D", - "UpDecoderBlock2D" - ] -} diff --git a/stable-diffusion-xl-base-1.0/vae_1_0/diffusion_pytorch_model.fp16.safetensors b/stable-diffusion-xl-base-1.0/vae_1_0/diffusion_pytorch_model.fp16.safetensors deleted file mode 100644 index e22d20aa55db3a4afa1372e2ac6a31778bd533bd..0000000000000000000000000000000000000000 --- a/stable-diffusion-xl-base-1.0/vae_1_0/diffusion_pytorch_model.fp16.safetensors +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:eb6516ab7e1104d5d1a174a4d65c57835ae38061531d0a2192103aecfb790cc1 -size 167335342 diff --git a/stable-diffusion-xl-base-1.0/vae_1_0/diffusion_pytorch_model.safetensors b/stable-diffusion-xl-base-1.0/vae_1_0/diffusion_pytorch_model.safetensors deleted file mode 100644 index 50f41b2eed063b6829cfee47bcee7cab2f8af7cf..0000000000000000000000000000000000000000 --- a/stable-diffusion-xl-base-1.0/vae_1_0/diffusion_pytorch_model.safetensors +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:27ed3b02e09638568e99d4398c67bc654dde04e6c0db61fb2d21dba630e7058a -size 334643268 diff --git a/stable-diffusion-xl-base-1.0/vae_decoder/model.onnx b/stable-diffusion-xl-base-1.0/vae_decoder/model.onnx deleted file mode 100644 index 0b29182aa7b9d915cd9405138b783ebf96ad7a54..0000000000000000000000000000000000000000 --- a/stable-diffusion-xl-base-1.0/vae_decoder/model.onnx +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0892c5e28b35791140467f7b9c9fa148c24238a5f0c381b1d4c22dcd2ed365cb -size 198093688 diff --git a/stable-diffusion-xl-base-1.0/vae_decoder/openvino_model.bin b/stable-diffusion-xl-base-1.0/vae_decoder/openvino_model.bin deleted file mode 100644 index 9e8afce3e83cb900db765b2da7599fff548eb07a..0000000000000000000000000000000000000000 --- a/stable-diffusion-xl-base-1.0/vae_decoder/openvino_model.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:34ea744ad1d75fb6b8825e31f5adbe7d62cbe2e7d061535b0a12e69c2f72d0f4 -size 197961232 diff --git a/stable-diffusion-xl-base-1.0/vae_decoder/openvino_model.xml b/stable-diffusion-xl-base-1.0/vae_decoder/openvino_model.xml deleted file mode 100644 index 2d0b6890bb1a0b007a8842cb77575ca9b146e38f..0000000000000000000000000000000000000000 --- a/stable-diffusion-xl-base-1.0/vae_decoder/openvino_model.xml +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:dd61f43e981282b77ecaecf5fc5c842d504932bae78ac99ec581cee50978b423 -size 992181 diff --git a/stable-diffusion-xl-base-1.0/vae_encoder/config.json b/stable-diffusion-xl-base-1.0/vae_encoder/config.json deleted file mode 100644 index 29a4d9ff621cd8e3b50d80eb10e08450187d29b8..0000000000000000000000000000000000000000 --- a/stable-diffusion-xl-base-1.0/vae_encoder/config.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "_class_name": "AutoencoderKL", - "_diffusers_version": "0.19.0.dev0", - "act_fn": "silu", - "block_out_channels": [ - 128, - 256, - 512, - 512 - ], - "down_block_types": [ - "DownEncoderBlock2D", - "DownEncoderBlock2D", - "DownEncoderBlock2D", - "DownEncoderBlock2D" - ], - "force_upcast": true, - "in_channels": 3, - "latent_channels": 4, - "layers_per_block": 2, - "norm_num_groups": 32, - "out_channels": 3, - "sample_size": 1024, - "scaling_factor": 0.13025, - "up_block_types": [ - "UpDecoderBlock2D", - "UpDecoderBlock2D", - "UpDecoderBlock2D", - "UpDecoderBlock2D" - ] -} diff --git a/stable-diffusion-xl-base-1.0/vae_encoder/model.onnx b/stable-diffusion-xl-base-1.0/vae_encoder/model.onnx deleted file mode 100644 index b99b27df23fab2f66822acda231ac863b3224c63..0000000000000000000000000000000000000000 --- a/stable-diffusion-xl-base-1.0/vae_encoder/model.onnx +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7b117fbb21531efd59d68c95682392785999bf3e0c2ce95647c6e0de9af36e74 -size 136775724 diff --git a/stable-diffusion-xl-base-1.0/vae_encoder/openvino_model.bin b/stable-diffusion-xl-base-1.0/vae_encoder/openvino_model.bin deleted file mode 100644 index dc6cfbf1dad3268d043c085b24c4b770463b3d98..0000000000000000000000000000000000000000 --- a/stable-diffusion-xl-base-1.0/vae_encoder/openvino_model.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:97f04b0cf74808c7bd9b6e09f080e8cd24821943c3c06b153145989889215ce5 -size 136655184 diff --git a/stable-diffusion-xl-base-1.0/vae_encoder/openvino_model.xml b/stable-diffusion-xl-base-1.0/vae_encoder/openvino_model.xml deleted file mode 100644 index a0dd50cfa968ca5884f1b1b040d46321fa3a58af..0000000000000000000000000000000000000000 --- a/stable-diffusion-xl-base-1.0/vae_encoder/openvino_model.xml +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a3ec36b6f3f74d0cb2b005b7c0a1e5426c5ef1e7163b33e463ea57fa049c5996 -size 849965