amonig commited on
Commit
39ee601
·
verified ·
1 Parent(s): 17a52e1

Upload folder using huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ # NewDream-SDXL 2.0 API Inference
12
+
13
+ ![generated from stablediffusionapi.com](https://pub-3626123a908346a7a8be8d9295f44e26.r2.dev/generations/8478583971702167737.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 "newdream-sdxl-20"
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/newdream-sdxl-20)
23
+
24
+ Model link: [View model](https://stablediffusionapi.com/models/newdream-sdxl-20)
25
+
26
+ Credits: [View credits](https://civitai.com/?query=NewDream-SDXL%202.0)
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",
37
+ "model_id": "newdream-sdxl-20",
38
+ "prompt": "ultra realistic close up portrait ((beautiful pale cyberpunk female with heavy black eyeliner)), blue eyes, shaved side haircut, hyper detail, cinematic lighting, magic neon, dark red city, Canon EOS R3, nikon, f/1.4, ISO 200, 1/160s, 8K, RAW, unedited, symmetrical balance, in-frame, 8K",
39
+ "negative_prompt": "painting, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, deformed, ugly, blurry, bad anatomy, bad proportions, extra limbs, cloned face, skinny, glitchy, double torso, extra arms, extra hands, mangled fingers, missing lips, ugly face, distorted face, extra legs, anime",
40
+ "width": "512",
41
+ "height": "512",
42
+ "samples": "1",
43
+ "num_inference_steps": "30",
44
+ "safety_checker": "no",
45
+ "enhance_prompt": "yes",
46
+ "seed": None,
47
+ "guidance_scale": 7.5,
48
+ "multi_lingual": "no",
49
+ "panorama": "no",
50
+ "self_attention": "no",
51
+ "upscale": "no",
52
+ "embeddings": "embeddings_model_id",
53
+ "lora": "lora_model_id",
54
+ "webhook": None,
55
+ "track_id": None
56
+ })
57
+
58
+ headers = {
59
+ 'Content-Type': 'application/json'
60
+ }
61
+
62
+ response = requests.request("POST", url, headers=headers, data=payload)
63
+
64
+ print(response.text)
65
+
66
+ > Use this coupon code to get 25% off **DMGG0RBN**
model_index.json CHANGED
@@ -1,16 +1,7 @@
1
  {
2
  "_class_name": "StableDiffusionXLPipeline",
3
- "_diffusers_version": "0.29.0",
4
- "_name_or_path": "model",
5
- "feature_extractor": [
6
- null,
7
- null
8
- ],
9
  "force_zeros_for_empty_prompt": true,
10
- "image_encoder": [
11
- null,
12
- null
13
- ],
14
  "scheduler": [
15
  "diffusers",
16
  "EulerDiscreteScheduler"
 
1
  {
2
  "_class_name": "StableDiffusionXLPipeline",
3
+ "_diffusers_version": "0.21.2",
 
 
 
 
 
4
  "force_zeros_for_empty_prompt": true,
 
 
 
 
5
  "scheduler": [
6
  "diffusers",
7
  "EulerDiscreteScheduler"
scheduler/scheduler_config.json CHANGED
@@ -1,23 +1,18 @@
1
  {
2
  "_class_name": "EulerDiscreteScheduler",
3
- "_diffusers_version": "0.29.0",
4
  "beta_end": 0.012,
5
  "beta_schedule": "scaled_linear",
6
  "beta_start": 0.00085,
7
  "clip_sample": false,
8
- "final_sigmas_type": "zero",
9
  "interpolation_type": "linear",
10
  "num_train_timesteps": 1000,
11
  "prediction_type": "epsilon",
12
- "rescale_betas_zero_snr": false,
13
  "sample_max_value": 1.0,
14
  "set_alpha_to_one": false,
15
- "sigma_max": null,
16
- "sigma_min": null,
17
  "skip_prk_steps": true,
18
  "steps_offset": 1,
19
  "timestep_spacing": "leading",
20
- "timestep_type": "discrete",
21
  "trained_betas": null,
22
  "use_karras_sigmas": false
23
  }
 
1
  {
2
  "_class_name": "EulerDiscreteScheduler",
3
+ "_diffusers_version": "0.21.2",
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
  "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
  }
text_encoder/config.json CHANGED
@@ -1,5 +1,4 @@
1
  {
2
- "_name_or_path": "model/text_encoder",
3
  "architectures": [
4
  "CLIPTextModel"
5
  ],
@@ -20,6 +19,6 @@
20
  "pad_token_id": 1,
21
  "projection_dim": 768,
22
  "torch_dtype": "float16",
23
- "transformers_version": "4.41.2",
24
  "vocab_size": 49408
25
  }
 
1
  {
 
2
  "architectures": [
3
  "CLIPTextModel"
4
  ],
 
19
  "pad_token_id": 1,
20
  "projection_dim": 768,
21
  "torch_dtype": "float16",
22
+ "transformers_version": "4.33.1",
23
  "vocab_size": 49408
24
  }
text_encoder_2/config.json CHANGED
@@ -1,5 +1,4 @@
1
  {
2
- "_name_or_path": "model/text_encoder_2",
3
  "architectures": [
4
  "CLIPTextModelWithProjection"
5
  ],
@@ -20,6 +19,6 @@
20
  "pad_token_id": 1,
21
  "projection_dim": 1280,
22
  "torch_dtype": "float16",
23
- "transformers_version": "4.41.2",
24
  "vocab_size": 49408
25
  }
 
1
  {
 
2
  "architectures": [
3
  "CLIPTextModelWithProjection"
4
  ],
 
19
  "pad_token_id": 1,
20
  "projection_dim": 1280,
21
  "torch_dtype": "float16",
22
+ "transformers_version": "4.33.1",
23
  "vocab_size": 49408
24
  }
tokenizer/special_tokens_map.json CHANGED
@@ -13,13 +13,7 @@
13
  "rstrip": false,
14
  "single_word": false
15
  },
16
- "pad_token": {
17
- "content": "<|endoftext|>",
18
- "lstrip": false,
19
- "normalized": true,
20
- "rstrip": false,
21
- "single_word": false
22
- },
23
  "unk_token": {
24
  "content": "<|endoftext|>",
25
  "lstrip": false,
 
13
  "rstrip": false,
14
  "single_word": false
15
  },
16
+ "pad_token": "<|endoftext|>",
 
 
 
 
 
 
17
  "unk_token": {
18
  "content": "<|endoftext|>",
19
  "lstrip": false,
tokenizer/tokenizer_config.json CHANGED
@@ -1,30 +1,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
  }
 
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
  }
tokenizer_2/special_tokens_map.json CHANGED
@@ -13,13 +13,7 @@
13
  "rstrip": false,
14
  "single_word": false
15
  },
16
- "pad_token": {
17
- "content": "!",
18
- "lstrip": false,
19
- "normalized": false,
20
- "rstrip": false,
21
- "single_word": false
22
- },
23
  "unk_token": {
24
  "content": "<|endoftext|>",
25
  "lstrip": false,
 
13
  "rstrip": false,
14
  "single_word": false
15
  },
16
+ "pad_token": "!",
 
 
 
 
 
 
17
  "unk_token": {
18
  "content": "<|endoftext|>",
19
  "lstrip": false,
tokenizer_2/tokenizer_config.json CHANGED
@@ -1,38 +1,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
  }
 
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": "!",
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
  }
