StableDiffusion Image generator in your backend

AI Image Generative tools are great, but how to use them in an application ?

There's many solutions to call an external (and paid) API service, but ther's also an opensource alternative, 'StableDiffusion', that you can install and use for free.

Use RYAX and our StableDiffusion action - no code, no AI skills needed - and add a nice feature into your application and generate images based on any input, at no cost !

Avoid installation and extend seamlessly your backend with StableDiffusion feature,
and with many other ready-to-use actions.

Here's a tutorial on how to use StableDiffusion and make an API service into your application in few clics

I'm here to show you how you can do a simple prompt for using Stable Diffusion if you have RYAX installed.

So the first thing when you start RYAX fresh installation or you have a new project assigned for you, you have this empty screen here

But for starting building our workflows we first need to add some actions to our RYAX and if I can create my workflow

So I'll do that by clicking here and then I can see that already the HTTP post action.

The action that we use as a source is already available.

I don't see the other action here because this is a Trigger action, an action that will be used for starting a workflow that has something to do about injecting data on the workflow.

So I click this one and for it to be useful I'll have to add an input and I'll just click in, add input here and then I can choose a name.

In this case it's just a JSON expected as input so I'll put JSON here.

This is a hub Master so with prompt for instance and origin is important to choose body because this is the way we're gonna get the real payload of the form and the type must be the same type we expect as input on the other direction.

So this one I know is long string so yeah to the other action we want to add another action here that is the one that does the stable diffusion so this action here we'll call the stability Fusion algorithm and the parameter

Here is of type long string that's why I choose before the title long swing because I want to click on this on this.
This box here that says static and choose link instead and then I can reference the parameter that comes from the previous action which is HTTP post zero because there is one instance of that and then Json is the name we gave to that long string parameter finally we are all set and we know that we are set because the state of the workflow changed for valid and then we can deploy it but just before deploying it I would like to give you to give this workflow a better name so call it text to image okay then I will click on OK then the new name is there and I will deploy this workflow we know not further ado

The workflow department is really fast now it's available for us to run
it doesn't mean the actions are already running.
They will be on demand by the schedule but it means I can already start an execution and for doing that I can click on this button here new run that appears once the workflow is deployed clicking on new run here I have to fit in with the expected input parameter

and since I know how it works it expects a JSON that has a prompt parameter and the value of the prompt is whatever you want like we can say something like let's say "lion in the mountains graffiti Style" and then we can click on create execution button.

This will start the process of sending a stable diffusion input so the input of diffusion we're going to see here is the one that we we just fed through the form and this is the name of the parameter for stable diffusion so this takes some time and I go ahead and Advance the video for you to check we have this Green Dot showing finish and we also have the final duration of the task which was four minutes 36 seconds and here we have the output of the action that is now available for us to click and download we can also check the logs and see what stable diffusion algorithm prompt on the screen but I go ahead and I will download the file so we can see what it looks like our final image so now I click here and it opens this image which is the one that we created through the prompts live in the mountains graph feed is Style so in the description of the video I put the reference to digit lab where you find the actions also to digit lab where you find racks and you can know more about our project and we also have a jitterhub link and if you can please go there and give the star that helps a lot also
subscribe to this Channel and if you want more content like that or if you want us to help you with something we can do easily in RYAX
get an API available for the external world so you can call stablediffusion from anywhere and you also can deploy a simple web server that will show a prompt and show the image right away I hope you all enjoyed let me know in the comments if you have anything to say bye

Ryax Open Source Code available on GitLab

Stable Diffusion available on GitHub