Text-to-Image
Diffusers
StableDiffusionPipeline
stablediffusionapi.com
stable-diffusion-api
ultra-realistic
Instructions to use stablediffusionapi/mb001 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use stablediffusionapi/mb001 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("stablediffusionapi/mb001", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
Commit ·
8a64728
1
Parent(s): b7792a0
converted using stablediffusionapi.com
Browse filesFiles changed (17)
- .gitignoreAdded+2
- README.mdAdded+66
- feature_extractor/preprocessor_config.jsonAdded+28
- model_index.jsonAdded+33
- safety_checker/config.jsonAdded+28
- safety_checker/pytorch_model.binAdded+3
- scheduler/scheduler_config.jsonAdded+15
- text_encoder/config.jsonAdded+24
- text_encoder/pytorch_model.binAdded+3
- tokenizer/merges.txtAdded
- tokenizer/special_tokens_map.jsonAdded+24
- tokenizer/tokenizer_config.jsonAdded+33
- tokenizer/vocab.jsonAdded
- unet/config.jsonAdded+66
- unet/diffusion_pytorch_model.binAdded+3
- vae/config.jsonAdded+31
- vae/diffusion_pytorch_model.binAdded+3
12step_*epoch_*123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566---license: creativeml-openrail-mtags: - stablediffusionapi.com - stable-diffusion-api - text-to-image - ultra-realisticpinned: true---
# mb_001 API Inference
## Get API Key
Get API key from [Stable Diffusion API](http://stablediffusionapi.com/), No Payment needed.
Replace Key in below code, change **model_id** to "mb001"
Coding in PHP/Node/Java etc? Have a look at docs for more code examples: [View docs](https://stablediffusionapi.com/docs)
Try model for free: [Generate Images](https://stablediffusionapi.com/models/mb001)
Model link: [View model](https://stablediffusionapi.com/models/mb001)
Credits: [View credits](https://civitai.com/?query=mb_001)
View all models: [View Models](https://stablediffusionapi.com/models)
import requests import json url = "https://stablediffusionapi.com/api/v4/dreambooth" payload = json.dumps({ "key": "your_api_key", "model_id": "mb001", "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", "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", "width": "512", "height": "512", "samples": "1", "num_inference_steps": "30", "safety_checker": "no", "enhance_prompt": "yes", "seed": None, "guidance_scale": 7.5, "multi_lingual": "no", "panorama": "no", "self_attention": "no", "upscale": "no", "embeddings": "embeddings_model_id", "lora": "lora_model_id", "webhook": None, "track_id": None }) headers = { 'Content-Type': 'application/json' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text)
> Use this coupon code to get 25% off **DMGG0RBN** 12345678910111213141516171819202122232425262728{ "crop_size": { "height": 224, "width": 224 }, "do_center_crop": true, "do_convert_rgb": true, "do_normalize": true, "do_rescale": true, "do_resize": true, "feature_extractor_type": "CLIPFeatureExtractor", "image_mean": [ 0.48145466, 0.4578275, 0.40821073 ], "image_processor_type": "CLIPFeatureExtractor", "image_std": [ 0.26862954, 0.26130258, 0.27577711 ], "resample": 3, "rescale_factor": 0.00392156862745098, "size": { "shortest_edge": 224 }}123456789101112131415161718192021222324252627282930313233{ "_class_name": "StableDiffusionPipeline", "_diffusers_version": "0.21.2", "feature_extractor": [ "transformers", "CLIPFeatureExtractor" ], "requires_safety_checker": true, "safety_checker": [ "stable_diffusion", "StableDiffusionSafetyChecker" ], "scheduler": [ "diffusers", "PNDMScheduler" ], "text_encoder": [ "transformers", "CLIPTextModel" ], "tokenizer": [ "transformers", "CLIPTokenizer" ], "unet": [ "diffusers", "UNet2DConditionModel" ], "vae": [ "diffusers", "AutoencoderKL" ]}12345678910111213141516171819202122232425262728{ "_name_or_path": "CompVis/stable-diffusion-safety-checker", "architectures": [ "StableDiffusionSafetyChecker" ], "initializer_factor": 1.0, "logit_scale_init_value": 2.6592, "model_type": "clip", "projection_dim": 768, "text_config": { "dropout": 0.0, "hidden_size": 768, "intermediate_size": 3072, "model_type": "clip_text_model", "num_attention_heads": 12 }, "torch_dtype": "float16", "transformers_version": "4.33.1", "vision_config": { "dropout": 0.0, "hidden_size": 1024, "intermediate_size": 4096, "model_type": "clip_vision_model", "num_attention_heads": 16, "num_hidden_layers": 24, "patch_size": 14 }}123version https://git-lfs.github.com/spec/v1oid sha256:e09c5d39c29d798137c7aa6f529bd44abe3616b054740a02d896f0381ca4f4f9size 608099578123456789101112131415{ "_class_name": "PNDMScheduler", "_diffusers_version": "0.21.2", "beta_end": 0.012, "beta_schedule": "scaled_linear", "beta_start": 0.00085, "clip_sample": false, "num_train_timesteps": 1000, "prediction_type": "epsilon", "set_alpha_to_one": false, "skip_prk_steps": true, "steps_offset": 1, "timestep_spacing": "leading", "trained_betas": null}123456789101112131415161718192021222324{ "architectures": [ "CLIPTextModel" ], "attention_dropout": 0.0, "bos_token_id": 0, "dropout": 0.0, "eos_token_id": 2, "hidden_act": "quick_gelu", "hidden_size": 768, "initializer_factor": 1.0, "initializer_range": 0.02, "intermediate_size": 3072, "layer_norm_eps": 1e-05, "max_position_embeddings": 77, "model_type": "clip_text_model", "num_attention_heads": 12, "num_hidden_layers": 12, "pad_token_id": 1, "projection_dim": 768, "torch_dtype": "float16", "transformers_version": "4.33.1", "vocab_size": 49408}123version https://git-lfs.github.com/spec/v1oid sha256:586ba68f9fcda91eca534453c32a7babd5ca57a2531ca17284846ac9bc756eb3size 246185562123456789101112131415161718192021222324{ "bos_token": { "content": "<|startoftext|>", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false }, "eos_token": { "content": "<|endoftext|>", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false }, "pad_token": "<|endoftext|>", "unk_token": { "content": "<|endoftext|>", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false }}123456789101112131415161718192021222324252627282930313233{ "add_prefix_space": false, "bos_token": { "__type": "AddedToken", "content": "<|startoftext|>", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false }, "clean_up_tokenization_spaces": true, "do_lower_case": true, "eos_token": { "__type": "AddedToken", "content": "<|endoftext|>", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false }, "errors": "replace", "model_max_length": 77, "pad_token": "<|endoftext|>", "tokenizer_class": "CLIPTokenizer", "unk_token": { "__type": "AddedToken", "content": "<|endoftext|>", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false }}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566{ "_class_name": "UNet2DConditionModel", "_diffusers_version": "0.21.2", "act_fn": "silu", "addition_embed_type": null, "addition_embed_type_num_heads": 64, "addition_time_embed_dim": null, "attention_head_dim": 8, "attention_type": "default", "block_out_channels": [ 320, 640, 1280, 1280 ], "center_input_sample": false, "class_embed_type": null, "class_embeddings_concat": false, "conv_in_kernel": 3, "conv_out_kernel": 3, "cross_attention_dim": 768, "cross_attention_norm": null, "down_block_types": [ "CrossAttnDownBlock2D", "CrossAttnDownBlock2D", "CrossAttnDownBlock2D", "DownBlock2D" ], "downsample_padding": 1, "dropout": 0.0, "dual_cross_attention": false, "encoder_hid_dim": null, "encoder_hid_dim_type": null, "flip_sin_to_cos": true, "freq_shift": 0, "in_channels": 4, "layers_per_block": 2, "mid_block_only_cross_attention": null, "mid_block_scale_factor": 1, "mid_block_type": "UNetMidBlock2DCrossAttn", "norm_eps": 1e-05, "norm_num_groups": 32, "num_attention_heads": null, "num_class_embeds": null, "only_cross_attention": false, "out_channels": 4, "projection_class_embeddings_input_dim": null, "resnet_out_scale_factor": 1.0, "resnet_skip_time_act": false, "resnet_time_scale_shift": "default", "sample_size": 64, "time_cond_proj_dim": null, "time_embedding_act_fn": null, "time_embedding_dim": null, "time_embedding_type": "positional", "timestep_post_act": null, "transformer_layers_per_block": 1, "up_block_types": [ "UpBlock2D", "CrossAttnUpBlock2D", "CrossAttnUpBlock2D", "CrossAttnUpBlock2D" ], "upcast_attention": false, "use_linear_projection": false}123version https://git-lfs.github.com/spec/v1oid sha256:e5ecfa1190dc272f7ad842d2e25d9c71ad9effe71aa764c1b64c6631d4c7ce6esize 171932491812345678910111213141516171819202122232425262728293031{ "_class_name": "AutoencoderKL", "_diffusers_version": "0.21.2", "act_fn": "silu", "block_out_channels": [ 128, 256, 512, 512 ], "down_block_types": [ "DownEncoderBlock2D", "DownEncoderBlock2D", "DownEncoderBlock2D", "DownEncoderBlock2D" ], "force_upcast": true, "in_channels": 3, "latent_channels": 4, "layers_per_block": 2, "norm_num_groups": 32, "out_channels": 3, "sample_size": 512, "scaling_factor": 0.18215, "up_block_types": [ "UpDecoderBlock2D", "UpDecoderBlock2D", "UpDecoderBlock2D", "UpDecoderBlock2D" ]}123version https://git-lfs.github.com/spec/v1oid sha256:9afb6c5f0d60b2c02811edf178bc8d984c0aa6dc443aa25ed497ad16c1751a22size 167404866.gitignoreAdded+2
README.mdAdded+66
feature_extractor/preprocessor_config.jsonAdded+28
model_index.jsonAdded+33
safety_checker/config.jsonAdded+28
safety_checker/pytorch_model.binAdded+3
scheduler/scheduler_config.jsonAdded+15
text_encoder/config.jsonAdded+24
text_encoder/pytorch_model.binAdded+3
tokenizer/merges.txtAdded
tokenizer/special_tokens_map.jsonAdded+24
tokenizer/tokenizer_config.jsonAdded+33
tokenizer/vocab.jsonAdded
unet/config.jsonAdded+66
unet/diffusion_pytorch_model.binAdded+3
vae/config.jsonAdded+31
vae/diffusion_pytorch_model.binAdded+3