adhikjoshi
commited on
Commit
•
80038a6
1
Parent(s):
4a54db2
converted using stablediffusionapi.com
Browse files- README.md +9 -11
- feature_extractor/preprocessor_config.json +17 -1
- model_index.json +5 -1
- safety_checker/config.json +2 -2
- safety_checker/model.safetensors +3 -0
- scheduler/scheduler_config.json +1 -1
- text_encoder/config.json +2 -2
- text_encoder/model.safetensors +3 -0
- tokenizer/special_tokens_map.json +9 -3
- tokenizer/tokenizer_config.json +20 -23
- unet/config.json +2 -1
- unet/diffusion_pytorch_model.safetensors +3 -0
- vae/config.json +7 -2
- vae/diffusion_pytorch_model.safetensors +3 -0
README.md
CHANGED
@@ -1,36 +1,34 @@
|
|
1 |
---
|
2 |
license: creativeml-openrail-m
|
3 |
tags:
|
4 |
-
-
|
5 |
- stable-diffusion-api
|
6 |
- text-to-image
|
7 |
- ultra-realistic
|
8 |
pinned: true
|
9 |
---
|
10 |
|
11 |
-
#
|
12 |
|
13 |
-
![generated from
|
14 |
## Get API Key
|
15 |
|
16 |
-
Get API key from [
|
17 |
|
18 |
Replace Key in below code, change **model_id** to "anylora"
|
19 |
|
20 |
-
Coding in PHP/Node/Java etc? Have a look at docs for more code examples: [View docs](https://
|
21 |
|
22 |
-
Try model for free: [Generate Images](https://
|
23 |
|
24 |
-
Model link: [View model](https://
|
25 |
|
26 |
-
|
27 |
-
|
28 |
-
View all models: [View Models](https://stablediffusionapi.com/models)
|
29 |
|
30 |
import requests
|
31 |
import json
|
32 |
|
33 |
-
url = "https://
|
34 |
|
35 |
payload = json.dumps({
|
36 |
"key": "your_api_key",
|
|
|
1 |
---
|
2 |
license: creativeml-openrail-m
|
3 |
tags:
|
4 |
+
- modelslab.com
|
5 |
- stable-diffusion-api
|
6 |
- text-to-image
|
7 |
- ultra-realistic
|
8 |
pinned: true
|
9 |
---
|
10 |
|
11 |
+
# AnyLoRA API Inference
|
12 |
|
13 |
+
![generated from modelslab.com](https://pub-3626123a908346a7a8be8d9295f44e26.r2.dev/generations/16628776491722517765.png)
|
14 |
## Get API Key
|
15 |
|
16 |
+
Get API key from [ModelsLab API](http://modelslab.com), No Payment needed.
|
17 |
|
18 |
Replace Key in below code, change **model_id** to "anylora"
|
19 |
|
20 |
+
Coding in PHP/Node/Java etc? Have a look at docs for more code examples: [View docs](https://docs.modelslab.com)
|
21 |
|
22 |
+
Try model for free: [Generate Images](https://modelslab.com/models/anylora)
|
23 |
|
24 |
+
Model link: [View model](https://modelslab.com/models/anylora)
|
25 |
|
26 |
+
View all models: [View Models](https://modelslab.com/models)
|
|
|
|
|
27 |
|
28 |
import requests
|
29 |
import json
|
30 |
|
31 |
+
url = "https://modelslab.com/api/v6/images/text2img"
|
32 |
|
33 |
payload = json.dumps({
|
34 |
"key": "your_api_key",
|
feature_extractor/preprocessor_config.json
CHANGED
@@ -1,4 +1,21 @@
|
|
1 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
"crop_size": {
|
3 |
"height": 224,
|
4 |
"width": 224
|
@@ -8,7 +25,6 @@
|
|
8 |
"do_normalize": true,
|
9 |
"do_rescale": true,
|
10 |
"do_resize": true,
|
11 |
-
"feature_extractor_type": "CLIPFeatureExtractor",
|
12 |
"image_mean": [
|
13 |
0.48145466,
|
14 |
0.4578275,
|
|
|
1 |
{
|
2 |
+
"_valid_processor_keys": [
|
3 |
+
"images",
|
4 |
+
"do_resize",
|
5 |
+
"size",
|
6 |
+
"resample",
|
7 |
+
"do_center_crop",
|
8 |
+
"crop_size",
|
9 |
+
"do_rescale",
|
10 |
+
"rescale_factor",
|
11 |
+
"do_normalize",
|
12 |
+
"image_mean",
|
13 |
+
"image_std",
|
14 |
+
"do_convert_rgb",
|
15 |
+
"return_tensors",
|
16 |
+
"data_format",
|
17 |
+
"input_data_format"
|
18 |
+
],
|
19 |
"crop_size": {
|
20 |
"height": 224,
|
21 |
"width": 224
|
|
|
25 |
"do_normalize": true,
|
26 |
"do_rescale": true,
|
27 |
"do_resize": true,
|
|
|
28 |
"image_mean": [
|
29 |
0.48145466,
|
30 |
0.4578275,
|
model_index.json
CHANGED
@@ -1,10 +1,14 @@
|
|
1 |
{
|
2 |
"_class_name": "StableDiffusionPipeline",
|
3 |
-
"_diffusers_version": "0.
|
4 |
"feature_extractor": [
|
5 |
"transformers",
|
6 |
"CLIPFeatureExtractor"
|
7 |
],
|
|
|
|
|
|
|
|
|
8 |
"requires_safety_checker": true,
|
9 |
"safety_checker": [
|
10 |
"stable_diffusion",
|
|
|
1 |
{
|
2 |
"_class_name": "StableDiffusionPipeline",
|
3 |
+
"_diffusers_version": "0.29.0.dev0",
|
4 |
"feature_extractor": [
|
5 |
"transformers",
|
6 |
"CLIPFeatureExtractor"
|
7 |
],
|
8 |
+
"image_encoder": [
|
9 |
+
null,
|
10 |
+
null
|
11 |
+
],
|
12 |
"requires_safety_checker": true,
|
13 |
"safety_checker": [
|
14 |
"stable_diffusion",
|
safety_checker/config.json
CHANGED
@@ -14,8 +14,8 @@
|
|
14 |
"model_type": "clip_text_model",
|
15 |
"num_attention_heads": 12
|
16 |
},
|
17 |
-
"torch_dtype": "
|
18 |
-
"transformers_version": "4.
|
19 |
"vision_config": {
|
20 |
"dropout": 0.0,
|
21 |
"hidden_size": 1024,
|
|
|
14 |
"model_type": "clip_text_model",
|
15 |
"num_attention_heads": 12
|
16 |
},
|
17 |
+
"torch_dtype": "float32",
|
18 |
+
"transformers_version": "4.41.2",
|
19 |
"vision_config": {
|
20 |
"dropout": 0.0,
|
21 |
"hidden_size": 1024,
|
safety_checker/model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:fb351a5ded815c3ff744968ad9c6b218d071b9d313d04f35e813b84b4c0ffde8
|
3 |
+
size 1215979664
|
scheduler/scheduler_config.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
{
|
2 |
"_class_name": "PNDMScheduler",
|
3 |
-
"_diffusers_version": "0.
|
4 |
"beta_end": 0.012,
|
5 |
"beta_schedule": "scaled_linear",
|
6 |
"beta_start": 0.00085,
|
|
|
1 |
{
|
2 |
"_class_name": "PNDMScheduler",
|
3 |
+
"_diffusers_version": "0.29.0.dev0",
|
4 |
"beta_end": 0.012,
|
5 |
"beta_schedule": "scaled_linear",
|
6 |
"beta_start": 0.00085,
|
text_encoder/config.json
CHANGED
@@ -18,7 +18,7 @@
|
|
18 |
"num_hidden_layers": 12,
|
19 |
"pad_token_id": 1,
|
20 |
"projection_dim": 768,
|
21 |
-
"torch_dtype": "
|
22 |
-
"transformers_version": "4.
|
23 |
"vocab_size": 49408
|
24 |
}
|
|
|
18 |
"num_hidden_layers": 12,
|
19 |
"pad_token_id": 1,
|
20 |
"projection_dim": 768,
|
21 |
+
"torch_dtype": "float32",
|
22 |
+
"transformers_version": "4.41.2",
|
23 |
"vocab_size": 49408
|
24 |
}
|
text_encoder/model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a1f72ef5c3438d3cf74f69685e5678076b4a2bc43f69b3bd26b7bdbd3ca355bb
|
3 |
+
size 492265168
|
tokenizer/special_tokens_map.json
CHANGED
@@ -9,15 +9,21 @@
|
|
9 |
"eos_token": {
|
10 |
"content": "<|endoftext|>",
|
11 |
"lstrip": false,
|
12 |
-
"normalized":
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
"rstrip": false,
|
14 |
"single_word": false
|
15 |
},
|
16 |
-
"pad_token": "<|endoftext|>",
|
17 |
"unk_token": {
|
18 |
"content": "<|endoftext|>",
|
19 |
"lstrip": false,
|
20 |
-
"normalized":
|
21 |
"rstrip": false,
|
22 |
"single_word": false
|
23 |
}
|
|
|
9 |
"eos_token": {
|
10 |
"content": "<|endoftext|>",
|
11 |
"lstrip": false,
|
12 |
+
"normalized": false,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"pad_token": {
|
17 |
+
"content": "<|endoftext|>",
|
18 |
+
"lstrip": false,
|
19 |
+
"normalized": false,
|
20 |
"rstrip": false,
|
21 |
"single_word": false
|
22 |
},
|
|
|
23 |
"unk_token": {
|
24 |
"content": "<|endoftext|>",
|
25 |
"lstrip": false,
|
26 |
+
"normalized": false,
|
27 |
"rstrip": false,
|
28 |
"single_word": false
|
29 |
}
|
tokenizer/tokenizer_config.json
CHANGED
@@ -1,33 +1,30 @@
|
|
1 |
{
|
2 |
"add_prefix_space": false,
|
3 |
-
"
|
4 |
-
"
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
},
|
|
|
11 |
"clean_up_tokenization_spaces": true,
|
12 |
"do_lower_case": true,
|
13 |
-
"eos_token":
|
14 |
-
"__type": "AddedToken",
|
15 |
-
"content": "<|endoftext|>",
|
16 |
-
"lstrip": false,
|
17 |
-
"normalized": true,
|
18 |
-
"rstrip": false,
|
19 |
-
"single_word": false
|
20 |
-
},
|
21 |
"errors": "replace",
|
22 |
"model_max_length": 77,
|
23 |
"pad_token": "<|endoftext|>",
|
24 |
"tokenizer_class": "CLIPTokenizer",
|
25 |
-
"unk_token":
|
26 |
-
"__type": "AddedToken",
|
27 |
-
"content": "<|endoftext|>",
|
28 |
-
"lstrip": false,
|
29 |
-
"normalized": true,
|
30 |
-
"rstrip": false,
|
31 |
-
"single_word": false
|
32 |
-
}
|
33 |
}
|
|
|
1 |
{
|
2 |
"add_prefix_space": false,
|
3 |
+
"added_tokens_decoder": {
|
4 |
+
"49406": {
|
5 |
+
"content": "<|startoftext|>",
|
6 |
+
"lstrip": false,
|
7 |
+
"normalized": true,
|
8 |
+
"rstrip": false,
|
9 |
+
"single_word": false,
|
10 |
+
"special": true
|
11 |
+
},
|
12 |
+
"49407": {
|
13 |
+
"content": "<|endoftext|>",
|
14 |
+
"lstrip": false,
|
15 |
+
"normalized": false,
|
16 |
+
"rstrip": false,
|
17 |
+
"single_word": false,
|
18 |
+
"special": true
|
19 |
+
}
|
20 |
},
|
21 |
+
"bos_token": "<|startoftext|>",
|
22 |
"clean_up_tokenization_spaces": true,
|
23 |
"do_lower_case": true,
|
24 |
+
"eos_token": "<|endoftext|>",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
"errors": "replace",
|
26 |
"model_max_length": 77,
|
27 |
"pad_token": "<|endoftext|>",
|
28 |
"tokenizer_class": "CLIPTokenizer",
|
29 |
+
"unk_token": "<|endoftext|>"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
}
|
unet/config.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
{
|
2 |
"_class_name": "UNet2DConditionModel",
|
3 |
-
"_diffusers_version": "0.
|
4 |
"act_fn": "silu",
|
5 |
"addition_embed_type": null,
|
6 |
"addition_embed_type_num_heads": 64,
|
@@ -48,6 +48,7 @@
|
|
48 |
"resnet_out_scale_factor": 1.0,
|
49 |
"resnet_skip_time_act": false,
|
50 |
"resnet_time_scale_shift": "default",
|
|
|
51 |
"sample_size": 64,
|
52 |
"time_cond_proj_dim": null,
|
53 |
"time_embedding_act_fn": null,
|
|
|
1 |
{
|
2 |
"_class_name": "UNet2DConditionModel",
|
3 |
+
"_diffusers_version": "0.29.0.dev0",
|
4 |
"act_fn": "silu",
|
5 |
"addition_embed_type": null,
|
6 |
"addition_embed_type_num_heads": 64,
|
|
|
48 |
"resnet_out_scale_factor": 1.0,
|
49 |
"resnet_skip_time_act": false,
|
50 |
"resnet_time_scale_shift": "default",
|
51 |
+
"reverse_transformer_layers_per_block": null,
|
52 |
"sample_size": 64,
|
53 |
"time_cond_proj_dim": null,
|
54 |
"time_embedding_act_fn": null,
|
unet/diffusion_pytorch_model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4e04382be0917c5ddbe115ddaf4fce39b64e77899aacf5970b87bfcb32618686
|
3 |
+
size 3438167536
|
vae/config.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
{
|
2 |
"_class_name": "AutoencoderKL",
|
3 |
-
"_diffusers_version": "0.
|
4 |
"act_fn": "silu",
|
5 |
"block_out_channels": [
|
6 |
128,
|
@@ -17,15 +17,20 @@
|
|
17 |
"force_upcast": true,
|
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 |
}
|
|
|
1 |
{
|
2 |
"_class_name": "AutoencoderKL",
|
3 |
+
"_diffusers_version": "0.29.0.dev0",
|
4 |
"act_fn": "silu",
|
5 |
"block_out_channels": [
|
6 |
128,
|
|
|
17 |
"force_upcast": true,
|
18 |
"in_channels": 3,
|
19 |
"latent_channels": 4,
|
20 |
+
"latents_mean": null,
|
21 |
+
"latents_std": null,
|
22 |
"layers_per_block": 2,
|
23 |
"norm_num_groups": 32,
|
24 |
"out_channels": 3,
|
25 |
"sample_size": 512,
|
26 |
"scaling_factor": 0.18215,
|
27 |
+
"shift_factor": null,
|
28 |
"up_block_types": [
|
29 |
"UpDecoderBlock2D",
|
30 |
"UpDecoderBlock2D",
|
31 |
"UpDecoderBlock2D",
|
32 |
"UpDecoderBlock2D"
|
33 |
+
],
|
34 |
+
"use_post_quant_conv": true,
|
35 |
+
"use_quant_conv": true
|
36 |
}
|
vae/diffusion_pytorch_model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:42cfeb532c74d4fc63900098616da7c250e564021b5591f4a4438cd954c57b92
|
3 |
+
size 334643268
|