Instructions to use stablediffusionapi/miasma2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use stablediffusionapi/miasma2 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/miasma2", dtype=torch.bfloat16, device_map="cuda") prompt = "a girl wandering through the forest" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps
- Draw Things
- DiffusionBee
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,24 +1,30 @@
|
|
| 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 |
library_name: diffusers
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
# Miasma2 API Inference
|
| 13 |
|
| 14 |
-
|
|
|
|
| 15 |
## Get API Key
|
| 16 |
|
| 17 |
Get API key from [ModelsLab API](http://modelslab.com), No Payment needed.
|
| 18 |
|
| 19 |
Replace Key in below code, change **model_id** to "miasma2"
|
| 20 |
|
| 21 |
-
Coding in PHP/Node/Java etc? Have a look at docs for more code examples: [View docs](https://modelslab.com
|
| 22 |
|
| 23 |
Try model for free: [Generate Images](https://modelslab.com/models/miasma2)
|
| 24 |
|
|
@@ -26,40 +32,42 @@ Model link: [View model](https://modelslab.com/models/miasma2)
|
|
| 26 |
|
| 27 |
View all models: [View Models](https://modelslab.com/models)
|
| 28 |
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
|
|
|
|
|
|
| 64 |
|
| 65 |
> Use this coupon code to get 25% off **DMGG0RBN**
|
|
|
|
| 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 |
+
pipeline_tag: text-to-image
|
| 10 |
library_name: diffusers
|
| 11 |
+
widget:
|
| 12 |
+
- text: a girl wandering through the forest
|
| 13 |
+
output:
|
| 14 |
+
url: https://pub-3626123a908346a7a8be8d9295f44e26.r2.dev/generations/7532104861711594581.png
|
| 15 |
---
|
| 16 |
|
| 17 |
# Miasma2 API Inference
|
| 18 |
|
| 19 |
+
<Gallery />
|
| 20 |
+
|
| 21 |
## Get API Key
|
| 22 |
|
| 23 |
Get API key from [ModelsLab API](http://modelslab.com), No Payment needed.
|
| 24 |
|
| 25 |
Replace Key in below code, change **model_id** to "miasma2"
|
| 26 |
|
| 27 |
+
Coding in PHP/Node/Java etc? Have a look at docs for more code examples: [View docs](https://docs.modelslab.com)
|
| 28 |
|
| 29 |
Try model for free: [Generate Images](https://modelslab.com/models/miasma2)
|
| 30 |
|
|
|
|
| 32 |
|
| 33 |
View all models: [View Models](https://modelslab.com/models)
|
| 34 |
|
| 35 |
+
```python
|
| 36 |
+
import requests
|
| 37 |
+
import json
|
| 38 |
+
|
| 39 |
+
url = "https://modelslab.com/api/v6/images/text2img"
|
| 40 |
+
|
| 41 |
+
payload = json.dumps({
|
| 42 |
+
"key": "your_api_key",
|
| 43 |
+
"model_id": "miasma2",
|
| 44 |
+
"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",
|
| 45 |
+
"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",
|
| 46 |
+
"width": "512",
|
| 47 |
+
"height": "512",
|
| 48 |
+
"samples": "1",
|
| 49 |
+
"num_inference_steps": "30",
|
| 50 |
+
"safety_checker": "no",
|
| 51 |
+
"enhance_prompt": "yes",
|
| 52 |
+
"seed": None,
|
| 53 |
+
"guidance_scale": 7.5,
|
| 54 |
+
"multi_lingual": "no",
|
| 55 |
+
"panorama": "no",
|
| 56 |
+
"self_attention": "no",
|
| 57 |
+
"upscale": "no",
|
| 58 |
+
"embeddings": "",
|
| 59 |
+
"lora": "",
|
| 60 |
+
"webhook": None,
|
| 61 |
+
"track_id": None
|
| 62 |
+
})
|
| 63 |
+
|
| 64 |
+
headers = {
|
| 65 |
+
'Content-Type': 'application/json'
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
response = requests.request("POST", url, headers=headers, data=payload)
|
| 69 |
+
|
| 70 |
+
print(response.text)
|
| 71 |
+
```
|
| 72 |
|
| 73 |
> Use this coupon code to get 25% off **DMGG0RBN**
|