# Using Stable-diffusion

<figure><img src="https://1302126628-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJxCl6pdCJeZcbGEegBNj%2Fuploads%2FTSAJRIaR3Tt4Rt3UrNcT%2F%EC%8A%A4%ED%81%AC%EB%A6%B0%EC%83%B7%202024-07-08%20154154.png?alt=media&#x26;token=3a0a7aed-0a25-4f90-a565-4e7a6eb97d50" alt=""><figcaption></figcaption></figure>

{% hint style="info" %} <mark style="color:red;">What is</mark> <mark style="color:red;"></mark><mark style="color:red;">**Stable Diffusion**</mark><mark style="color:red;">?</mark>

It's an image generation model based on deep learning technology.&#x20;

You can generate various images based on the given prompts and settings.
{% endhint %}

**What can you do with Stable Diffusion?**

✔️Generate high-quality images that are difficult to distinguish from reality.

✔️Create new images based on real images.

✔️Use your imagination to generate new images.

**Try Stable Diffusion now using the&#x20;**<mark style="background-color:yellow;">**template feature**</mark>**&#x20;provided by Runyour AI!**

***

## Step 1. Machine Rental / Template Selection&#x20;

<figure><img src="https://1302126628-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJxCl6pdCJeZcbGEegBNj%2Fuploads%2Fjj10bQ4zHP0GGipRW5JG%2F%EC%8A%A4%ED%81%AC%EB%A6%B0%EC%83%B7%202024-07-08%20154324.png?alt=media&#x26;token=272aa2a9-2a02-48a4-bd18-455812943153" alt=""><figcaption></figcaption></figure>

* When you select your desired machine from the GPU Cloud list, you will proceed to the template selection step. \
  Choose the <mark style="background-color:yellow;">**Stable Diffusion**</mark> template and click the rent button at the top.
* You can view the rented machine on <mark style="background-color:yellow;">My Page > Dashboard</mark>.

## Step 2. Access to WebUI

<figure><img src="https://1302126628-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJxCl6pdCJeZcbGEegBNj%2Fuploads%2Fi8AZDXuGzdNtM82M9OVx%2F%E1%84%89%E1%85%B3%E1%84%8F%E1%85%B3%E1%84%85%E1%85%B5%E1%86%AB%E1%84%89%E1%85%A3%E1%86%BA%202025-07-24%20%E1%84%8B%E1%85%A9%E1%84%8C%E1%85%A5%E1%86%AB%2010.56.28.png?alt=media&#x26;token=8ffd7b8c-fd31-4924-8dcc-16112c4c5ee1" alt=""><figcaption></figcaption></figure>

* If you click on the rented machine, you can check the SSH / Web UI access function and the PEM key download function.

<figure><img src="https://1302126628-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJxCl6pdCJeZcbGEegBNj%2Fuploads%2F2jyht1rEbiiEvRrreSfR%2F%E1%84%89%E1%85%B3%E1%84%8F%E1%85%B3%E1%84%85%E1%85%B5%E1%86%AB%E1%84%89%E1%85%A3%E1%86%BA%202025-07-24%20%E1%84%8B%E1%85%A9%E1%84%8C%E1%85%A5%E1%86%AB%2010.57.00.png?alt=media&#x26;token=44aa55d1-b890-49b7-ae72-65c014826b2d" alt=""><figcaption></figcaption></figure>

* Click the SSH / WEB button among the two buttons.

<figure><img src="https://1302126628-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJxCl6pdCJeZcbGEegBNj%2Fuploads%2Fv76yAlENH0PKUiushdeq%2F%E1%84%89%E1%85%B3%E1%84%8F%E1%85%B3%E1%84%85%E1%85%B5%E1%86%AB%E1%84%89%E1%85%A3%E1%86%BA%202025-07-24%20%E1%84%8B%E1%85%A9%E1%84%8C%E1%85%A5%E1%86%AB%2010.57.16.png?alt=media&#x26;token=742faf99-395c-44d0-96eb-46ecd558e4f8" alt=""><figcaption></figcaption></figure>

* Among the two access methods, click the 'HTTP' > 'Stable Diffusion Web' button to access the Web UI directly.

<figure><img src="https://1302126628-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJxCl6pdCJeZcbGEegBNj%2Fuploads%2FzKa42OxLJvxvi8Nfj6ZD%2F%EC%8A%A4%ED%81%AC%EB%A6%B0%EC%83%B7%202024-07-08%20154443.png?alt=media&#x26;token=9eb7e4f7-5ed5-459d-8198-517e991b75c7" alt=""><figcaption><p>Stable diffusion Web UI Screen</p></figcaption></figure>

{% hint style="info" %}
Please refer to the '[Remote Access via SSH](https://runyourai.gitbook.io/userguide/eng-runyour-ai/tutorial/remote-access-via-ssh-common)' about the SSH access
{% endhint %}

* Access method differs by the user's OS, you can access referring to the following:

> 1\) In case of <mark style="color:red;">**Mac OS,**</mark> run the **Terminal**
>
> 2\) In case of <mark style="color:red;">**Window OS**</mark>, run the **CMD, Powershell or other terminal program.**

## Step 3. Run Stable Diffusion WebUI

### Utilize 'txt2img' feature

Let's generate an image using the prominent feature 'txt2img'.

<figure><img src="https://1302126628-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJxCl6pdCJeZcbGEegBNj%2Fuploads%2FGhAEYbI9Dvp1hOcchfjf%2F%EC%8A%A4%ED%81%AC%EB%A6%B0%EC%83%B7%202024-07-08%20154502.png?alt=media&#x26;token=53eac57e-f939-4bd3-b6b5-c2b5e05c6bc9" alt=""><figcaption></figcaption></figure>

<mark style="color:red;">**1) Enter instructions for generating the image in the Prompt.**</mark>&#x20;

For stable-diffusion-webui, it runs on port 7860 on the respective machine.

```
Prompt Example

A magical forest with glowing trees, ethereal creatures, sparkling fairy lights, and a misty atmosphere.
```

<mark style="color:red;">**2) In the Negative prompt, list elements that should be excluded from the image.**</mark>

```
Negative Prompt Example

Modern buildings, cars, dark shadows, blurry details, dull colors.
```

<mark style="color:red;">**3) Review detailed settings under Generation and click the Generate button at the top right to create the image.**</mark>

<figure><img src="https://1302126628-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJxCl6pdCJeZcbGEegBNj%2Fuploads%2Fwn5PLdkXISDKfNPxkBbd%2F%EC%8A%A4%ED%81%AC%EB%A6%B0%EC%83%B7%202024-07-08%20154602.png?alt=media&#x26;token=217b758f-8e43-47f7-9603-f0c3aba98359" alt=""><figcaption></figcaption></figure>
