abcd
commited on
Commit
Β·
03b13dd
1
Parent(s):
5dd681d
models
Browse filesThis view is limited to 50 files because it contains too many changes. Β
See raw diff
- {models/checkpoints β checkpoints}/AlbedoBaseXL.safetensors +0 -0
- {models/checkpoints β checkpoints}/TurboVisionXL.safetensors +0 -0
- {models/checkpoints β checkpoints}/epiCRealismXL.safetensors +0 -0
- {models/checkpoints β checkpoints}/epicphotogasm_lastUnicorn.safetensors +0 -0
- {models/clip β clip}/put_clip_or_text_encoder_models_here +0 -0
- clip_interrogator/Salesforce/blip-image-captioning-base/README.md +152 -0
- clip_interrogator/Salesforce/blip-image-captioning-base/config.json +169 -0
- clip_interrogator/Salesforce/blip-image-captioning-base/preprocessor_config.json +17 -0
- {models/clip_interrogator β clip_interrogator}/Salesforce/blip-image-captioning-base/pytorch_model.bin +0 -0
- clip_interrogator/Salesforce/blip-image-captioning-base/special_tokens_map.json +7 -0
- {models/clip_interrogator β clip_interrogator}/Salesforce/blip-image-captioning-base/tf_model.h5 +0 -0
- clip_interrogator/Salesforce/blip-image-captioning-base/tokenizer.json +0 -0
- clip_interrogator/Salesforce/blip-image-captioning-base/tokenizer_config.json +21 -0
- clip_interrogator/Salesforce/blip-image-captioning-base/vocab.txt +0 -0
- {models/clip_vision β clip_vision}/CLIP-ViT-H-14-laion2B-s32B-b79K.safetensors +0 -0
- {models/clip_vision β clip_vision}/CLIP-ViT-bigG-14-laion2B-39B-b160k.safetensors +0 -0
- {models/clip_vision β clip_vision}/clip-vit-large-patch14.bin +0 -0
- {models/clip_vision β clip_vision}/clip_vision_g.safetensors +0 -0
- {models/clip_vision β clip_vision}/put_clip_vision_models_here +0 -0
- configs/anything_v3.yaml +73 -0
- configs/v1-inference.yaml +70 -0
- configs/v1-inference_clip_skip_2.yaml +73 -0
- configs/v1-inference_clip_skip_2_fp16.yaml +74 -0
- configs/v1-inference_fp16.yaml +71 -0
- configs/v1-inpainting-inference.yaml +71 -0
- configs/v2-inference-v.yaml +68 -0
- configs/v2-inference-v_fp32.yaml +68 -0
- configs/v2-inference.yaml +67 -0
- configs/v2-inference_fp32.yaml +67 -0
- configs/v2-inpainting-inference.yaml +158 -0
- {models/controlnet β controlnet}/SDXL/controlnet-canny-sdxl-1.0/diffusion_pytorch_model_V2.safetensors +0 -0
- {models/controlnet β controlnet}/SDXL/controlnet-union-sdxl-1.0.safetensors +0 -0
- {models/controlnet β controlnet}/control-lora-canny-rank256.safetensors +0 -0
- {models/controlnet β controlnet}/control-lora-depth-rank256.safetensors +0 -0
- {models/controlnet β controlnet}/control_scribble.fp16.safetensors +0 -0
- {models/controlnet β controlnet}/control_v11p_sd15_densepose_fp16.safetensors +0 -0
- {models/controlnet β controlnet}/control_v11p_sd15_openpose_fp16.safetensors +0 -0
- {models/controlnet β controlnet}/diffusion_pytorch_model.safetensors +0 -0
- {models/controlnet β controlnet}/face_diffusion_model.safetensors +0 -0
- {models/controlnet β controlnet}/put_controlnets_and_t2i_here +0 -0
- {models/diffusers β diffusers}/put_diffusers_models_here +0 -0
- {models/embeddings β embeddings}/put_embeddings_or_textual_inversion_concepts_here +0 -0
- {models/facedetection β facedetection}/detection_Resnet50_Final.pth +0 -0
- {models/facedetection β facedetection}/parsing_parsenet.pth +0 -0
- {models/facedetection β facedetection}/yolov5l-face.pth +0 -0
- {models/facerestore_models β facerestore_models}/GFPGANv1.3.pth +0 -0
- {models/facerestore_models β facerestore_models}/GFPGANv1.4.pth +0 -0
- {models/facerestore_models β facerestore_models}/GPEN-BFR-1024.onnx +0 -0
- {models/facerestore_models β facerestore_models}/GPEN-BFR-2048.onnx +0 -0
- {models/facerestore_models β facerestore_models}/GPEN-BFR-512.onnx +0 -0
{models/checkpoints β checkpoints}/AlbedoBaseXL.safetensors
RENAMED
|
File without changes
|
{models/checkpoints β checkpoints}/TurboVisionXL.safetensors
RENAMED
|
File without changes
|
{models/checkpoints β checkpoints}/epiCRealismXL.safetensors
RENAMED
|
File without changes
|
{models/checkpoints β checkpoints}/epicphotogasm_lastUnicorn.safetensors
RENAMED
|
File without changes
|
{models/clip β clip}/put_clip_or_text_encoder_models_here
RENAMED
|
File without changes
|
clip_interrogator/Salesforce/blip-image-captioning-base/README.md
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
pipeline_tag: image-to-text
|
| 3 |
+
tags:
|
| 4 |
+
- image-captioning
|
| 5 |
+
languages:
|
| 6 |
+
- en
|
| 7 |
+
license: bsd-3-clause
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
# BLIP: Bootstrapping Language-Image Pre-training for Unified Vision-Language Understanding and Generation
|
| 11 |
+
|
| 12 |
+
Model card for image captioning pretrained on COCO dataset - base architecture (with ViT base backbone).
|
| 13 |
+
|
| 14 |
+
|  |
|
| 15 |
+
|:--:|
|
| 16 |
+
| <b> Pull figure from BLIP official repo | Image source: https://github.com/salesforce/BLIP </b>|
|
| 17 |
+
|
| 18 |
+
## TL;DR
|
| 19 |
+
|
| 20 |
+
Authors from the [paper](https://arxiv.org/abs/2201.12086) write in the abstract:
|
| 21 |
+
|
| 22 |
+
*Vision-Language Pre-training (VLP) has advanced the performance for many vision-language tasks. However, most existing pre-trained models only excel in either understanding-based tasks or generation-based tasks. Furthermore, performance improvement has been largely achieved by scaling up the dataset with noisy image-text pairs collected from the web, which is a suboptimal source of supervision. In this paper, we propose BLIP, a new VLP framework which transfers flexibly to both vision-language understanding and generation tasks. BLIP effectively utilizes the noisy web data by bootstrapping the captions, where a captioner generates synthetic captions and a filter removes the noisy ones. We achieve state-of-the-art results on a wide range of vision-language tasks, such as image-text retrieval (+2.7% in average recall@1), image captioning (+2.8% in CIDEr), and VQA (+1.6% in VQA score). BLIP also demonstrates strong generalization ability when directly transferred to videolanguage tasks in a zero-shot manner. Code, models, and datasets are released.*
|
| 23 |
+
|
| 24 |
+
## Usage
|
| 25 |
+
|
| 26 |
+
You can use this model for conditional and un-conditional image captioning
|
| 27 |
+
|
| 28 |
+
### Using the Pytorch model
|
| 29 |
+
|
| 30 |
+
#### Running the model on CPU
|
| 31 |
+
|
| 32 |
+
<details>
|
| 33 |
+
<summary> Click to expand </summary>
|
| 34 |
+
|
| 35 |
+
```python
|
| 36 |
+
import requests
|
| 37 |
+
from PIL import Image
|
| 38 |
+
from transformers import BlipProcessor, BlipForConditionalGeneration
|
| 39 |
+
|
| 40 |
+
processor = BlipProcessor.from_pretrained("Salesforce/blip-image-captioning-base")
|
| 41 |
+
model = BlipForConditionalGeneration.from_pretrained("Salesforce/blip-image-captioning-base")
|
| 42 |
+
|
| 43 |
+
img_url = 'https://storage.googleapis.com/sfr-vision-language-research/BLIP/demo.jpg'
|
| 44 |
+
raw_image = Image.open(requests.get(img_url, stream=True).raw).convert('RGB')
|
| 45 |
+
|
| 46 |
+
# conditional image captioning
|
| 47 |
+
text = "a photography of"
|
| 48 |
+
inputs = processor(raw_image, text, return_tensors="pt")
|
| 49 |
+
|
| 50 |
+
out = model.generate(**inputs)
|
| 51 |
+
print(processor.decode(out[0], skip_special_tokens=True))
|
| 52 |
+
# >>> a photography of a woman and her dog
|
| 53 |
+
|
| 54 |
+
# unconditional image captioning
|
| 55 |
+
inputs = processor(raw_image, return_tensors="pt")
|
| 56 |
+
|
| 57 |
+
out = model.generate(**inputs)
|
| 58 |
+
print(processor.decode(out[0], skip_special_tokens=True))
|
| 59 |
+
>>> a woman sitting on the beach with her dog
|
| 60 |
+
```
|
| 61 |
+
</details>
|
| 62 |
+
|
| 63 |
+
#### Running the model on GPU
|
| 64 |
+
|
| 65 |
+
##### In full precision
|
| 66 |
+
|
| 67 |
+
<details>
|
| 68 |
+
<summary> Click to expand </summary>
|
| 69 |
+
|
| 70 |
+
```python
|
| 71 |
+
import requests
|
| 72 |
+
from PIL import Image
|
| 73 |
+
from transformers import BlipProcessor, BlipForConditionalGeneration
|
| 74 |
+
|
| 75 |
+
processor = BlipProcessor.from_pretrained("Salesforce/blip-image-captioning-base")
|
| 76 |
+
model = BlipForConditionalGeneration.from_pretrained("Salesforce/blip-image-captioning-base").to("cuda")
|
| 77 |
+
|
| 78 |
+
img_url = 'https://storage.googleapis.com/sfr-vision-language-research/BLIP/demo.jpg'
|
| 79 |
+
raw_image = Image.open(requests.get(img_url, stream=True).raw).convert('RGB')
|
| 80 |
+
|
| 81 |
+
# conditional image captioning
|
| 82 |
+
text = "a photography of"
|
| 83 |
+
inputs = processor(raw_image, text, return_tensors="pt").to("cuda")
|
| 84 |
+
|
| 85 |
+
out = model.generate(**inputs)
|
| 86 |
+
print(processor.decode(out[0], skip_special_tokens=True))
|
| 87 |
+
# >>> a photography of a woman and her dog
|
| 88 |
+
|
| 89 |
+
# unconditional image captioning
|
| 90 |
+
inputs = processor(raw_image, return_tensors="pt").to("cuda")
|
| 91 |
+
|
| 92 |
+
out = model.generate(**inputs)
|
| 93 |
+
print(processor.decode(out[0], skip_special_tokens=True))
|
| 94 |
+
>>> a woman sitting on the beach with her dog
|
| 95 |
+
```
|
| 96 |
+
</details>
|
| 97 |
+
|
| 98 |
+
##### In half precision (`float16`)
|
| 99 |
+
|
| 100 |
+
<details>
|
| 101 |
+
<summary> Click to expand </summary>
|
| 102 |
+
|
| 103 |
+
```python
|
| 104 |
+
import torch
|
| 105 |
+
import requests
|
| 106 |
+
from PIL import Image
|
| 107 |
+
from transformers import BlipProcessor, BlipForConditionalGeneration
|
| 108 |
+
|
| 109 |
+
processor = BlipProcessor.from_pretrained("Salesforce/blip-image-captioning-base")
|
| 110 |
+
model = BlipForConditionalGeneration.from_pretrained("Salesforce/blip-image-captioning-base", torch_dtype=torch.float16).to("cuda")
|
| 111 |
+
|
| 112 |
+
img_url = 'https://storage.googleapis.com/sfr-vision-language-research/BLIP/demo.jpg'
|
| 113 |
+
raw_image = Image.open(requests.get(img_url, stream=True).raw).convert('RGB')
|
| 114 |
+
|
| 115 |
+
# conditional image captioning
|
| 116 |
+
text = "a photography of"
|
| 117 |
+
inputs = processor(raw_image, text, return_tensors="pt").to("cuda", torch.float16)
|
| 118 |
+
|
| 119 |
+
out = model.generate(**inputs)
|
| 120 |
+
print(processor.decode(out[0], skip_special_tokens=True))
|
| 121 |
+
# >>> a photography of a woman and her dog
|
| 122 |
+
|
| 123 |
+
# unconditional image captioning
|
| 124 |
+
inputs = processor(raw_image, return_tensors="pt").to("cuda", torch.float16)
|
| 125 |
+
|
| 126 |
+
out = model.generate(**inputs)
|
| 127 |
+
print(processor.decode(out[0], skip_special_tokens=True))
|
| 128 |
+
>>> a woman sitting on the beach with her dog
|
| 129 |
+
```
|
| 130 |
+
</details>
|
| 131 |
+
|
| 132 |
+
## BibTex and citation info
|
| 133 |
+
|
| 134 |
+
```
|
| 135 |
+
@misc{https://doi.org/10.48550/arxiv.2201.12086,
|
| 136 |
+
doi = {10.48550/ARXIV.2201.12086},
|
| 137 |
+
|
| 138 |
+
url = {https://arxiv.org/abs/2201.12086},
|
| 139 |
+
|
| 140 |
+
author = {Li, Junnan and Li, Dongxu and Xiong, Caiming and Hoi, Steven},
|
| 141 |
+
|
| 142 |
+
keywords = {Computer Vision and Pattern Recognition (cs.CV), FOS: Computer and information sciences, FOS: Computer and information sciences},
|
| 143 |
+
|
| 144 |
+
title = {BLIP: Bootstrapping Language-Image Pre-training for Unified Vision-Language Understanding and Generation},
|
| 145 |
+
|
| 146 |
+
publisher = {arXiv},
|
| 147 |
+
|
| 148 |
+
year = {2022},
|
| 149 |
+
|
| 150 |
+
copyright = {Creative Commons Attribution 4.0 International}
|
| 151 |
+
}
|
| 152 |
+
```
|
clip_interrogator/Salesforce/blip-image-captioning-base/config.json
ADDED
|
@@ -0,0 +1,169 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_commit_hash": null,
|
| 3 |
+
"architectures": [
|
| 4 |
+
"BlipForConditionalGeneration"
|
| 5 |
+
],
|
| 6 |
+
"image_text_hidden_size": 256,
|
| 7 |
+
"initializer_factor": 1.0,
|
| 8 |
+
"logit_scale_init_value": 2.6592,
|
| 9 |
+
"model_type": "blip",
|
| 10 |
+
"projection_dim": 512,
|
| 11 |
+
"text_config": {
|
| 12 |
+
"_name_or_path": "",
|
| 13 |
+
"add_cross_attention": false,
|
| 14 |
+
"architectures": null,
|
| 15 |
+
"attention_probs_dropout_prob": 0.0,
|
| 16 |
+
"bad_words_ids": null,
|
| 17 |
+
"begin_suppress_tokens": null,
|
| 18 |
+
"bos_token_id": 30522,
|
| 19 |
+
"chunk_size_feed_forward": 0,
|
| 20 |
+
"cross_attention_hidden_size": null,
|
| 21 |
+
"decoder_start_token_id": null,
|
| 22 |
+
"diversity_penalty": 0.0,
|
| 23 |
+
"do_sample": false,
|
| 24 |
+
"early_stopping": false,
|
| 25 |
+
"encoder_no_repeat_ngram_size": 0,
|
| 26 |
+
"eos_token_id": 2,
|
| 27 |
+
"exponential_decay_length_penalty": null,
|
| 28 |
+
"finetuning_task": null,
|
| 29 |
+
"forced_bos_token_id": null,
|
| 30 |
+
"forced_eos_token_id": null,
|
| 31 |
+
"hidden_act": "gelu",
|
| 32 |
+
"hidden_dropout_prob": 0.0,
|
| 33 |
+
"hidden_size": 768,
|
| 34 |
+
"id2label": {
|
| 35 |
+
"0": "LABEL_0",
|
| 36 |
+
"1": "LABEL_1"
|
| 37 |
+
},
|
| 38 |
+
"initializer_factor": 1.0,
|
| 39 |
+
"initializer_range": 0.02,
|
| 40 |
+
"intermediate_size": 3072,
|
| 41 |
+
"is_decoder": true,
|
| 42 |
+
"is_encoder_decoder": false,
|
| 43 |
+
"label2id": {
|
| 44 |
+
"LABEL_0": 0,
|
| 45 |
+
"LABEL_1": 1
|
| 46 |
+
},
|
| 47 |
+
"layer_norm_eps": 1e-12,
|
| 48 |
+
"length_penalty": 1.0,
|
| 49 |
+
"max_length": 20,
|
| 50 |
+
"max_position_embeddings": 512,
|
| 51 |
+
"min_length": 0,
|
| 52 |
+
"model_type": "blip_text_model",
|
| 53 |
+
"no_repeat_ngram_size": 0,
|
| 54 |
+
"num_attention_heads": 12,
|
| 55 |
+
"num_beam_groups": 1,
|
| 56 |
+
"num_beams": 1,
|
| 57 |
+
"num_hidden_layers": 12,
|
| 58 |
+
"num_return_sequences": 1,
|
| 59 |
+
"output_attentions": false,
|
| 60 |
+
"output_hidden_states": false,
|
| 61 |
+
"output_scores": false,
|
| 62 |
+
"pad_token_id": 0,
|
| 63 |
+
"prefix": null,
|
| 64 |
+
"problem_type": null,
|
| 65 |
+
"projection_dim": 768,
|
| 66 |
+
"pruned_heads": {},
|
| 67 |
+
"remove_invalid_values": false,
|
| 68 |
+
"repetition_penalty": 1.0,
|
| 69 |
+
"return_dict": true,
|
| 70 |
+
"return_dict_in_generate": false,
|
| 71 |
+
"sep_token_id": 102,
|
| 72 |
+
"suppress_tokens": null,
|
| 73 |
+
"task_specific_params": null,
|
| 74 |
+
"temperature": 1.0,
|
| 75 |
+
"tf_legacy_loss": false,
|
| 76 |
+
"tie_encoder_decoder": false,
|
| 77 |
+
"tie_word_embeddings": true,
|
| 78 |
+
"tokenizer_class": null,
|
| 79 |
+
"top_k": 50,
|
| 80 |
+
"top_p": 1.0,
|
| 81 |
+
"torch_dtype": null,
|
| 82 |
+
"torchscript": false,
|
| 83 |
+
"transformers_version": "4.26.0.dev0",
|
| 84 |
+
"typical_p": 1.0,
|
| 85 |
+
"use_bfloat16": false,
|
| 86 |
+
"use_cache": true,
|
| 87 |
+
"vocab_size": 30524
|
| 88 |
+
},
|
| 89 |
+
"torch_dtype": "float32",
|
| 90 |
+
"transformers_version": null,
|
| 91 |
+
"vision_config": {
|
| 92 |
+
"_name_or_path": "",
|
| 93 |
+
"add_cross_attention": false,
|
| 94 |
+
"architectures": null,
|
| 95 |
+
"attention_dropout": 0.0,
|
| 96 |
+
"bad_words_ids": null,
|
| 97 |
+
"begin_suppress_tokens": null,
|
| 98 |
+
"bos_token_id": null,
|
| 99 |
+
"chunk_size_feed_forward": 0,
|
| 100 |
+
"cross_attention_hidden_size": null,
|
| 101 |
+
"decoder_start_token_id": null,
|
| 102 |
+
"diversity_penalty": 0.0,
|
| 103 |
+
"do_sample": false,
|
| 104 |
+
"dropout": 0.0,
|
| 105 |
+
"early_stopping": false,
|
| 106 |
+
"encoder_no_repeat_ngram_size": 0,
|
| 107 |
+
"eos_token_id": null,
|
| 108 |
+
"exponential_decay_length_penalty": null,
|
| 109 |
+
"finetuning_task": null,
|
| 110 |
+
"forced_bos_token_id": null,
|
| 111 |
+
"forced_eos_token_id": null,
|
| 112 |
+
"hidden_act": "gelu",
|
| 113 |
+
"hidden_size": 768,
|
| 114 |
+
"id2label": {
|
| 115 |
+
"0": "LABEL_0",
|
| 116 |
+
"1": "LABEL_1"
|
| 117 |
+
},
|
| 118 |
+
"image_size": 384,
|
| 119 |
+
"initializer_factor": 1.0,
|
| 120 |
+
"initializer_range": 0.02,
|
| 121 |
+
"intermediate_size": 3072,
|
| 122 |
+
"is_decoder": false,
|
| 123 |
+
"is_encoder_decoder": false,
|
| 124 |
+
"label2id": {
|
| 125 |
+
"LABEL_0": 0,
|
| 126 |
+
"LABEL_1": 1
|
| 127 |
+
},
|
| 128 |
+
"layer_norm_eps": 1e-05,
|
| 129 |
+
"length_penalty": 1.0,
|
| 130 |
+
"max_length": 20,
|
| 131 |
+
"min_length": 0,
|
| 132 |
+
"model_type": "blip_vision_model",
|
| 133 |
+
"no_repeat_ngram_size": 0,
|
| 134 |
+
"num_attention_heads": 12,
|
| 135 |
+
"num_beam_groups": 1,
|
| 136 |
+
"num_beams": 1,
|
| 137 |
+
"num_channels": 3,
|
| 138 |
+
"num_hidden_layers": 12,
|
| 139 |
+
"num_return_sequences": 1,
|
| 140 |
+
"output_attentions": false,
|
| 141 |
+
"output_hidden_states": false,
|
| 142 |
+
"output_scores": false,
|
| 143 |
+
"pad_token_id": null,
|
| 144 |
+
"patch_size": 16,
|
| 145 |
+
"prefix": null,
|
| 146 |
+
"problem_type": null,
|
| 147 |
+
"projection_dim": 512,
|
| 148 |
+
"pruned_heads": {},
|
| 149 |
+
"remove_invalid_values": false,
|
| 150 |
+
"repetition_penalty": 1.0,
|
| 151 |
+
"return_dict": true,
|
| 152 |
+
"return_dict_in_generate": false,
|
| 153 |
+
"sep_token_id": null,
|
| 154 |
+
"suppress_tokens": null,
|
| 155 |
+
"task_specific_params": null,
|
| 156 |
+
"temperature": 1.0,
|
| 157 |
+
"tf_legacy_loss": false,
|
| 158 |
+
"tie_encoder_decoder": false,
|
| 159 |
+
"tie_word_embeddings": true,
|
| 160 |
+
"tokenizer_class": null,
|
| 161 |
+
"top_k": 50,
|
| 162 |
+
"top_p": 1.0,
|
| 163 |
+
"torch_dtype": null,
|
| 164 |
+
"torchscript": false,
|
| 165 |
+
"transformers_version": "4.26.0.dev0",
|
| 166 |
+
"typical_p": 1.0,
|
| 167 |
+
"use_bfloat16": false
|
| 168 |
+
}
|
| 169 |
+
}
|
clip_interrogator/Salesforce/blip-image-captioning-base/preprocessor_config.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"do_normalize": true,
|
| 3 |
+
"do_resize": true,
|
| 4 |
+
"image_mean": [
|
| 5 |
+
0.48145466,
|
| 6 |
+
0.4578275,
|
| 7 |
+
0.40821073
|
| 8 |
+
],
|
| 9 |
+
"image_processor_type": "BlipImageProcessor",
|
| 10 |
+
"image_std": [
|
| 11 |
+
0.26862954,
|
| 12 |
+
0.26130258,
|
| 13 |
+
0.27577711
|
| 14 |
+
],
|
| 15 |
+
"processor_class": "BlipProcessor",
|
| 16 |
+
"size": 384
|
| 17 |
+
}
|
{models/clip_interrogator β clip_interrogator}/Salesforce/blip-image-captioning-base/pytorch_model.bin
RENAMED
|
File without changes
|
clip_interrogator/Salesforce/blip-image-captioning-base/special_tokens_map.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cls_token": "[CLS]",
|
| 3 |
+
"mask_token": "[MASK]",
|
| 4 |
+
"pad_token": "[PAD]",
|
| 5 |
+
"sep_token": "[SEP]",
|
| 6 |
+
"unk_token": "[UNK]"
|
| 7 |
+
}
|
{models/clip_interrogator β clip_interrogator}/Salesforce/blip-image-captioning-base/tf_model.h5
RENAMED
|
File without changes
|
clip_interrogator/Salesforce/blip-image-captioning-base/tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
clip_interrogator/Salesforce/blip-image-captioning-base/tokenizer_config.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cls_token": "[CLS]",
|
| 3 |
+
"do_basic_tokenize": true,
|
| 4 |
+
"do_lower_case": true,
|
| 5 |
+
"mask_token": "[MASK]",
|
| 6 |
+
"model_max_length": 512,
|
| 7 |
+
"name_or_path": "bert-base-uncased",
|
| 8 |
+
"never_split": null,
|
| 9 |
+
"pad_token": "[PAD]",
|
| 10 |
+
"processor_class": "BlipProcessor",
|
| 11 |
+
"sep_token": "[SEP]",
|
| 12 |
+
"special_tokens_map_file": null,
|
| 13 |
+
"strip_accents": null,
|
| 14 |
+
"tokenize_chinese_chars": true,
|
| 15 |
+
"tokenizer_class": "BertTokenizer",
|
| 16 |
+
"unk_token": "[UNK]",
|
| 17 |
+
"model_input_names": [
|
| 18 |
+
"input_ids",
|
| 19 |
+
"attention_mask"
|
| 20 |
+
]
|
| 21 |
+
}
|
clip_interrogator/Salesforce/blip-image-captioning-base/vocab.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
{models/clip_vision β clip_vision}/CLIP-ViT-H-14-laion2B-s32B-b79K.safetensors
RENAMED
|
File without changes
|
{models/clip_vision β clip_vision}/CLIP-ViT-bigG-14-laion2B-39B-b160k.safetensors
RENAMED
|
File without changes
|
{models/clip_vision β clip_vision}/clip-vit-large-patch14.bin
RENAMED
|
File without changes
|
{models/clip_vision β clip_vision}/clip_vision_g.safetensors
RENAMED
|
File without changes
|
{models/clip_vision β clip_vision}/put_clip_vision_models_here
RENAMED
|
File without changes
|
configs/anything_v3.yaml
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
model:
|
| 2 |
+
base_learning_rate: 1.0e-04
|
| 3 |
+
target: ldm.models.diffusion.ddpm.LatentDiffusion
|
| 4 |
+
params:
|
| 5 |
+
linear_start: 0.00085
|
| 6 |
+
linear_end: 0.0120
|
| 7 |
+
num_timesteps_cond: 1
|
| 8 |
+
log_every_t: 200
|
| 9 |
+
timesteps: 1000
|
| 10 |
+
first_stage_key: "jpg"
|
| 11 |
+
cond_stage_key: "txt"
|
| 12 |
+
image_size: 64
|
| 13 |
+
channels: 4
|
| 14 |
+
cond_stage_trainable: false # Note: different from the one we trained before
|
| 15 |
+
conditioning_key: crossattn
|
| 16 |
+
monitor: val/loss_simple_ema
|
| 17 |
+
scale_factor: 0.18215
|
| 18 |
+
use_ema: False
|
| 19 |
+
|
| 20 |
+
scheduler_config: # 10000 warmup steps
|
| 21 |
+
target: ldm.lr_scheduler.LambdaLinearScheduler
|
| 22 |
+
params:
|
| 23 |
+
warm_up_steps: [ 10000 ]
|
| 24 |
+
cycle_lengths: [ 10000000000000 ] # incredibly large number to prevent corner cases
|
| 25 |
+
f_start: [ 1.e-6 ]
|
| 26 |
+
f_max: [ 1. ]
|
| 27 |
+
f_min: [ 1. ]
|
| 28 |
+
|
| 29 |
+
unet_config:
|
| 30 |
+
target: ldm.modules.diffusionmodules.openaimodel.UNetModel
|
| 31 |
+
params:
|
| 32 |
+
image_size: 32 # unused
|
| 33 |
+
in_channels: 4
|
| 34 |
+
out_channels: 4
|
| 35 |
+
model_channels: 320
|
| 36 |
+
attention_resolutions: [ 4, 2, 1 ]
|
| 37 |
+
num_res_blocks: 2
|
| 38 |
+
channel_mult: [ 1, 2, 4, 4 ]
|
| 39 |
+
num_heads: 8
|
| 40 |
+
use_spatial_transformer: True
|
| 41 |
+
transformer_depth: 1
|
| 42 |
+
context_dim: 768
|
| 43 |
+
use_checkpoint: True
|
| 44 |
+
legacy: False
|
| 45 |
+
|
| 46 |
+
first_stage_config:
|
| 47 |
+
target: ldm.models.autoencoder.AutoencoderKL
|
| 48 |
+
params:
|
| 49 |
+
embed_dim: 4
|
| 50 |
+
monitor: val/rec_loss
|
| 51 |
+
ddconfig:
|
| 52 |
+
double_z: true
|
| 53 |
+
z_channels: 4
|
| 54 |
+
resolution: 256
|
| 55 |
+
in_channels: 3
|
| 56 |
+
out_ch: 3
|
| 57 |
+
ch: 128
|
| 58 |
+
ch_mult:
|
| 59 |
+
- 1
|
| 60 |
+
- 2
|
| 61 |
+
- 4
|
| 62 |
+
- 4
|
| 63 |
+
num_res_blocks: 2
|
| 64 |
+
attn_resolutions: []
|
| 65 |
+
dropout: 0.0
|
| 66 |
+
lossconfig:
|
| 67 |
+
target: torch.nn.Identity
|
| 68 |
+
|
| 69 |
+
cond_stage_config:
|
| 70 |
+
target: ldm.modules.encoders.modules.FrozenCLIPEmbedder
|
| 71 |
+
params:
|
| 72 |
+
layer: "hidden"
|
| 73 |
+
layer_idx: -2
|
configs/v1-inference.yaml
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
model:
|
| 2 |
+
base_learning_rate: 1.0e-04
|
| 3 |
+
target: ldm.models.diffusion.ddpm.LatentDiffusion
|
| 4 |
+
params:
|
| 5 |
+
linear_start: 0.00085
|
| 6 |
+
linear_end: 0.0120
|
| 7 |
+
num_timesteps_cond: 1
|
| 8 |
+
log_every_t: 200
|
| 9 |
+
timesteps: 1000
|
| 10 |
+
first_stage_key: "jpg"
|
| 11 |
+
cond_stage_key: "txt"
|
| 12 |
+
image_size: 64
|
| 13 |
+
channels: 4
|
| 14 |
+
cond_stage_trainable: false # Note: different from the one we trained before
|
| 15 |
+
conditioning_key: crossattn
|
| 16 |
+
monitor: val/loss_simple_ema
|
| 17 |
+
scale_factor: 0.18215
|
| 18 |
+
use_ema: False
|
| 19 |
+
|
| 20 |
+
scheduler_config: # 10000 warmup steps
|
| 21 |
+
target: ldm.lr_scheduler.LambdaLinearScheduler
|
| 22 |
+
params:
|
| 23 |
+
warm_up_steps: [ 10000 ]
|
| 24 |
+
cycle_lengths: [ 10000000000000 ] # incredibly large number to prevent corner cases
|
| 25 |
+
f_start: [ 1.e-6 ]
|
| 26 |
+
f_max: [ 1. ]
|
| 27 |
+
f_min: [ 1. ]
|
| 28 |
+
|
| 29 |
+
unet_config:
|
| 30 |
+
target: ldm.modules.diffusionmodules.openaimodel.UNetModel
|
| 31 |
+
params:
|
| 32 |
+
image_size: 32 # unused
|
| 33 |
+
in_channels: 4
|
| 34 |
+
out_channels: 4
|
| 35 |
+
model_channels: 320
|
| 36 |
+
attention_resolutions: [ 4, 2, 1 ]
|
| 37 |
+
num_res_blocks: 2
|
| 38 |
+
channel_mult: [ 1, 2, 4, 4 ]
|
| 39 |
+
num_heads: 8
|
| 40 |
+
use_spatial_transformer: True
|
| 41 |
+
transformer_depth: 1
|
| 42 |
+
context_dim: 768
|
| 43 |
+
use_checkpoint: True
|
| 44 |
+
legacy: False
|
| 45 |
+
|
| 46 |
+
first_stage_config:
|
| 47 |
+
target: ldm.models.autoencoder.AutoencoderKL
|
| 48 |
+
params:
|
| 49 |
+
embed_dim: 4
|
| 50 |
+
monitor: val/rec_loss
|
| 51 |
+
ddconfig:
|
| 52 |
+
double_z: true
|
| 53 |
+
z_channels: 4
|
| 54 |
+
resolution: 256
|
| 55 |
+
in_channels: 3
|
| 56 |
+
out_ch: 3
|
| 57 |
+
ch: 128
|
| 58 |
+
ch_mult:
|
| 59 |
+
- 1
|
| 60 |
+
- 2
|
| 61 |
+
- 4
|
| 62 |
+
- 4
|
| 63 |
+
num_res_blocks: 2
|
| 64 |
+
attn_resolutions: []
|
| 65 |
+
dropout: 0.0
|
| 66 |
+
lossconfig:
|
| 67 |
+
target: torch.nn.Identity
|
| 68 |
+
|
| 69 |
+
cond_stage_config:
|
| 70 |
+
target: ldm.modules.encoders.modules.FrozenCLIPEmbedder
|
configs/v1-inference_clip_skip_2.yaml
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
model:
|
| 2 |
+
base_learning_rate: 1.0e-04
|
| 3 |
+
target: ldm.models.diffusion.ddpm.LatentDiffusion
|
| 4 |
+
params:
|
| 5 |
+
linear_start: 0.00085
|
| 6 |
+
linear_end: 0.0120
|
| 7 |
+
num_timesteps_cond: 1
|
| 8 |
+
log_every_t: 200
|
| 9 |
+
timesteps: 1000
|
| 10 |
+
first_stage_key: "jpg"
|
| 11 |
+
cond_stage_key: "txt"
|
| 12 |
+
image_size: 64
|
| 13 |
+
channels: 4
|
| 14 |
+
cond_stage_trainable: false # Note: different from the one we trained before
|
| 15 |
+
conditioning_key: crossattn
|
| 16 |
+
monitor: val/loss_simple_ema
|
| 17 |
+
scale_factor: 0.18215
|
| 18 |
+
use_ema: False
|
| 19 |
+
|
| 20 |
+
scheduler_config: # 10000 warmup steps
|
| 21 |
+
target: ldm.lr_scheduler.LambdaLinearScheduler
|
| 22 |
+
params:
|
| 23 |
+
warm_up_steps: [ 10000 ]
|
| 24 |
+
cycle_lengths: [ 10000000000000 ] # incredibly large number to prevent corner cases
|
| 25 |
+
f_start: [ 1.e-6 ]
|
| 26 |
+
f_max: [ 1. ]
|
| 27 |
+
f_min: [ 1. ]
|
| 28 |
+
|
| 29 |
+
unet_config:
|
| 30 |
+
target: ldm.modules.diffusionmodules.openaimodel.UNetModel
|
| 31 |
+
params:
|
| 32 |
+
image_size: 32 # unused
|
| 33 |
+
in_channels: 4
|
| 34 |
+
out_channels: 4
|
| 35 |
+
model_channels: 320
|
| 36 |
+
attention_resolutions: [ 4, 2, 1 ]
|
| 37 |
+
num_res_blocks: 2
|
| 38 |
+
channel_mult: [ 1, 2, 4, 4 ]
|
| 39 |
+
num_heads: 8
|
| 40 |
+
use_spatial_transformer: True
|
| 41 |
+
transformer_depth: 1
|
| 42 |
+
context_dim: 768
|
| 43 |
+
use_checkpoint: True
|
| 44 |
+
legacy: False
|
| 45 |
+
|
| 46 |
+
first_stage_config:
|
| 47 |
+
target: ldm.models.autoencoder.AutoencoderKL
|
| 48 |
+
params:
|
| 49 |
+
embed_dim: 4
|
| 50 |
+
monitor: val/rec_loss
|
| 51 |
+
ddconfig:
|
| 52 |
+
double_z: true
|
| 53 |
+
z_channels: 4
|
| 54 |
+
resolution: 256
|
| 55 |
+
in_channels: 3
|
| 56 |
+
out_ch: 3
|
| 57 |
+
ch: 128
|
| 58 |
+
ch_mult:
|
| 59 |
+
- 1
|
| 60 |
+
- 2
|
| 61 |
+
- 4
|
| 62 |
+
- 4
|
| 63 |
+
num_res_blocks: 2
|
| 64 |
+
attn_resolutions: []
|
| 65 |
+
dropout: 0.0
|
| 66 |
+
lossconfig:
|
| 67 |
+
target: torch.nn.Identity
|
| 68 |
+
|
| 69 |
+
cond_stage_config:
|
| 70 |
+
target: ldm.modules.encoders.modules.FrozenCLIPEmbedder
|
| 71 |
+
params:
|
| 72 |
+
layer: "hidden"
|
| 73 |
+
layer_idx: -2
|
configs/v1-inference_clip_skip_2_fp16.yaml
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
model:
|
| 2 |
+
base_learning_rate: 1.0e-04
|
| 3 |
+
target: ldm.models.diffusion.ddpm.LatentDiffusion
|
| 4 |
+
params:
|
| 5 |
+
linear_start: 0.00085
|
| 6 |
+
linear_end: 0.0120
|
| 7 |
+
num_timesteps_cond: 1
|
| 8 |
+
log_every_t: 200
|
| 9 |
+
timesteps: 1000
|
| 10 |
+
first_stage_key: "jpg"
|
| 11 |
+
cond_stage_key: "txt"
|
| 12 |
+
image_size: 64
|
| 13 |
+
channels: 4
|
| 14 |
+
cond_stage_trainable: false # Note: different from the one we trained before
|
| 15 |
+
conditioning_key: crossattn
|
| 16 |
+
monitor: val/loss_simple_ema
|
| 17 |
+
scale_factor: 0.18215
|
| 18 |
+
use_ema: False
|
| 19 |
+
|
| 20 |
+
scheduler_config: # 10000 warmup steps
|
| 21 |
+
target: ldm.lr_scheduler.LambdaLinearScheduler
|
| 22 |
+
params:
|
| 23 |
+
warm_up_steps: [ 10000 ]
|
| 24 |
+
cycle_lengths: [ 10000000000000 ] # incredibly large number to prevent corner cases
|
| 25 |
+
f_start: [ 1.e-6 ]
|
| 26 |
+
f_max: [ 1. ]
|
| 27 |
+
f_min: [ 1. ]
|
| 28 |
+
|
| 29 |
+
unet_config:
|
| 30 |
+
target: ldm.modules.diffusionmodules.openaimodel.UNetModel
|
| 31 |
+
params:
|
| 32 |
+
use_fp16: True
|
| 33 |
+
image_size: 32 # unused
|
| 34 |
+
in_channels: 4
|
| 35 |
+
out_channels: 4
|
| 36 |
+
model_channels: 320
|
| 37 |
+
attention_resolutions: [ 4, 2, 1 ]
|
| 38 |
+
num_res_blocks: 2
|
| 39 |
+
channel_mult: [ 1, 2, 4, 4 ]
|
| 40 |
+
num_heads: 8
|
| 41 |
+
use_spatial_transformer: True
|
| 42 |
+
transformer_depth: 1
|
| 43 |
+
context_dim: 768
|
| 44 |
+
use_checkpoint: True
|
| 45 |
+
legacy: False
|
| 46 |
+
|
| 47 |
+
first_stage_config:
|
| 48 |
+
target: ldm.models.autoencoder.AutoencoderKL
|
| 49 |
+
params:
|
| 50 |
+
embed_dim: 4
|
| 51 |
+
monitor: val/rec_loss
|
| 52 |
+
ddconfig:
|
| 53 |
+
double_z: true
|
| 54 |
+
z_channels: 4
|
| 55 |
+
resolution: 256
|
| 56 |
+
in_channels: 3
|
| 57 |
+
out_ch: 3
|
| 58 |
+
ch: 128
|
| 59 |
+
ch_mult:
|
| 60 |
+
- 1
|
| 61 |
+
- 2
|
| 62 |
+
- 4
|
| 63 |
+
- 4
|
| 64 |
+
num_res_blocks: 2
|
| 65 |
+
attn_resolutions: []
|
| 66 |
+
dropout: 0.0
|
| 67 |
+
lossconfig:
|
| 68 |
+
target: torch.nn.Identity
|
| 69 |
+
|
| 70 |
+
cond_stage_config:
|
| 71 |
+
target: ldm.modules.encoders.modules.FrozenCLIPEmbedder
|
| 72 |
+
params:
|
| 73 |
+
layer: "hidden"
|
| 74 |
+
layer_idx: -2
|
configs/v1-inference_fp16.yaml
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
model:
|
| 2 |
+
base_learning_rate: 1.0e-04
|
| 3 |
+
target: ldm.models.diffusion.ddpm.LatentDiffusion
|
| 4 |
+
params:
|
| 5 |
+
linear_start: 0.00085
|
| 6 |
+
linear_end: 0.0120
|
| 7 |
+
num_timesteps_cond: 1
|
| 8 |
+
log_every_t: 200
|
| 9 |
+
timesteps: 1000
|
| 10 |
+
first_stage_key: "jpg"
|
| 11 |
+
cond_stage_key: "txt"
|
| 12 |
+
image_size: 64
|
| 13 |
+
channels: 4
|
| 14 |
+
cond_stage_trainable: false # Note: different from the one we trained before
|
| 15 |
+
conditioning_key: crossattn
|
| 16 |
+
monitor: val/loss_simple_ema
|
| 17 |
+
scale_factor: 0.18215
|
| 18 |
+
use_ema: False
|
| 19 |
+
|
| 20 |
+
scheduler_config: # 10000 warmup steps
|
| 21 |
+
target: ldm.lr_scheduler.LambdaLinearScheduler
|
| 22 |
+
params:
|
| 23 |
+
warm_up_steps: [ 10000 ]
|
| 24 |
+
cycle_lengths: [ 10000000000000 ] # incredibly large number to prevent corner cases
|
| 25 |
+
f_start: [ 1.e-6 ]
|
| 26 |
+
f_max: [ 1. ]
|
| 27 |
+
f_min: [ 1. ]
|
| 28 |
+
|
| 29 |
+
unet_config:
|
| 30 |
+
target: ldm.modules.diffusionmodules.openaimodel.UNetModel
|
| 31 |
+
params:
|
| 32 |
+
use_fp16: True
|
| 33 |
+
image_size: 32 # unused
|
| 34 |
+
in_channels: 4
|
| 35 |
+
out_channels: 4
|
| 36 |
+
model_channels: 320
|
| 37 |
+
attention_resolutions: [ 4, 2, 1 ]
|
| 38 |
+
num_res_blocks: 2
|
| 39 |
+
channel_mult: [ 1, 2, 4, 4 ]
|
| 40 |
+
num_heads: 8
|
| 41 |
+
use_spatial_transformer: True
|
| 42 |
+
transformer_depth: 1
|
| 43 |
+
context_dim: 768
|
| 44 |
+
use_checkpoint: True
|
| 45 |
+
legacy: False
|
| 46 |
+
|
| 47 |
+
first_stage_config:
|
| 48 |
+
target: ldm.models.autoencoder.AutoencoderKL
|
| 49 |
+
params:
|
| 50 |
+
embed_dim: 4
|
| 51 |
+
monitor: val/rec_loss
|
| 52 |
+
ddconfig:
|
| 53 |
+
double_z: true
|
| 54 |
+
z_channels: 4
|
| 55 |
+
resolution: 256
|
| 56 |
+
in_channels: 3
|
| 57 |
+
out_ch: 3
|
| 58 |
+
ch: 128
|
| 59 |
+
ch_mult:
|
| 60 |
+
- 1
|
| 61 |
+
- 2
|
| 62 |
+
- 4
|
| 63 |
+
- 4
|
| 64 |
+
num_res_blocks: 2
|
| 65 |
+
attn_resolutions: []
|
| 66 |
+
dropout: 0.0
|
| 67 |
+
lossconfig:
|
| 68 |
+
target: torch.nn.Identity
|
| 69 |
+
|
| 70 |
+
cond_stage_config:
|
| 71 |
+
target: ldm.modules.encoders.modules.FrozenCLIPEmbedder
|
configs/v1-inpainting-inference.yaml
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
model:
|
| 2 |
+
base_learning_rate: 7.5e-05
|
| 3 |
+
target: ldm.models.diffusion.ddpm.LatentInpaintDiffusion
|
| 4 |
+
params:
|
| 5 |
+
linear_start: 0.00085
|
| 6 |
+
linear_end: 0.0120
|
| 7 |
+
num_timesteps_cond: 1
|
| 8 |
+
log_every_t: 200
|
| 9 |
+
timesteps: 1000
|
| 10 |
+
first_stage_key: "jpg"
|
| 11 |
+
cond_stage_key: "txt"
|
| 12 |
+
image_size: 64
|
| 13 |
+
channels: 4
|
| 14 |
+
cond_stage_trainable: false # Note: different from the one we trained before
|
| 15 |
+
conditioning_key: hybrid # important
|
| 16 |
+
monitor: val/loss_simple_ema
|
| 17 |
+
scale_factor: 0.18215
|
| 18 |
+
finetune_keys: null
|
| 19 |
+
|
| 20 |
+
scheduler_config: # 10000 warmup steps
|
| 21 |
+
target: ldm.lr_scheduler.LambdaLinearScheduler
|
| 22 |
+
params:
|
| 23 |
+
warm_up_steps: [ 2500 ] # NOTE for resuming. use 10000 if starting from scratch
|
| 24 |
+
cycle_lengths: [ 10000000000000 ] # incredibly large number to prevent corner cases
|
| 25 |
+
f_start: [ 1.e-6 ]
|
| 26 |
+
f_max: [ 1. ]
|
| 27 |
+
f_min: [ 1. ]
|
| 28 |
+
|
| 29 |
+
unet_config:
|
| 30 |
+
target: ldm.modules.diffusionmodules.openaimodel.UNetModel
|
| 31 |
+
params:
|
| 32 |
+
image_size: 32 # unused
|
| 33 |
+
in_channels: 9 # 4 data + 4 downscaled image + 1 mask
|
| 34 |
+
out_channels: 4
|
| 35 |
+
model_channels: 320
|
| 36 |
+
attention_resolutions: [ 4, 2, 1 ]
|
| 37 |
+
num_res_blocks: 2
|
| 38 |
+
channel_mult: [ 1, 2, 4, 4 ]
|
| 39 |
+
num_heads: 8
|
| 40 |
+
use_spatial_transformer: True
|
| 41 |
+
transformer_depth: 1
|
| 42 |
+
context_dim: 768
|
| 43 |
+
use_checkpoint: True
|
| 44 |
+
legacy: False
|
| 45 |
+
|
| 46 |
+
first_stage_config:
|
| 47 |
+
target: ldm.models.autoencoder.AutoencoderKL
|
| 48 |
+
params:
|
| 49 |
+
embed_dim: 4
|
| 50 |
+
monitor: val/rec_loss
|
| 51 |
+
ddconfig:
|
| 52 |
+
double_z: true
|
| 53 |
+
z_channels: 4
|
| 54 |
+
resolution: 256
|
| 55 |
+
in_channels: 3
|
| 56 |
+
out_ch: 3
|
| 57 |
+
ch: 128
|
| 58 |
+
ch_mult:
|
| 59 |
+
- 1
|
| 60 |
+
- 2
|
| 61 |
+
- 4
|
| 62 |
+
- 4
|
| 63 |
+
num_res_blocks: 2
|
| 64 |
+
attn_resolutions: []
|
| 65 |
+
dropout: 0.0
|
| 66 |
+
lossconfig:
|
| 67 |
+
target: torch.nn.Identity
|
| 68 |
+
|
| 69 |
+
cond_stage_config:
|
| 70 |
+
target: ldm.modules.encoders.modules.FrozenCLIPEmbedder
|
| 71 |
+
|
configs/v2-inference-v.yaml
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
model:
|
| 2 |
+
base_learning_rate: 1.0e-4
|
| 3 |
+
target: ldm.models.diffusion.ddpm.LatentDiffusion
|
| 4 |
+
params:
|
| 5 |
+
parameterization: "v"
|
| 6 |
+
linear_start: 0.00085
|
| 7 |
+
linear_end: 0.0120
|
| 8 |
+
num_timesteps_cond: 1
|
| 9 |
+
log_every_t: 200
|
| 10 |
+
timesteps: 1000
|
| 11 |
+
first_stage_key: "jpg"
|
| 12 |
+
cond_stage_key: "txt"
|
| 13 |
+
image_size: 64
|
| 14 |
+
channels: 4
|
| 15 |
+
cond_stage_trainable: false
|
| 16 |
+
conditioning_key: crossattn
|
| 17 |
+
monitor: val/loss_simple_ema
|
| 18 |
+
scale_factor: 0.18215
|
| 19 |
+
use_ema: False # we set this to false because this is an inference only config
|
| 20 |
+
|
| 21 |
+
unet_config:
|
| 22 |
+
target: ldm.modules.diffusionmodules.openaimodel.UNetModel
|
| 23 |
+
params:
|
| 24 |
+
use_checkpoint: True
|
| 25 |
+
use_fp16: True
|
| 26 |
+
image_size: 32 # unused
|
| 27 |
+
in_channels: 4
|
| 28 |
+
out_channels: 4
|
| 29 |
+
model_channels: 320
|
| 30 |
+
attention_resolutions: [ 4, 2, 1 ]
|
| 31 |
+
num_res_blocks: 2
|
| 32 |
+
channel_mult: [ 1, 2, 4, 4 ]
|
| 33 |
+
num_head_channels: 64 # need to fix for flash-attn
|
| 34 |
+
use_spatial_transformer: True
|
| 35 |
+
use_linear_in_transformer: True
|
| 36 |
+
transformer_depth: 1
|
| 37 |
+
context_dim: 1024
|
| 38 |
+
legacy: False
|
| 39 |
+
|
| 40 |
+
first_stage_config:
|
| 41 |
+
target: ldm.models.autoencoder.AutoencoderKL
|
| 42 |
+
params:
|
| 43 |
+
embed_dim: 4
|
| 44 |
+
monitor: val/rec_loss
|
| 45 |
+
ddconfig:
|
| 46 |
+
#attn_type: "vanilla-xformers"
|
| 47 |
+
double_z: true
|
| 48 |
+
z_channels: 4
|
| 49 |
+
resolution: 256
|
| 50 |
+
in_channels: 3
|
| 51 |
+
out_ch: 3
|
| 52 |
+
ch: 128
|
| 53 |
+
ch_mult:
|
| 54 |
+
- 1
|
| 55 |
+
- 2
|
| 56 |
+
- 4
|
| 57 |
+
- 4
|
| 58 |
+
num_res_blocks: 2
|
| 59 |
+
attn_resolutions: []
|
| 60 |
+
dropout: 0.0
|
| 61 |
+
lossconfig:
|
| 62 |
+
target: torch.nn.Identity
|
| 63 |
+
|
| 64 |
+
cond_stage_config:
|
| 65 |
+
target: ldm.modules.encoders.modules.FrozenOpenCLIPEmbedder
|
| 66 |
+
params:
|
| 67 |
+
freeze: True
|
| 68 |
+
layer: "penultimate"
|
configs/v2-inference-v_fp32.yaml
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
model:
|
| 2 |
+
base_learning_rate: 1.0e-4
|
| 3 |
+
target: ldm.models.diffusion.ddpm.LatentDiffusion
|
| 4 |
+
params:
|
| 5 |
+
parameterization: "v"
|
| 6 |
+
linear_start: 0.00085
|
| 7 |
+
linear_end: 0.0120
|
| 8 |
+
num_timesteps_cond: 1
|
| 9 |
+
log_every_t: 200
|
| 10 |
+
timesteps: 1000
|
| 11 |
+
first_stage_key: "jpg"
|
| 12 |
+
cond_stage_key: "txt"
|
| 13 |
+
image_size: 64
|
| 14 |
+
channels: 4
|
| 15 |
+
cond_stage_trainable: false
|
| 16 |
+
conditioning_key: crossattn
|
| 17 |
+
monitor: val/loss_simple_ema
|
| 18 |
+
scale_factor: 0.18215
|
| 19 |
+
use_ema: False # we set this to false because this is an inference only config
|
| 20 |
+
|
| 21 |
+
unet_config:
|
| 22 |
+
target: ldm.modules.diffusionmodules.openaimodel.UNetModel
|
| 23 |
+
params:
|
| 24 |
+
use_checkpoint: True
|
| 25 |
+
use_fp16: False
|
| 26 |
+
image_size: 32 # unused
|
| 27 |
+
in_channels: 4
|
| 28 |
+
out_channels: 4
|
| 29 |
+
model_channels: 320
|
| 30 |
+
attention_resolutions: [ 4, 2, 1 ]
|
| 31 |
+
num_res_blocks: 2
|
| 32 |
+
channel_mult: [ 1, 2, 4, 4 ]
|
| 33 |
+
num_head_channels: 64 # need to fix for flash-attn
|
| 34 |
+
use_spatial_transformer: True
|
| 35 |
+
use_linear_in_transformer: True
|
| 36 |
+
transformer_depth: 1
|
| 37 |
+
context_dim: 1024
|
| 38 |
+
legacy: False
|
| 39 |
+
|
| 40 |
+
first_stage_config:
|
| 41 |
+
target: ldm.models.autoencoder.AutoencoderKL
|
| 42 |
+
params:
|
| 43 |
+
embed_dim: 4
|
| 44 |
+
monitor: val/rec_loss
|
| 45 |
+
ddconfig:
|
| 46 |
+
#attn_type: "vanilla-xformers"
|
| 47 |
+
double_z: true
|
| 48 |
+
z_channels: 4
|
| 49 |
+
resolution: 256
|
| 50 |
+
in_channels: 3
|
| 51 |
+
out_ch: 3
|
| 52 |
+
ch: 128
|
| 53 |
+
ch_mult:
|
| 54 |
+
- 1
|
| 55 |
+
- 2
|
| 56 |
+
- 4
|
| 57 |
+
- 4
|
| 58 |
+
num_res_blocks: 2
|
| 59 |
+
attn_resolutions: []
|
| 60 |
+
dropout: 0.0
|
| 61 |
+
lossconfig:
|
| 62 |
+
target: torch.nn.Identity
|
| 63 |
+
|
| 64 |
+
cond_stage_config:
|
| 65 |
+
target: ldm.modules.encoders.modules.FrozenOpenCLIPEmbedder
|
| 66 |
+
params:
|
| 67 |
+
freeze: True
|
| 68 |
+
layer: "penultimate"
|
configs/v2-inference.yaml
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
model:
|
| 2 |
+
base_learning_rate: 1.0e-4
|
| 3 |
+
target: ldm.models.diffusion.ddpm.LatentDiffusion
|
| 4 |
+
params:
|
| 5 |
+
linear_start: 0.00085
|
| 6 |
+
linear_end: 0.0120
|
| 7 |
+
num_timesteps_cond: 1
|
| 8 |
+
log_every_t: 200
|
| 9 |
+
timesteps: 1000
|
| 10 |
+
first_stage_key: "jpg"
|
| 11 |
+
cond_stage_key: "txt"
|
| 12 |
+
image_size: 64
|
| 13 |
+
channels: 4
|
| 14 |
+
cond_stage_trainable: false
|
| 15 |
+
conditioning_key: crossattn
|
| 16 |
+
monitor: val/loss_simple_ema
|
| 17 |
+
scale_factor: 0.18215
|
| 18 |
+
use_ema: False # we set this to false because this is an inference only config
|
| 19 |
+
|
| 20 |
+
unet_config:
|
| 21 |
+
target: ldm.modules.diffusionmodules.openaimodel.UNetModel
|
| 22 |
+
params:
|
| 23 |
+
use_checkpoint: True
|
| 24 |
+
use_fp16: True
|
| 25 |
+
image_size: 32 # unused
|
| 26 |
+
in_channels: 4
|
| 27 |
+
out_channels: 4
|
| 28 |
+
model_channels: 320
|
| 29 |
+
attention_resolutions: [ 4, 2, 1 ]
|
| 30 |
+
num_res_blocks: 2
|
| 31 |
+
channel_mult: [ 1, 2, 4, 4 ]
|
| 32 |
+
num_head_channels: 64 # need to fix for flash-attn
|
| 33 |
+
use_spatial_transformer: True
|
| 34 |
+
use_linear_in_transformer: True
|
| 35 |
+
transformer_depth: 1
|
| 36 |
+
context_dim: 1024
|
| 37 |
+
legacy: False
|
| 38 |
+
|
| 39 |
+
first_stage_config:
|
| 40 |
+
target: ldm.models.autoencoder.AutoencoderKL
|
| 41 |
+
params:
|
| 42 |
+
embed_dim: 4
|
| 43 |
+
monitor: val/rec_loss
|
| 44 |
+
ddconfig:
|
| 45 |
+
#attn_type: "vanilla-xformers"
|
| 46 |
+
double_z: true
|
| 47 |
+
z_channels: 4
|
| 48 |
+
resolution: 256
|
| 49 |
+
in_channels: 3
|
| 50 |
+
out_ch: 3
|
| 51 |
+
ch: 128
|
| 52 |
+
ch_mult:
|
| 53 |
+
- 1
|
| 54 |
+
- 2
|
| 55 |
+
- 4
|
| 56 |
+
- 4
|
| 57 |
+
num_res_blocks: 2
|
| 58 |
+
attn_resolutions: []
|
| 59 |
+
dropout: 0.0
|
| 60 |
+
lossconfig:
|
| 61 |
+
target: torch.nn.Identity
|
| 62 |
+
|
| 63 |
+
cond_stage_config:
|
| 64 |
+
target: ldm.modules.encoders.modules.FrozenOpenCLIPEmbedder
|
| 65 |
+
params:
|
| 66 |
+
freeze: True
|
| 67 |
+
layer: "penultimate"
|
configs/v2-inference_fp32.yaml
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
model:
|
| 2 |
+
base_learning_rate: 1.0e-4
|
| 3 |
+
target: ldm.models.diffusion.ddpm.LatentDiffusion
|
| 4 |
+
params:
|
| 5 |
+
linear_start: 0.00085
|
| 6 |
+
linear_end: 0.0120
|
| 7 |
+
num_timesteps_cond: 1
|
| 8 |
+
log_every_t: 200
|
| 9 |
+
timesteps: 1000
|
| 10 |
+
first_stage_key: "jpg"
|
| 11 |
+
cond_stage_key: "txt"
|
| 12 |
+
image_size: 64
|
| 13 |
+
channels: 4
|
| 14 |
+
cond_stage_trainable: false
|
| 15 |
+
conditioning_key: crossattn
|
| 16 |
+
monitor: val/loss_simple_ema
|
| 17 |
+
scale_factor: 0.18215
|
| 18 |
+
use_ema: False # we set this to false because this is an inference only config
|
| 19 |
+
|
| 20 |
+
unet_config:
|
| 21 |
+
target: ldm.modules.diffusionmodules.openaimodel.UNetModel
|
| 22 |
+
params:
|
| 23 |
+
use_checkpoint: True
|
| 24 |
+
use_fp16: False
|
| 25 |
+
image_size: 32 # unused
|
| 26 |
+
in_channels: 4
|
| 27 |
+
out_channels: 4
|
| 28 |
+
model_channels: 320
|
| 29 |
+
attention_resolutions: [ 4, 2, 1 ]
|
| 30 |
+
num_res_blocks: 2
|
| 31 |
+
channel_mult: [ 1, 2, 4, 4 ]
|
| 32 |
+
num_head_channels: 64 # need to fix for flash-attn
|
| 33 |
+
use_spatial_transformer: True
|
| 34 |
+
use_linear_in_transformer: True
|
| 35 |
+
transformer_depth: 1
|
| 36 |
+
context_dim: 1024
|
| 37 |
+
legacy: False
|
| 38 |
+
|
| 39 |
+
first_stage_config:
|
| 40 |
+
target: ldm.models.autoencoder.AutoencoderKL
|
| 41 |
+
params:
|
| 42 |
+
embed_dim: 4
|
| 43 |
+
monitor: val/rec_loss
|
| 44 |
+
ddconfig:
|
| 45 |
+
#attn_type: "vanilla-xformers"
|
| 46 |
+
double_z: true
|
| 47 |
+
z_channels: 4
|
| 48 |
+
resolution: 256
|
| 49 |
+
in_channels: 3
|
| 50 |
+
out_ch: 3
|
| 51 |
+
ch: 128
|
| 52 |
+
ch_mult:
|
| 53 |
+
- 1
|
| 54 |
+
- 2
|
| 55 |
+
- 4
|
| 56 |
+
- 4
|
| 57 |
+
num_res_blocks: 2
|
| 58 |
+
attn_resolutions: []
|
| 59 |
+
dropout: 0.0
|
| 60 |
+
lossconfig:
|
| 61 |
+
target: torch.nn.Identity
|
| 62 |
+
|
| 63 |
+
cond_stage_config:
|
| 64 |
+
target: ldm.modules.encoders.modules.FrozenOpenCLIPEmbedder
|
| 65 |
+
params:
|
| 66 |
+
freeze: True
|
| 67 |
+
layer: "penultimate"
|
configs/v2-inpainting-inference.yaml
ADDED
|
@@ -0,0 +1,158 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
model:
|
| 2 |
+
base_learning_rate: 5.0e-05
|
| 3 |
+
target: ldm.models.diffusion.ddpm.LatentInpaintDiffusion
|
| 4 |
+
params:
|
| 5 |
+
linear_start: 0.00085
|
| 6 |
+
linear_end: 0.0120
|
| 7 |
+
num_timesteps_cond: 1
|
| 8 |
+
log_every_t: 200
|
| 9 |
+
timesteps: 1000
|
| 10 |
+
first_stage_key: "jpg"
|
| 11 |
+
cond_stage_key: "txt"
|
| 12 |
+
image_size: 64
|
| 13 |
+
channels: 4
|
| 14 |
+
cond_stage_trainable: false
|
| 15 |
+
conditioning_key: hybrid
|
| 16 |
+
scale_factor: 0.18215
|
| 17 |
+
monitor: val/loss_simple_ema
|
| 18 |
+
finetune_keys: null
|
| 19 |
+
use_ema: False
|
| 20 |
+
|
| 21 |
+
unet_config:
|
| 22 |
+
target: ldm.modules.diffusionmodules.openaimodel.UNetModel
|
| 23 |
+
params:
|
| 24 |
+
use_checkpoint: True
|
| 25 |
+
image_size: 32 # unused
|
| 26 |
+
in_channels: 9
|
| 27 |
+
out_channels: 4
|
| 28 |
+
model_channels: 320
|
| 29 |
+
attention_resolutions: [ 4, 2, 1 ]
|
| 30 |
+
num_res_blocks: 2
|
| 31 |
+
channel_mult: [ 1, 2, 4, 4 ]
|
| 32 |
+
num_head_channels: 64 # need to fix for flash-attn
|
| 33 |
+
use_spatial_transformer: True
|
| 34 |
+
use_linear_in_transformer: True
|
| 35 |
+
transformer_depth: 1
|
| 36 |
+
context_dim: 1024
|
| 37 |
+
legacy: False
|
| 38 |
+
|
| 39 |
+
first_stage_config:
|
| 40 |
+
target: ldm.models.autoencoder.AutoencoderKL
|
| 41 |
+
params:
|
| 42 |
+
embed_dim: 4
|
| 43 |
+
monitor: val/rec_loss
|
| 44 |
+
ddconfig:
|
| 45 |
+
#attn_type: "vanilla-xformers"
|
| 46 |
+
double_z: true
|
| 47 |
+
z_channels: 4
|
| 48 |
+
resolution: 256
|
| 49 |
+
in_channels: 3
|
| 50 |
+
out_ch: 3
|
| 51 |
+
ch: 128
|
| 52 |
+
ch_mult:
|
| 53 |
+
- 1
|
| 54 |
+
- 2
|
| 55 |
+
- 4
|
| 56 |
+
- 4
|
| 57 |
+
num_res_blocks: 2
|
| 58 |
+
attn_resolutions: [ ]
|
| 59 |
+
dropout: 0.0
|
| 60 |
+
lossconfig:
|
| 61 |
+
target: torch.nn.Identity
|
| 62 |
+
|
| 63 |
+
cond_stage_config:
|
| 64 |
+
target: ldm.modules.encoders.modules.FrozenOpenCLIPEmbedder
|
| 65 |
+
params:
|
| 66 |
+
freeze: True
|
| 67 |
+
layer: "penultimate"
|
| 68 |
+
|
| 69 |
+
|
| 70 |
+
data:
|
| 71 |
+
target: ldm.data.laion.WebDataModuleFromConfig
|
| 72 |
+
params:
|
| 73 |
+
tar_base: null # for concat as in LAION-A
|
| 74 |
+
p_unsafe_threshold: 0.1
|
| 75 |
+
filter_word_list: "data/filters.yaml"
|
| 76 |
+
max_pwatermark: 0.45
|
| 77 |
+
batch_size: 8
|
| 78 |
+
num_workers: 6
|
| 79 |
+
multinode: True
|
| 80 |
+
min_size: 512
|
| 81 |
+
train:
|
| 82 |
+
shards:
|
| 83 |
+
- "pipe:aws s3 cp s3://stability-aws/laion-a-native/part-0/{00000..18699}.tar -"
|
| 84 |
+
- "pipe:aws s3 cp s3://stability-aws/laion-a-native/part-1/{00000..18699}.tar -"
|
| 85 |
+
- "pipe:aws s3 cp s3://stability-aws/laion-a-native/part-2/{00000..18699}.tar -"
|
| 86 |
+
- "pipe:aws s3 cp s3://stability-aws/laion-a-native/part-3/{00000..18699}.tar -"
|
| 87 |
+
- "pipe:aws s3 cp s3://stability-aws/laion-a-native/part-4/{00000..18699}.tar -" #{00000-94333}.tar"
|
| 88 |
+
shuffle: 10000
|
| 89 |
+
image_key: jpg
|
| 90 |
+
image_transforms:
|
| 91 |
+
- target: torchvision.transforms.Resize
|
| 92 |
+
params:
|
| 93 |
+
size: 512
|
| 94 |
+
interpolation: 3
|
| 95 |
+
- target: torchvision.transforms.RandomCrop
|
| 96 |
+
params:
|
| 97 |
+
size: 512
|
| 98 |
+
postprocess:
|
| 99 |
+
target: ldm.data.laion.AddMask
|
| 100 |
+
params:
|
| 101 |
+
mode: "512train-large"
|
| 102 |
+
p_drop: 0.25
|
| 103 |
+
# NOTE use enough shards to avoid empty validation loops in workers
|
| 104 |
+
validation:
|
| 105 |
+
shards:
|
| 106 |
+
- "pipe:aws s3 cp s3://deep-floyd-s3/datasets/laion_cleaned-part5/{93001..94333}.tar - "
|
| 107 |
+
shuffle: 0
|
| 108 |
+
image_key: jpg
|
| 109 |
+
image_transforms:
|
| 110 |
+
- target: torchvision.transforms.Resize
|
| 111 |
+
params:
|
| 112 |
+
size: 512
|
| 113 |
+
interpolation: 3
|
| 114 |
+
- target: torchvision.transforms.CenterCrop
|
| 115 |
+
params:
|
| 116 |
+
size: 512
|
| 117 |
+
postprocess:
|
| 118 |
+
target: ldm.data.laion.AddMask
|
| 119 |
+
params:
|
| 120 |
+
mode: "512train-large"
|
| 121 |
+
p_drop: 0.25
|
| 122 |
+
|
| 123 |
+
lightning:
|
| 124 |
+
find_unused_parameters: True
|
| 125 |
+
modelcheckpoint:
|
| 126 |
+
params:
|
| 127 |
+
every_n_train_steps: 5000
|
| 128 |
+
|
| 129 |
+
callbacks:
|
| 130 |
+
metrics_over_trainsteps_checkpoint:
|
| 131 |
+
params:
|
| 132 |
+
every_n_train_steps: 10000
|
| 133 |
+
|
| 134 |
+
image_logger:
|
| 135 |
+
target: main.ImageLogger
|
| 136 |
+
params:
|
| 137 |
+
enable_autocast: False
|
| 138 |
+
disabled: False
|
| 139 |
+
batch_frequency: 1000
|
| 140 |
+
max_images: 4
|
| 141 |
+
increase_log_steps: False
|
| 142 |
+
log_first_step: False
|
| 143 |
+
log_images_kwargs:
|
| 144 |
+
use_ema_scope: False
|
| 145 |
+
inpaint: False
|
| 146 |
+
plot_progressive_rows: False
|
| 147 |
+
plot_diffusion_rows: False
|
| 148 |
+
N: 4
|
| 149 |
+
unconditional_guidance_scale: 5.0
|
| 150 |
+
unconditional_guidance_label: [""]
|
| 151 |
+
ddim_steps: 50 # todo check these out for depth2img,
|
| 152 |
+
ddim_eta: 0.0 # todo check these out for depth2img,
|
| 153 |
+
|
| 154 |
+
trainer:
|
| 155 |
+
benchmark: True
|
| 156 |
+
val_check_interval: 5000000
|
| 157 |
+
num_sanity_val_steps: 0
|
| 158 |
+
accumulate_grad_batches: 1
|
{models/controlnet β controlnet}/SDXL/controlnet-canny-sdxl-1.0/diffusion_pytorch_model_V2.safetensors
RENAMED
|
File without changes
|
{models/controlnet β controlnet}/SDXL/controlnet-union-sdxl-1.0.safetensors
RENAMED
|
File without changes
|
{models/controlnet β controlnet}/control-lora-canny-rank256.safetensors
RENAMED
|
File without changes
|
{models/controlnet β controlnet}/control-lora-depth-rank256.safetensors
RENAMED
|
File without changes
|
{models/controlnet β controlnet}/control_scribble.fp16.safetensors
RENAMED
|
File without changes
|
{models/controlnet β controlnet}/control_v11p_sd15_densepose_fp16.safetensors
RENAMED
|
File without changes
|
{models/controlnet β controlnet}/control_v11p_sd15_openpose_fp16.safetensors
RENAMED
|
File without changes
|
{models/controlnet β controlnet}/diffusion_pytorch_model.safetensors
RENAMED
|
File without changes
|
{models/controlnet β controlnet}/face_diffusion_model.safetensors
RENAMED
|
File without changes
|
{models/controlnet β controlnet}/put_controlnets_and_t2i_here
RENAMED
|
File without changes
|
{models/diffusers β diffusers}/put_diffusers_models_here
RENAMED
|
File without changes
|
{models/embeddings β embeddings}/put_embeddings_or_textual_inversion_concepts_here
RENAMED
|
File without changes
|
{models/facedetection β facedetection}/detection_Resnet50_Final.pth
RENAMED
|
File without changes
|
{models/facedetection β facedetection}/parsing_parsenet.pth
RENAMED
|
File without changes
|
{models/facedetection β facedetection}/yolov5l-face.pth
RENAMED
|
File without changes
|
{models/facerestore_models β facerestore_models}/GFPGANv1.3.pth
RENAMED
|
File without changes
|
{models/facerestore_models β facerestore_models}/GFPGANv1.4.pth
RENAMED
|
File without changes
|
{models/facerestore_models β facerestore_models}/GPEN-BFR-1024.onnx
RENAMED
|
File without changes
|
{models/facerestore_models β facerestore_models}/GPEN-BFR-2048.onnx
RENAMED
|
File without changes
|
{models/facerestore_models β facerestore_models}/GPEN-BFR-512.onnx
RENAMED
|
File without changes
|