unet/config.json CHANGED
@@ -1,7 +1,6 @@
1
  {
2
  "_class_name": "UNet2DConditionModel",
3
- "_diffusers_version": "0.29.0",
4
- "_name_or_path": "model/unet",
5
  "act_fn": "silu",
6
  "addition_embed_type": "text_time",
7
  "addition_embed_type_num_heads": 64,
@@ -51,7 +50,6 @@
51
  "resnet_out_scale_factor": 1.0,
52
  "resnet_skip_time_act": false,
53
  "resnet_time_scale_shift": "default",
54
- "reverse_transformer_layers_per_block": null,
55
  "sample_size": 128,
56
  "time_cond_proj_dim": null,
57
  "time_embedding_act_fn": null,
 
1
  {
2
  "_class_name": "UNet2DConditionModel",
3
+ "_diffusers_version": "0.21.2",
 
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
  "sample_size": 128,
54
  "time_cond_proj_dim": null,
55
  "time_embedding_act_fn": null,
vae/config.json CHANGED
@@ -1,7 +1,6 @@
1
  {
2
  "_class_name": "AutoencoderKL",
3
- "_diffusers_version": "0.29.0",
4
- "_name_or_path": "model/vae",
5
  "act_fn": "silu",
6
  "block_out_channels": [
7
  128,
@@ -18,20 +17,15 @@
18
  "force_upcast": true,
19
  "in_channels": 3,
20
  "latent_channels": 4,
21
- "latents_mean": null,
22
- "latents_std": null,
23
  "layers_per_block": 2,
24
  "norm_num_groups": 32,
25
  "out_channels": 3,
26
- "sample_size": 512,
27
  "scaling_factor": 0.13025,
28
- "shift_factor": null,
29
  "up_block_types": [
30
  "UpDecoderBlock2D",
31
  "UpDecoderBlock2D",
32
  "UpDecoderBlock2D",
33
  "UpDecoderBlock2D"
34
- ],
35
- "use_post_quant_conv": true,
36
- "use_quant_conv": true
37
  }
 
1
  {
2
  "_class_name": "AutoencoderKL",
3
+ "_diffusers_version": "0.21.2",
 
4
  "act_fn": "silu",
5
  "block_out_channels": [
6
  128,
 
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": 1024,
24
  "scaling_factor": 0.13025,
 
25
  "up_block_types": [
26
  "UpDecoderBlock2D",
27
  "UpDecoderBlock2D",
28
  "UpDecoderBlock2D",
29
  "UpDecoderBlock2D"
30
+ ]
 
 
31
  }