adhikjoshi
commited on
Commit
•
0f6c0d0
1
Parent(s):
3179027
converted using stablediffusionapi.com
Browse files- README.md +9 -11
- model_index.json +9 -1
- scheduler/scheduler_config.json +5 -1
- text_encoder/config.json +1 -1
- text_encoder/pytorch_model.bin +1 -1
- text_encoder_2/config.json +1 -1
- text_encoder_2/pytorch_model.bin +1 -1
- tokenizer/special_tokens_map.json +7 -1
- tokenizer/tokenizer_config.json +20 -23
- tokenizer_2/tokenizer_config.json +28 -23
- unet/config.json +2 -1
- unet/diffusion_pytorch_model.bin +1 -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 "afroditexl"
|
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 "afroditexl"
|
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/afroditexl)
|
23 |
|
24 |
+
Model link: [View model](https://modelslab.com/models/afroditexl)
|
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",
|
model_index.json
CHANGED
@@ -1,7 +1,15 @@
|
|
1 |
{
|
2 |
"_class_name": "StableDiffusionXLPipeline",
|
3 |
-
"_diffusers_version": "0.
|
|
|
|
|
|
|
|
|
4 |
"force_zeros_for_empty_prompt": true,
|
|
|
|
|
|
|
|
|
5 |
"scheduler": [
|
6 |
"diffusers",
|
7 |
"EulerDiscreteScheduler"
|
|
|
1 |
{
|
2 |
"_class_name": "StableDiffusionXLPipeline",
|
3 |
+
"_diffusers_version": "0.25.0.dev0",
|
4 |
+
"feature_extractor": [
|
5 |
+
null,
|
6 |
+
null
|
7 |
+
],
|
8 |
"force_zeros_for_empty_prompt": true,
|
9 |
+
"image_encoder": [
|
10 |
+
null,
|
11 |
+
null
|
12 |
+
],
|
13 |
"scheduler": [
|
14 |
"diffusers",
|
15 |
"EulerDiscreteScheduler"
|
scheduler/scheduler_config.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
{
|
2 |
"_class_name": "EulerDiscreteScheduler",
|
3 |
-
"_diffusers_version": "0.
|
4 |
"beta_end": 0.012,
|
5 |
"beta_schedule": "scaled_linear",
|
6 |
"beta_start": 0.00085,
|
@@ -8,11 +8,15 @@
|
|
8 |
"interpolation_type": "linear",
|
9 |
"num_train_timesteps": 1000,
|
10 |
"prediction_type": "epsilon",
|
|
|
11 |
"sample_max_value": 1.0,
|
12 |
"set_alpha_to_one": false,
|
|
|
|
|
13 |
"skip_prk_steps": true,
|
14 |
"steps_offset": 1,
|
15 |
"timestep_spacing": "leading",
|
|
|
16 |
"trained_betas": null,
|
17 |
"use_karras_sigmas": false
|
18 |
}
|
|
|
1 |
{
|
2 |
"_class_name": "EulerDiscreteScheduler",
|
3 |
+
"_diffusers_version": "0.25.0.dev0",
|
4 |
"beta_end": 0.012,
|
5 |
"beta_schedule": "scaled_linear",
|
6 |
"beta_start": 0.00085,
|
|
|
8 |
"interpolation_type": "linear",
|
9 |
"num_train_timesteps": 1000,
|
10 |
"prediction_type": "epsilon",
|
11 |
+
"rescale_betas_zero_snr": false,
|
12 |
"sample_max_value": 1.0,
|
13 |
"set_alpha_to_one": false,
|
14 |
+
"sigma_max": null,
|
15 |
+
"sigma_min": null,
|
16 |
"skip_prk_steps": true,
|
17 |
"steps_offset": 1,
|
18 |
"timestep_spacing": "leading",
|
19 |
+
"timestep_type": "discrete",
|
20 |
"trained_betas": null,
|
21 |
"use_karras_sigmas": false
|
22 |
}
|
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 |
}
|
text_encoder/pytorch_model.bin
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 246185562
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5e792847e3ff63f1a10650fce3fa8cf5f9cd77721cabcdd46f8d1f2b02729cd7
|
3 |
size 246185562
|
text_encoder_2/config.json
CHANGED
@@ -19,6 +19,6 @@
|
|
19 |
"pad_token_id": 1,
|
20 |
"projection_dim": 1280,
|
21 |
"torch_dtype": "float16",
|
22 |
-
"transformers_version": "4.
|
23 |
"vocab_size": 49408
|
24 |
}
|
|
|
19 |
"pad_token_id": 1,
|
20 |
"projection_dim": 1280,
|
21 |
"torch_dtype": "float16",
|
22 |
+
"transformers_version": "4.35.2",
|
23 |
"vocab_size": 49408
|
24 |
}
|
text_encoder_2/pytorch_model.bin
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 1389490462
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:542a64c8b477053403e28607b216fd619bc6a012dc2a8f2750bfa2e55d9bb963
|
3 |
size 1389490462
|
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 |
}
|
tokenizer_2/tokenizer_config.json
CHANGED
@@ -1,33 +1,38 @@
|
|
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": "!",
|
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 |
+
"0": {
|
5 |
+
"content": "!",
|
6 |
+
"lstrip": false,
|
7 |
+
"normalized": false,
|
8 |
+
"rstrip": false,
|
9 |
+
"single_word": false,
|
10 |
+
"special": true
|
11 |
+
},
|
12 |
+
"49406": {
|
13 |
+
"content": "<|startoftext|>",
|
14 |
+
"lstrip": false,
|
15 |
+
"normalized": true,
|
16 |
+
"rstrip": false,
|
17 |
+
"single_word": false,
|
18 |
+
"special": true
|
19 |
+
},
|
20 |
+
"49407": {
|
21 |
+
"content": "<|endoftext|>",
|
22 |
+
"lstrip": false,
|
23 |
+
"normalized": true,
|
24 |
+
"rstrip": false,
|
25 |
+
"single_word": false,
|
26 |
+
"special": true
|
27 |
+
}
|
28 |
},
|
29 |
+
"bos_token": "<|startoftext|>",
|
30 |
"clean_up_tokenization_spaces": true,
|
31 |
"do_lower_case": true,
|
32 |
+
"eos_token": "<|endoftext|>",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
"errors": "replace",
|
34 |
"model_max_length": 77,
|
35 |
"pad_token": "!",
|
36 |
"tokenizer_class": "CLIPTokenizer",
|
37 |
+
"unk_token": "<|endoftext|>"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
}
|
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": "text_time",
|
6 |
"addition_embed_type_num_heads": 64,
|
@@ -50,6 +50,7 @@
|
|
50 |
"resnet_out_scale_factor": 1.0,
|
51 |
"resnet_skip_time_act": false,
|
52 |
"resnet_time_scale_shift": "default",
|
|
|
53 |
"sample_size": 128,
|
54 |
"time_cond_proj_dim": null,
|
55 |
"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": "text_time",
|
6 |
"addition_embed_type_num_heads": 64,
|
|
|
50 |
"resnet_out_scale_factor": 1.0,
|
51 |
"resnet_skip_time_act": false,
|
52 |
"resnet_time_scale_shift": "default",
|
53 |
+
"reverse_transformer_layers_per_block": null,
|
54 |
"sample_size": 128,
|
55 |
"time_cond_proj_dim": null,
|
56 |
"time_embedding_act_fn": null,
|
unet/diffusion_pytorch_model.bin
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 5135669022
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:76fc8908d4b944fe6488285af63e0d7c65ad4dd0a4c8a941f7c21892ae7bd13f
|
3 |
size 5135669022
|
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,
|