Text-to-Image
Diffusers
TensorBoard
Safetensors
English
StableDiffusionPipeline
diffusers-training
lora
template:sd-lora
stable-diffusion-xl
stable-diffusion-xl-diffusers
Instructions to use Pramodmunje/Text-to-Image with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Pramodmunje/Text-to-Image with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("Pramodmunje/Text-to-Image") prompt = "Draw a picture of two female boxers fighting each other." image = pipe(prompt).images[0] - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
Commit ·
d1f29af
0
Parent(s):
Duplicate from ZB-Tech/Text-to-Image
Browse filesCo-authored-by: S.V.Surya Narayana Reddy <ZB-Tech@users.noreply.huggingface.co>
- .gitattributes +35 -0
- README.md +65 -0
- feature_extractor/preprocessor_config.json +20 -0
- images/example_9xsyd09gw.png +0 -0
- logs/dreambooth-lora-sd-xl/1710031259.874818/events.out.tfevents.1710031259.b29ee4b0c1b7.3240.1 +3 -0
- logs/dreambooth-lora-sd-xl/1710031259.8776615/hparams.yml +69 -0
- logs/dreambooth-lora-sd-xl/events.out.tfevents.1710031259.b29ee4b0c1b7.3240.0 +3 -0
- model_index.json +32 -0
- pytorch_lora_weights.safetensors +3 -0
- safety_checker/config.json +175 -0
- safety_checker/model.safetensors +3 -0
- safety_checker/pytorch_model.bin +3 -0
- scheduler/scheduler_config.json +12 -0
- text_encoder/config.json +25 -0
- text_encoder/model.safetensors +3 -0
- text_encoder/pytorch_model.bin +3 -0
- tokenizer/merges.txt +0 -0
- tokenizer/special_tokens_map.json +24 -0
- tokenizer/tokenizer_config.json +34 -0
- tokenizer/vocab.json +0 -0
- unet/config.json +41 -0
- unet/diffusion_pytorch_model.bin +3 -0
- unet/diffusion_pytorch_model.safetensors +3 -0
- vae/config.json +31 -0
- vae/diffusion_pytorch_model.bin +3 -0
- vae/diffusion_pytorch_model.safetensors +3 -0
.gitattributes
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: openrail++
|
| 3 |
+
library_name: diffusers
|
| 4 |
+
tags:
|
| 5 |
+
- text-to-image
|
| 6 |
+
- diffusers-training
|
| 7 |
+
- diffusers
|
| 8 |
+
- lora
|
| 9 |
+
- template:sd-lora
|
| 10 |
+
- stable-diffusion-xl
|
| 11 |
+
- stable-diffusion-xl-diffusers
|
| 12 |
+
base_model: stabilityai/stable-diffusion-xl-base-1.0
|
| 13 |
+
instance_prompt: a photo of TOK dog
|
| 14 |
+
widget:
|
| 15 |
+
- text: Draw a picture of two female boxers fighting each other.
|
| 16 |
+
output:
|
| 17 |
+
url: images/example_9xsyd09gw.png
|
| 18 |
+
datasets:
|
| 19 |
+
- ZB-Tech/DreamXL
|
| 20 |
+
language:
|
| 21 |
+
- en
|
| 22 |
+
|
| 23 |
+
---
|
| 24 |
+
|
| 25 |
+
<!-- This model card has been generated automatically according to the information the training script had access to. You
|
| 26 |
+
should probably proofread and complete it, then remove this comment. -->
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
# SDXL LoRA Fine-tuning - ZB-Tech/Text-To-Image
|
| 30 |
+
|
| 31 |
+
<Gallery />
|
| 32 |
+
|
| 33 |
+
## Model description
|
| 34 |
+
|
| 35 |
+
These are ZB-Tech/Text-to-Image LoRA adaption weights for stabilityai/stable-diffusion-xl-base-1.0.
|
| 36 |
+
|
| 37 |
+
LoRA for the text encoder was enabled: False.
|
| 38 |
+
|
| 39 |
+
Special VAE used for training: madebyollin/sdxl-vae-fp16-fix.
|
| 40 |
+
|
| 41 |
+
##### How to use
|
| 42 |
+
|
| 43 |
+
```python
|
| 44 |
+
import requests
|
| 45 |
+
|
| 46 |
+
API_URL = "https://api-inference.huggingface.co/models/ZB-Tech/Text-to-Image"
|
| 47 |
+
headers = {"Authorization": "Bearer HF_API_KEY"}
|
| 48 |
+
|
| 49 |
+
def query(payload):
|
| 50 |
+
response = requests.post(API_URL, headers=headers, json=payload)
|
| 51 |
+
return response.content
|
| 52 |
+
image_bytes = query({
|
| 53 |
+
"inputs": "Astronaut riding a horse",
|
| 54 |
+
})
|
| 55 |
+
# You can access the image with PIL.Image for example
|
| 56 |
+
import io
|
| 57 |
+
from PIL import Image
|
| 58 |
+
image = Image.open(io.BytesIO(image_bytes))
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
## Download model
|
| 62 |
+
|
| 63 |
+
Weights for this model are available in Safetensors format.
|
| 64 |
+
|
| 65 |
+
[Download](suryasuri/Surya/tree/main) them in the Files & versions tab.
|
feature_extractor/preprocessor_config.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"crop_size": 224,
|
| 3 |
+
"do_center_crop": true,
|
| 4 |
+
"do_convert_rgb": true,
|
| 5 |
+
"do_normalize": true,
|
| 6 |
+
"do_resize": true,
|
| 7 |
+
"feature_extractor_type": "CLIPFeatureExtractor",
|
| 8 |
+
"image_mean": [
|
| 9 |
+
0.48145466,
|
| 10 |
+
0.4578275,
|
| 11 |
+
0.40821073
|
| 12 |
+
],
|
| 13 |
+
"image_std": [
|
| 14 |
+
0.26862954,
|
| 15 |
+
0.26130258,
|
| 16 |
+
0.27577711
|
| 17 |
+
],
|
| 18 |
+
"resample": 3,
|
| 19 |
+
"size": 224
|
| 20 |
+
}
|
images/example_9xsyd09gw.png
ADDED
|
logs/dreambooth-lora-sd-xl/1710031259.874818/events.out.tfevents.1710031259.b29ee4b0c1b7.3240.1
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cd110227214c549a45cc43c9e8d783d07c9496e25264ab3a232ce7b034b6dd28
|
| 3 |
+
size 3240
|
logs/dreambooth-lora-sd-xl/1710031259.8776615/hparams.yml
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
adam_beta1: 0.9
|
| 2 |
+
adam_beta2: 0.999
|
| 3 |
+
adam_epsilon: 1.0e-08
|
| 4 |
+
adam_weight_decay: 0.0001
|
| 5 |
+
adam_weight_decay_text_encoder: 0.001
|
| 6 |
+
allow_tf32: false
|
| 7 |
+
cache_dir: null
|
| 8 |
+
caption_column: prompt
|
| 9 |
+
center_crop: false
|
| 10 |
+
checkpointing_steps: 717
|
| 11 |
+
checkpoints_total_limit: null
|
| 12 |
+
class_data_dir: null
|
| 13 |
+
class_prompt: null
|
| 14 |
+
dataloader_num_workers: 0
|
| 15 |
+
dataset_config_name: null
|
| 16 |
+
dataset_name: surya
|
| 17 |
+
do_edm_style_training: false
|
| 18 |
+
enable_xformers_memory_efficient_attention: false
|
| 19 |
+
gradient_accumulation_steps: 3
|
| 20 |
+
gradient_checkpointing: true
|
| 21 |
+
hub_model_id: null
|
| 22 |
+
hub_token: null
|
| 23 |
+
image_column: image
|
| 24 |
+
instance_data_dir: null
|
| 25 |
+
instance_prompt: a photo of SVSNR surya person
|
| 26 |
+
learning_rate: 0.0001
|
| 27 |
+
local_rank: -1
|
| 28 |
+
logging_dir: logs
|
| 29 |
+
lr_num_cycles: 1
|
| 30 |
+
lr_power: 1.0
|
| 31 |
+
lr_scheduler: constant
|
| 32 |
+
lr_warmup_steps: 0
|
| 33 |
+
max_grad_norm: 1.0
|
| 34 |
+
max_train_steps: 500
|
| 35 |
+
mixed_precision: fp16
|
| 36 |
+
num_class_images: 100
|
| 37 |
+
num_train_epochs: 250
|
| 38 |
+
num_validation_images: 4
|
| 39 |
+
optimizer: AdamW
|
| 40 |
+
output_dir: Surya
|
| 41 |
+
pretrained_model_name_or_path: stabilityai/stable-diffusion-xl-base-1.0
|
| 42 |
+
pretrained_vae_model_name_or_path: madebyollin/sdxl-vae-fp16-fix
|
| 43 |
+
prior_generation_precision: null
|
| 44 |
+
prior_loss_weight: 1.0
|
| 45 |
+
prodigy_beta3: null
|
| 46 |
+
prodigy_decouple: true
|
| 47 |
+
prodigy_safeguard_warmup: true
|
| 48 |
+
prodigy_use_bias_correction: true
|
| 49 |
+
push_to_hub: false
|
| 50 |
+
random_flip: false
|
| 51 |
+
rank: 4
|
| 52 |
+
repeats: 1
|
| 53 |
+
report_to: tensorboard
|
| 54 |
+
resolution: 1024
|
| 55 |
+
resume_from_checkpoint: null
|
| 56 |
+
revision: null
|
| 57 |
+
sample_batch_size: 4
|
| 58 |
+
scale_lr: false
|
| 59 |
+
seed: 0
|
| 60 |
+
snr_gamma: 5.0
|
| 61 |
+
text_encoder_lr: 5.0e-06
|
| 62 |
+
train_batch_size: 1
|
| 63 |
+
train_text_encoder: false
|
| 64 |
+
use_8bit_adam: true
|
| 65 |
+
use_dora: false
|
| 66 |
+
validation_epochs: 50
|
| 67 |
+
validation_prompt: null
|
| 68 |
+
variant: null
|
| 69 |
+
with_prior_preservation: false
|
logs/dreambooth-lora-sd-xl/events.out.tfevents.1710031259.b29ee4b0c1b7.3240.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:71e61ae6e68c80c953ce5f4c97a9b3da87c9621b3da4418f2036692cd458151f
|
| 3 |
+
size 104442
|
model_index.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "StableDiffusionPipeline",
|
| 3 |
+
"_diffusers_version": "0.6.0",
|
| 4 |
+
"feature_extractor": [
|
| 5 |
+
"transformers",
|
| 6 |
+
"CLIPImageProcessor"
|
| 7 |
+
],
|
| 8 |
+
"safety_checker": [
|
| 9 |
+
"stable_diffusion",
|
| 10 |
+
"StableDiffusionSafetyChecker"
|
| 11 |
+
],
|
| 12 |
+
"scheduler": [
|
| 13 |
+
"diffusers",
|
| 14 |
+
"PNDMScheduler"
|
| 15 |
+
],
|
| 16 |
+
"text_encoder": [
|
| 17 |
+
"transformers",
|
| 18 |
+
"CLIPTextModel"
|
| 19 |
+
],
|
| 20 |
+
"tokenizer": [
|
| 21 |
+
"transformers",
|
| 22 |
+
"CLIPTokenizer"
|
| 23 |
+
],
|
| 24 |
+
"unet": [
|
| 25 |
+
"diffusers",
|
| 26 |
+
"UNet2DConditionModel"
|
| 27 |
+
],
|
| 28 |
+
"vae": [
|
| 29 |
+
"diffusers",
|
| 30 |
+
"AutoencoderKL"
|
| 31 |
+
]
|
| 32 |
+
}
|
pytorch_lora_weights.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2adc203222c443853277184b0298f8466548f01ddbe1066f365ed92672a290f3
|
| 3 |
+
size 457583316
|
safety_checker/config.json
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_commit_hash": "4bb648a606ef040e7685bde262611766a5fdd67b",
|
| 3 |
+
"_name_or_path": "CompVis/stable-diffusion-safety-checker",
|
| 4 |
+
"architectures": [
|
| 5 |
+
"StableDiffusionSafetyChecker"
|
| 6 |
+
],
|
| 7 |
+
"initializer_factor": 1.0,
|
| 8 |
+
"logit_scale_init_value": 2.6592,
|
| 9 |
+
"model_type": "clip",
|
| 10 |
+
"projection_dim": 768,
|
| 11 |
+
"text_config": {
|
| 12 |
+
"_name_or_path": "",
|
| 13 |
+
"add_cross_attention": false,
|
| 14 |
+
"architectures": null,
|
| 15 |
+
"attention_dropout": 0.0,
|
| 16 |
+
"bad_words_ids": null,
|
| 17 |
+
"bos_token_id": 0,
|
| 18 |
+
"chunk_size_feed_forward": 0,
|
| 19 |
+
"cross_attention_hidden_size": null,
|
| 20 |
+
"decoder_start_token_id": null,
|
| 21 |
+
"diversity_penalty": 0.0,
|
| 22 |
+
"do_sample": false,
|
| 23 |
+
"dropout": 0.0,
|
| 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": "quick_gelu",
|
| 32 |
+
"hidden_size": 768,
|
| 33 |
+
"id2label": {
|
| 34 |
+
"0": "LABEL_0",
|
| 35 |
+
"1": "LABEL_1"
|
| 36 |
+
},
|
| 37 |
+
"initializer_factor": 1.0,
|
| 38 |
+
"initializer_range": 0.02,
|
| 39 |
+
"intermediate_size": 3072,
|
| 40 |
+
"is_decoder": false,
|
| 41 |
+
"is_encoder_decoder": false,
|
| 42 |
+
"label2id": {
|
| 43 |
+
"LABEL_0": 0,
|
| 44 |
+
"LABEL_1": 1
|
| 45 |
+
},
|
| 46 |
+
"layer_norm_eps": 1e-05,
|
| 47 |
+
"length_penalty": 1.0,
|
| 48 |
+
"max_length": 20,
|
| 49 |
+
"max_position_embeddings": 77,
|
| 50 |
+
"min_length": 0,
|
| 51 |
+
"model_type": "clip_text_model",
|
| 52 |
+
"no_repeat_ngram_size": 0,
|
| 53 |
+
"num_attention_heads": 12,
|
| 54 |
+
"num_beam_groups": 1,
|
| 55 |
+
"num_beams": 1,
|
| 56 |
+
"num_hidden_layers": 12,
|
| 57 |
+
"num_return_sequences": 1,
|
| 58 |
+
"output_attentions": false,
|
| 59 |
+
"output_hidden_states": false,
|
| 60 |
+
"output_scores": false,
|
| 61 |
+
"pad_token_id": 1,
|
| 62 |
+
"prefix": null,
|
| 63 |
+
"problem_type": null,
|
| 64 |
+
"pruned_heads": {},
|
| 65 |
+
"remove_invalid_values": false,
|
| 66 |
+
"repetition_penalty": 1.0,
|
| 67 |
+
"return_dict": true,
|
| 68 |
+
"return_dict_in_generate": false,
|
| 69 |
+
"sep_token_id": null,
|
| 70 |
+
"task_specific_params": null,
|
| 71 |
+
"temperature": 1.0,
|
| 72 |
+
"tf_legacy_loss": false,
|
| 73 |
+
"tie_encoder_decoder": false,
|
| 74 |
+
"tie_word_embeddings": true,
|
| 75 |
+
"tokenizer_class": null,
|
| 76 |
+
"top_k": 50,
|
| 77 |
+
"top_p": 1.0,
|
| 78 |
+
"torch_dtype": null,
|
| 79 |
+
"torchscript": false,
|
| 80 |
+
"transformers_version": "4.22.0.dev0",
|
| 81 |
+
"typical_p": 1.0,
|
| 82 |
+
"use_bfloat16": false,
|
| 83 |
+
"vocab_size": 49408
|
| 84 |
+
},
|
| 85 |
+
"text_config_dict": {
|
| 86 |
+
"hidden_size": 768,
|
| 87 |
+
"intermediate_size": 3072,
|
| 88 |
+
"num_attention_heads": 12,
|
| 89 |
+
"num_hidden_layers": 12
|
| 90 |
+
},
|
| 91 |
+
"torch_dtype": "float32",
|
| 92 |
+
"transformers_version": null,
|
| 93 |
+
"vision_config": {
|
| 94 |
+
"_name_or_path": "",
|
| 95 |
+
"add_cross_attention": false,
|
| 96 |
+
"architectures": null,
|
| 97 |
+
"attention_dropout": 0.0,
|
| 98 |
+
"bad_words_ids": null,
|
| 99 |
+
"bos_token_id": null,
|
| 100 |
+
"chunk_size_feed_forward": 0,
|
| 101 |
+
"cross_attention_hidden_size": null,
|
| 102 |
+
"decoder_start_token_id": null,
|
| 103 |
+
"diversity_penalty": 0.0,
|
| 104 |
+
"do_sample": false,
|
| 105 |
+
"dropout": 0.0,
|
| 106 |
+
"early_stopping": false,
|
| 107 |
+
"encoder_no_repeat_ngram_size": 0,
|
| 108 |
+
"eos_token_id": null,
|
| 109 |
+
"exponential_decay_length_penalty": null,
|
| 110 |
+
"finetuning_task": null,
|
| 111 |
+
"forced_bos_token_id": null,
|
| 112 |
+
"forced_eos_token_id": null,
|
| 113 |
+
"hidden_act": "quick_gelu",
|
| 114 |
+
"hidden_size": 1024,
|
| 115 |
+
"id2label": {
|
| 116 |
+
"0": "LABEL_0",
|
| 117 |
+
"1": "LABEL_1"
|
| 118 |
+
},
|
| 119 |
+
"image_size": 224,
|
| 120 |
+
"initializer_factor": 1.0,
|
| 121 |
+
"initializer_range": 0.02,
|
| 122 |
+
"intermediate_size": 4096,
|
| 123 |
+
"is_decoder": false,
|
| 124 |
+
"is_encoder_decoder": false,
|
| 125 |
+
"label2id": {
|
| 126 |
+
"LABEL_0": 0,
|
| 127 |
+
"LABEL_1": 1
|
| 128 |
+
},
|
| 129 |
+
"layer_norm_eps": 1e-05,
|
| 130 |
+
"length_penalty": 1.0,
|
| 131 |
+
"max_length": 20,
|
| 132 |
+
"min_length": 0,
|
| 133 |
+
"model_type": "clip_vision_model",
|
| 134 |
+
"no_repeat_ngram_size": 0,
|
| 135 |
+
"num_attention_heads": 16,
|
| 136 |
+
"num_beam_groups": 1,
|
| 137 |
+
"num_beams": 1,
|
| 138 |
+
"num_channels": 3,
|
| 139 |
+
"num_hidden_layers": 24,
|
| 140 |
+
"num_return_sequences": 1,
|
| 141 |
+
"output_attentions": false,
|
| 142 |
+
"output_hidden_states": false,
|
| 143 |
+
"output_scores": false,
|
| 144 |
+
"pad_token_id": null,
|
| 145 |
+
"patch_size": 14,
|
| 146 |
+
"prefix": null,
|
| 147 |
+
"problem_type": null,
|
| 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 |
+
"task_specific_params": null,
|
| 155 |
+
"temperature": 1.0,
|
| 156 |
+
"tf_legacy_loss": false,
|
| 157 |
+
"tie_encoder_decoder": false,
|
| 158 |
+
"tie_word_embeddings": true,
|
| 159 |
+
"tokenizer_class": null,
|
| 160 |
+
"top_k": 50,
|
| 161 |
+
"top_p": 1.0,
|
| 162 |
+
"torch_dtype": null,
|
| 163 |
+
"torchscript": false,
|
| 164 |
+
"transformers_version": "4.22.0.dev0",
|
| 165 |
+
"typical_p": 1.0,
|
| 166 |
+
"use_bfloat16": false
|
| 167 |
+
},
|
| 168 |
+
"vision_config_dict": {
|
| 169 |
+
"hidden_size": 1024,
|
| 170 |
+
"intermediate_size": 4096,
|
| 171 |
+
"num_attention_heads": 16,
|
| 172 |
+
"num_hidden_layers": 24,
|
| 173 |
+
"patch_size": 14
|
| 174 |
+
}
|
| 175 |
+
}
|
safety_checker/model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4666d0f9b718a6ed165ce95b8aac0d3d78031b8906fdc88ca8e735af5261788c
|
| 3 |
+
size 1215981833
|
safety_checker/pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:193490b58ef62739077262e833bf091c66c29488058681ac25cf7df3d8190974
|
| 3 |
+
size 1216061799
|
scheduler/scheduler_config.json
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "PNDMScheduler",
|
| 3 |
+
"_diffusers_version": "0.9.0.dev0",
|
| 4 |
+
"beta_end": 0.012,
|
| 5 |
+
"beta_schedule": "scaled_linear",
|
| 6 |
+
"beta_start": 0.00085,
|
| 7 |
+
"num_train_timesteps": 1000,
|
| 8 |
+
"set_alpha_to_one": false,
|
| 9 |
+
"skip_prk_steps": true,
|
| 10 |
+
"steps_offset": 1,
|
| 11 |
+
"trained_betas": null
|
| 12 |
+
}
|
text_encoder/config.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "/content/models/TEXT_TO_IMAGE",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"CLIPTextModel"
|
| 5 |
+
],
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"bos_token_id": 0,
|
| 8 |
+
"dropout": 0.0,
|
| 9 |
+
"eos_token_id": 2,
|
| 10 |
+
"hidden_act": "quick_gelu",
|
| 11 |
+
"hidden_size": 768,
|
| 12 |
+
"initializer_factor": 1.0,
|
| 13 |
+
"initializer_range": 0.02,
|
| 14 |
+
"intermediate_size": 3072,
|
| 15 |
+
"layer_norm_eps": 1e-05,
|
| 16 |
+
"max_position_embeddings": 77,
|
| 17 |
+
"model_type": "clip_text_model",
|
| 18 |
+
"num_attention_heads": 12,
|
| 19 |
+
"num_hidden_layers": 12,
|
| 20 |
+
"pad_token_id": 1,
|
| 21 |
+
"projection_dim": 768,
|
| 22 |
+
"torch_dtype": "float16",
|
| 23 |
+
"transformers_version": "4.24.0",
|
| 24 |
+
"vocab_size": 49408
|
| 25 |
+
}
|
text_encoder/model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:36610164b0ffb11b1900972cee958c0e6db6eb865e73eafbb058041fd03add5e
|
| 3 |
+
size 246144867
|
text_encoder/pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:00f74197016019a736df3be12c32d4999f3055b6e759b6a7495f27c029da2d62
|
| 3 |
+
size 246188833
|
tokenizer/merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer/special_tokens_map.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": {
|
| 3 |
+
"content": "<|startoftext|>",
|
| 4 |
+
"lstrip": false,
|
| 5 |
+
"normalized": true,
|
| 6 |
+
"rstrip": false,
|
| 7 |
+
"single_word": false
|
| 8 |
+
},
|
| 9 |
+
"eos_token": {
|
| 10 |
+
"content": "<|endoftext|>",
|
| 11 |
+
"lstrip": false,
|
| 12 |
+
"normalized": true,
|
| 13 |
+
"rstrip": false,
|
| 14 |
+
"single_word": false
|
| 15 |
+
},
|
| 16 |
+
"pad_token": "<|endoftext|>",
|
| 17 |
+
"unk_token": {
|
| 18 |
+
"content": "<|endoftext|>",
|
| 19 |
+
"lstrip": false,
|
| 20 |
+
"normalized": true,
|
| 21 |
+
"rstrip": false,
|
| 22 |
+
"single_word": false
|
| 23 |
+
}
|
| 24 |
+
}
|
tokenizer/tokenizer_config.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"bos_token": {
|
| 4 |
+
"__type": "AddedToken",
|
| 5 |
+
"content": "<|startoftext|>",
|
| 6 |
+
"lstrip": false,
|
| 7 |
+
"normalized": true,
|
| 8 |
+
"rstrip": false,
|
| 9 |
+
"single_word": false
|
| 10 |
+
},
|
| 11 |
+
"do_lower_case": true,
|
| 12 |
+
"eos_token": {
|
| 13 |
+
"__type": "AddedToken",
|
| 14 |
+
"content": "<|endoftext|>",
|
| 15 |
+
"lstrip": false,
|
| 16 |
+
"normalized": true,
|
| 17 |
+
"rstrip": false,
|
| 18 |
+
"single_word": false
|
| 19 |
+
},
|
| 20 |
+
"errors": "replace",
|
| 21 |
+
"model_max_length": 77,
|
| 22 |
+
"name_or_path": "/content/stable-diffusion-v1-5/tokenizer",
|
| 23 |
+
"pad_token": "<|endoftext|>",
|
| 24 |
+
"special_tokens_map_file": "./special_tokens_map.json",
|
| 25 |
+
"tokenizer_class": "CLIPTokenizer",
|
| 26 |
+
"unk_token": {
|
| 27 |
+
"__type": "AddedToken",
|
| 28 |
+
"content": "<|endoftext|>",
|
| 29 |
+
"lstrip": false,
|
| 30 |
+
"normalized": true,
|
| 31 |
+
"rstrip": false,
|
| 32 |
+
"single_word": false
|
| 33 |
+
}
|
| 34 |
+
}
|
tokenizer/vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
unet/config.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "UNet2DConditionModel",
|
| 3 |
+
"_diffusers_version": "0.9.0.dev0",
|
| 4 |
+
"_name_or_path": "/content/stable-diffusion-v1-5",
|
| 5 |
+
"act_fn": "silu",
|
| 6 |
+
"attention_head_dim": 8,
|
| 7 |
+
"block_out_channels": [
|
| 8 |
+
320,
|
| 9 |
+
640,
|
| 10 |
+
1280,
|
| 11 |
+
1280
|
| 12 |
+
],
|
| 13 |
+
"center_input_sample": false,
|
| 14 |
+
"cross_attention_dim": 768,
|
| 15 |
+
"down_block_types": [
|
| 16 |
+
"CrossAttnDownBlock2D",
|
| 17 |
+
"CrossAttnDownBlock2D",
|
| 18 |
+
"CrossAttnDownBlock2D",
|
| 19 |
+
"DownBlock2D"
|
| 20 |
+
],
|
| 21 |
+
"downsample_padding": 1,
|
| 22 |
+
"dual_cross_attention": false,
|
| 23 |
+
"flip_sin_to_cos": true,
|
| 24 |
+
"freq_shift": 0,
|
| 25 |
+
"in_channels": 4,
|
| 26 |
+
"layers_per_block": 2,
|
| 27 |
+
"mid_block_scale_factor": 1,
|
| 28 |
+
"norm_eps": 1e-05,
|
| 29 |
+
"norm_num_groups": 32,
|
| 30 |
+
"num_class_embeds": null,
|
| 31 |
+
"only_cross_attention": false,
|
| 32 |
+
"out_channels": 4,
|
| 33 |
+
"sample_size": 64,
|
| 34 |
+
"up_block_types": [
|
| 35 |
+
"UpBlock2D",
|
| 36 |
+
"CrossAttnUpBlock2D",
|
| 37 |
+
"CrossAttnUpBlock2D",
|
| 38 |
+
"CrossAttnUpBlock2D"
|
| 39 |
+
],
|
| 40 |
+
"use_linear_projection": false
|
| 41 |
+
}
|
unet/diffusion_pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3d435266ae9edf6fb85882f7eb08dbd1b9d94399b28e79edc964e3ddb63348ba
|
| 3 |
+
size 3438375973
|
unet/diffusion_pytorch_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:386ee121042289b98e2c2eaf74ee01a4533f1e595c619ea8c3abaf74ca15d682
|
| 3 |
+
size 3438167534
|
vae/config.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "AutoencoderKL",
|
| 3 |
+
"_diffusers_version": "0.9.0.dev0",
|
| 4 |
+
"_name_or_path": "/content/stable-diffusion-v1-5/vae",
|
| 5 |
+
"act_fn": "silu",
|
| 6 |
+
"block_out_channels": [
|
| 7 |
+
128,
|
| 8 |
+
256,
|
| 9 |
+
512,
|
| 10 |
+
512
|
| 11 |
+
],
|
| 12 |
+
"down_block_types": [
|
| 13 |
+
"DownEncoderBlock2D",
|
| 14 |
+
"DownEncoderBlock2D",
|
| 15 |
+
"DownEncoderBlock2D",
|
| 16 |
+
"DownEncoderBlock2D"
|
| 17 |
+
],
|
| 18 |
+
"in_channels": 3,
|
| 19 |
+
"latent_channels": 4,
|
| 20 |
+
"layers_per_block": 2,
|
| 21 |
+
"norm_num_groups": 32,
|
| 22 |
+
"out_channels": 3,
|
| 23 |
+
"sample_size": 512,
|
| 24 |
+
"scaling_factor": 0.18215,
|
| 25 |
+
"up_block_types": [
|
| 26 |
+
"UpDecoderBlock2D",
|
| 27 |
+
"UpDecoderBlock2D",
|
| 28 |
+
"UpDecoderBlock2D",
|
| 29 |
+
"UpDecoderBlock2D"
|
| 30 |
+
]
|
| 31 |
+
}
|
vae/diffusion_pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:36bb8e1b54aba3a0914eb35fba13dcb107e9f18d379d1df2158732cd4bf56a94
|
| 3 |
+
size 334711857
|
vae/diffusion_pytorch_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a1d993488569e928462932c8c38a0760b874d166399b14414135bd9c42df5815
|
| 3 |
+
size 334643276
|