<< Click to Display Table of Contents >> Navigation: 3. Script Language > AI - Artificial Intelligence Commands > SD - Stable Diffusion AI > SDO. Stable Diffusion Online |
To use Stable Diffusion Online, you will need to:
1. make an Account, and
2. pay a small amount of money ($10) and
3. create and get your API-Key.
Such an API-Key looks like this: sk-UcEkxZp96CgpOR1xveFjdeuC217c7Uqzl6V02nVdEtkEpLjc
To access the online services of Stability.ai / Dreamstudio you need to tell the Smart Package Robot your API-Key.
You can obtain an API key for Stability AI by visiting their developer platform².
The platform is designed to streamline API discovery and integration, and includes features such as a Sandbox Playground, Uniform Documentation,
Simplified API Key Management, and Improved Navigation².
Here is a complete starter Script, you just need to apply "SDO.SetKey" and "SDO.SaveKey" first.
After that the System knows your Key and you can easily generate.
SDO.SetKey|File
' Here yo ucan Switc between the older model and the newest and amazong SD XL
'SDO.SetSize|512|512|stable-diffusion-v1-5
SDO.SetSize|1024|1024|stable-diffusion-xl-1024-v1-0
' How many pictures do you want in one Run? 1-10 is possible
SDO.Set_Samples|1
' Which style do you want? Photo, Anime or Comic? Or ... Origami?
SDO.Set Style|14
' This is how you get internal Information like used Parameters and Errors
SDO.Get Several|5|$$STA
DBP. We use Style: $$STA
' Here we set the cfg_Scale-Parameter
SDO.Set Scale|15
' This is how you can add custom Parameters
SDL.Set Extra Parameter|"restore faces": true
' Here comes the Prompts
$$PRO=beauty arctic viking women(0.3),rainbow colored hair(.7),riding on a dragon(0.2)
$$NEG=blurry, bad
' This Command does all the work
SDO.gst|$$PRO||$$NEG|100
' Lets see whats on the TOS
DMP.6
MBX.!
' New we are going to load and save the Pictures
' We can also write on them, save them in another Format (jpg ?)
' or resize them
POP.$$PAT
POP.$$SUC
IVV.$$SUC=1
ANA.load|0|$$PAT
ANA.show|0!
ELS.
AIC.Show Error
MBX.No File generated.
EIF.
MBX.!
ENR.
You can also learn more about API keys and authentication on the Stability.ai REST API documentation page on GitHub³⁴. Is there anything else you would like to know?
Quelle: Bing, 3.8.2023
(1) Stability AI. https://stability.ai/.
(2) Stability.ai REST API - GitHub. https://github.com/Stability-AI/REST-API.
(3) Docs. https://platform.stability.ai/docs/getting-started/authentication.
(4) Stability’s API Platform — Stability AI. https://stability.ai/blog/api-platform-for-stability-ai.
(5) Stability AI Api Keys: https://platform.stability.ai/account/keys
Generally the result is the same like with Stable diffusion, Local (SDK.) but one small difference.