adhikjoshi commited on
Commit
aafdaa9
1 Parent(s): e86575f

converted using stablediffusionapi.com

Browse files
README.md CHANGED
@@ -1,36 +1,34 @@
1
  ---
2
  license: creativeml-openrail-m
3
  tags:
4
- - stablediffusionapi.com
5
  - stable-diffusion-api
6
  - text-to-image
7
  - ultra-realistic
8
  pinned: true
9
  ---
10
 
11
- # Samaritan 3d Cartoon API Inference
12
 
13
- ![generated from stablediffusionapi.com](https://cdn2.stablediffusionapi.com/generations/3229219621692108151.png)
14
  ## Get API Key
15
 
16
- Get API key from [Stable Diffusion API](http://stablediffusionapi.com/), No Payment needed.
17
 
18
  Replace Key in below code, change **model_id** to "samaritan-3d-cartoon"
19
 
20
- Coding in PHP/Node/Java etc? Have a look at docs for more code examples: [View docs](https://stablediffusionapi.com/docs)
21
 
22
- Try model for free: [Generate Images](https://stablediffusionapi.com/models/samaritan-3d-cartoon)
23
 
24
- Model link: [View model](https://stablediffusionapi.com/models/samaritan-3d-cartoon)
25
 
26
- Credits: [View credits](https://civitai.com/?query=Samaritan%203d%20Cartoon)
27
-
28
- View all models: [View Models](https://stablediffusionapi.com/models)
29
 
30
  import requests
31
  import json
32
 
33
- url = "https://stablediffusionapi.com/api/v4/dreambooth"
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 "samaritan-3d-cartoon"
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/samaritan-3d-cartoon)
23
 
24
+ Model link: [View model](https://modelslab.com/models/samaritan-3d-cartoon)
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,27 +1,35 @@
1
  {
2
- "_class_name": "StableDiffusionPipeline",
3
- "_diffusers_version": "0.20.0.dev0",
4
  "feature_extractor": [
5
- "transformers",
6
- "CLIPFeatureExtractor"
7
  ],
8
- "requires_safety_checker": true,
9
- "safety_checker": [
10
- "stable_diffusion",
11
- "StableDiffusionSafetyChecker"
12
  ],
13
  "scheduler": [
14
  "diffusers",
15
- "PNDMScheduler"
16
  ],
17
  "text_encoder": [
18
  "transformers",
19
  "CLIPTextModel"
20
  ],
 
 
 
 
21
  "tokenizer": [
22
  "transformers",
23
  "CLIPTokenizer"
24
  ],
 
 
 
 
25
  "unet": [
26
  "diffusers",
27
  "UNet2DConditionModel"
 
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"
16
  ],
17
  "text_encoder": [
18
  "transformers",
19
  "CLIPTextModel"
20
  ],
21
+ "text_encoder_2": [
22
+ "transformers",
23
+ "CLIPTextModelWithProjection"
24
+ ],
25
  "tokenizer": [
26
  "transformers",
27
  "CLIPTokenizer"
28
  ],
29
+ "tokenizer_2": [
30
+ "transformers",
31
+ "CLIPTokenizer"
32
+ ],
33
  "unet": [
34
  "diffusers",
35
  "UNet2DConditionModel"
scheduler/scheduler_config.json CHANGED
@@ -1,15 +1,22 @@
1
  {
2
- "_class_name": "PNDMScheduler",
3
- "_diffusers_version": "0.20.0.dev0",
4
  "beta_end": 0.012,
5
  "beta_schedule": "scaled_linear",
6
  "beta_start": 0.00085,
7
  "clip_sample": false,
 
8
  "num_train_timesteps": 1000,
9
  "prediction_type": "epsilon",
 
 
10
  "set_alpha_to_one": false,
 
 
11
  "skip_prk_steps": true,
12
  "steps_offset": 1,
13
  "timestep_spacing": "leading",
14
- "trained_betas": null
 
 
15
  }
 
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,
7
  "clip_sample": false,
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
@@ -18,7 +18,7 @@
18
  "num_hidden_layers": 12,
19
  "pad_token_id": 1,
20
  "projection_dim": 768,
21
- "torch_dtype": "float32",
22
- "transformers_version": "4.28.1",
23
  "vocab_size": 49408
24
  }
 
18
  "num_hidden_layers": 12,
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:9c6873af813b41a35a528de5675f72d53fdfcfd69248d2403f250e973b00f76c
3
- size 492307486
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c22dd096925656a447e7ed57e57864b7329be4b9bd9daa4bdf53561109166554
3
+ size 246185562
text_encoder_2/config.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "CLIPTextModelWithProjection"
4
+ ],
5
+ "attention_dropout": 0.0,
6
+ "bos_token_id": 0,
7
+ "dropout": 0.0,
8
+ "eos_token_id": 2,
9
+ "hidden_act": "gelu",
10
+ "hidden_size": 1280,
11
+ "initializer_factor": 1.0,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 5120,
14
+ "layer_norm_eps": 1e-05,
15
+ "max_position_embeddings": 77,
16
+ "model_type": "clip_text_model",
17
+ "num_attention_heads": 20,
18
+ "num_hidden_layers": 32,
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 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:25a4fa957bdc94319b050752c0a0f33be622dd64e1b748b92212077ceedc8407
3
+ size 1389490462
tokenizer/special_tokens_map.json CHANGED
@@ -13,7 +13,13 @@
13
  "rstrip": false,
14
  "single_word": false
15
  },
16
- "pad_token": "<|endoftext|>",
 
 
 
 
 
 
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
- "bos_token": {
4
- "__type": "AddedToken",
5
- "content": "<|startoftext|>",
6
- "lstrip": false,
7
- "normalized": true,
8
- "rstrip": false,
9
- "single_word": false
 
 
 
 
 
 
 
 
 
 
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/merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_2/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": "!",
17
+ "unk_token": {
18
+ "content": "<|endoftext|>",
19
+ "lstrip": false,
20
+ "normalized": true,
21
+ "rstrip": false,
22
+ "single_word": false
23
+ }
24
+ }
tokenizer_2/tokenizer_config.json ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ }
tokenizer_2/vocab.json ADDED
The diff for this file is too large to render. See raw diff
 
unet/config.json CHANGED
@@ -1,15 +1,19 @@
1
  {
2
  "_class_name": "UNet2DConditionModel",
3
- "_diffusers_version": "0.20.0.dev0",
4
  "act_fn": "silu",
5
- "addition_embed_type": null,
6
  "addition_embed_type_num_heads": 64,
7
- "addition_time_embed_dim": null,
8
- "attention_head_dim": 8,
 
 
 
 
 
9
  "block_out_channels": [
10
  320,
11
  640,
12
- 1280,
13
  1280
14
  ],
15
  "center_input_sample": false,
@@ -17,15 +21,15 @@
17
  "class_embeddings_concat": false,
18
  "conv_in_kernel": 3,
19
  "conv_out_kernel": 3,
20
- "cross_attention_dim": 768,
21
  "cross_attention_norm": null,
22
  "down_block_types": [
 
23
  "CrossAttnDownBlock2D",
24
- "CrossAttnDownBlock2D",
25
- "CrossAttnDownBlock2D",
26
- "DownBlock2D"
27
  ],
28
  "downsample_padding": 1,
 
29
  "dual_cross_attention": false,
30
  "encoder_hid_dim": null,
31
  "encoder_hid_dim_type": null,
@@ -42,23 +46,27 @@
42
  "num_class_embeds": null,
43
  "only_cross_attention": false,
44
  "out_channels": 4,
45
- "projection_class_embeddings_input_dim": null,
46
  "resnet_out_scale_factor": 1.0,
47
  "resnet_skip_time_act": false,
48
  "resnet_time_scale_shift": "default",
49
- "sample_size": 64,
 
50
  "time_cond_proj_dim": null,
51
  "time_embedding_act_fn": null,
52
  "time_embedding_dim": null,
53
  "time_embedding_type": "positional",
54
  "timestep_post_act": null,
55
- "transformer_layers_per_block": 1,
 
 
 
 
56
  "up_block_types": [
57
- "UpBlock2D",
58
  "CrossAttnUpBlock2D",
59
  "CrossAttnUpBlock2D",
60
- "CrossAttnUpBlock2D"
61
  ],
62
  "upcast_attention": false,
63
- "use_linear_projection": false
64
  }
 
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,
7
+ "addition_time_embed_dim": 256,
8
+ "attention_head_dim": [
9
+ 5,
10
+ 10,
11
+ 20
12
+ ],
13
+ "attention_type": "default",
14
  "block_out_channels": [
15
  320,
16
  640,
 
17
  1280
18
  ],
19
  "center_input_sample": false,
 
21
  "class_embeddings_concat": false,
22
  "conv_in_kernel": 3,
23
  "conv_out_kernel": 3,
24
+ "cross_attention_dim": 2048,
25
  "cross_attention_norm": null,
26
  "down_block_types": [
27
+ "DownBlock2D",
28
  "CrossAttnDownBlock2D",
29
+ "CrossAttnDownBlock2D"
 
 
30
  ],
31
  "downsample_padding": 1,
32
+ "dropout": 0.0,
33
  "dual_cross_attention": false,
34
  "encoder_hid_dim": null,
35
  "encoder_hid_dim_type": null,
 
46
  "num_class_embeds": null,
47
  "only_cross_attention": false,
48
  "out_channels": 4,
49
+ "projection_class_embeddings_input_dim": 2816,
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,
57
  "time_embedding_dim": null,
58
  "time_embedding_type": "positional",
59
  "timestep_post_act": null,
60
+ "transformer_layers_per_block": [
61
+ 1,
62
+ 2,
63
+ 10
64
+ ],
65
  "up_block_types": [
 
66
  "CrossAttnUpBlock2D",
67
  "CrossAttnUpBlock2D",
68
+ "UpBlock2D"
69
  ],
70
  "upcast_attention": false,
71
+ "use_linear_projection": true
72
  }
unet/diffusion_pytorch_model.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:bd4dee223f31e59f3db9a592341ddd1234c232a67a1fc0653175bbb14c103237
3
- size 3438366838
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ec8bbcb403b860ffc27ea0439f968f1778838da4296991a23f09cf71ca719852
3
+ size 5135669022
vae/config.json CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  "_class_name": "AutoencoderKL",
3
- "_diffusers_version": "0.20.0.dev0",
4
  "act_fn": "silu",
5
  "block_out_channels": [
6
  128,
@@ -20,8 +20,8 @@
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",
 
1
  {
2
  "_class_name": "AutoencoderKL",
3
+ "_diffusers_version": "0.25.0.dev0",
4
  "act_fn": "silu",
5
  "block_out_channels": [
6
  128,
 
20
  "layers_per_block": 2,
21
  "norm_num_groups": 32,
22
  "out_channels": 3,
23
+ "sample_size": 1024,
24
+ "scaling_factor": 0.13025,
25
  "up_block_types": [
26
  "UpDecoderBlock2D",
27
  "UpDecoderBlock2D",
vae/diffusion_pytorch_model.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:f44860979e5e7e4a3fc305f0acdc1ffb8d82df6ee7765e421a4acce7ff7fee38
3
- size 334712578
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:adc8ec05395a5efa06df524670dea99cc280155602c3168fce281e1ff70f8ab3
3
+ size 167404866