adhikjoshi
commited on
Commit
•
7308072
1
Parent(s):
da7e274
converted using stablediffusionapi.com
Browse files- README.md +9 -11
- feature_extractor/preprocessor_config.json +2 -1
- model_index.json +5 -1
- safety_checker/config.json +1 -1
- scheduler/scheduler_config.json +1 -1
- text_encoder/config.json +1 -1
- tokenizer/special_tokens_map.json +7 -1
- tokenizer/tokenizer_config.json +20 -23
- unet/config.json +2 -1
- vae/config.json +1 -1
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 "dreamshaper-v8"
|
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 |
+
# API Inference
|
12 |
|
13 |
+
![generated from modelslab.com](https://cdn2.stablediffusionapi.com/generations/bf190b5a-fe19-437c-ba05-82f29cb1f7ad-0.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 "dreamshaper-v8"
|
19 |
|
20 |
+
Coding in PHP/Node/Java etc? Have a look at docs for more code examples: [View docs](https://modelslab.com/docs)
|
21 |
|
22 |
+
Try model for free: [Generate Images](https://modelslab.com/models/dreamshaper-v8)
|
23 |
|
24 |
+
Model link: [View model](https://modelslab.com/models/dreamshaper-v8)
|
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
@@ -24,5 +24,6 @@
|
|
24 |
"rescale_factor": 0.00392156862745098,
|
25 |
"size": {
|
26 |
"shortest_edge": 224
|
27 |
-
}
|
|
|
28 |
}
|
|
|
24 |
"rescale_factor": 0.00392156862745098,
|
25 |
"size": {
|
26 |
"shortest_edge": 224
|
27 |
+
},
|
28 |
+
"use_square_size": false
|
29 |
}
|
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.25.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
@@ -15,7 +15,7 @@
|
|
15 |
"num_attention_heads": 12
|
16 |
},
|
17 |
"torch_dtype": "float16",
|
18 |
-
"transformers_version": "4.
|
19 |
"vision_config": {
|
20 |
"dropout": 0.0,
|
21 |
"hidden_size": 1024,
|
|
|
15 |
"num_attention_heads": 12
|
16 |
},
|
17 |
"torch_dtype": "float16",
|
18 |
+
"transformers_version": "4.35.2",
|
19 |
"vision_config": {
|
20 |
"dropout": 0.0,
|
21 |
"hidden_size": 1024,
|
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.25.0.dev0",
|
4 |
"beta_end": 0.012,
|
5 |
"beta_schedule": "scaled_linear",
|
6 |
"beta_start": 0.00085,
|
text_encoder/config.json
CHANGED
@@ -19,6 +19,6 @@
|
|
19 |
"pad_token_id": 1,
|
20 |
"projection_dim": 768,
|
21 |
"torch_dtype": "float16",
|
22 |
-
"transformers_version": "4.
|
23 |
"vocab_size": 49408
|
24 |
}
|
|
|
19 |
"pad_token_id": 1,
|
20 |
"projection_dim": 768,
|
21 |
"torch_dtype": "float16",
|
22 |
+
"transformers_version": "4.35.2",
|
23 |
"vocab_size": 49408
|
24 |
}
|
tokenizer/special_tokens_map.json
CHANGED
@@ -13,7 +13,13 @@
|
|
13 |
"rstrip": false,
|
14 |
"single_word": false
|
15 |
},
|
16 |
-
"pad_token":
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
"unk_token": {
|
18 |
"content": "<|endoftext|>",
|
19 |
"lstrip": 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,
|
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": true,
|
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.25.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,
|
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,
|
|
|
1 |
{
|
2 |
"_class_name": "AutoencoderKL",
|
3 |
+
"_diffusers_version": "0.25.0.dev0",
|
4 |
"act_fn": "silu",
|
5 |
"block_out_channels": [
|
6 |
128,
|