# Text to Image

Generate images based on text prompt<br>

<figure><img src="https://1270527639-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtVdP5UEfu2PNFw4I6asq%2Fuploads%2FfqVq8IvvoBewMXb7v81R%2Fimage.png?alt=media&#x26;token=8bb63c38-dcd6-417e-80ee-206b04bf9350" alt=""><figcaption></figcaption></figure>

For generate image with text to Image, attach the Text2Img.cs component to the object

It is assumed that the local server is up and running.&#x20;

Please refer to the following for StartServer before use.

{% content-ref url="../production-tips/about-local-server" %}
[about-local-server](https://docs.witchpot.com/english/production-tips/about-local-server)
{% endcontent-ref %}

A parameter summary is shown below. Parameters that are adjusted frequently are bolded.

<table><thead><tr><th width="177">Parameter</th><th>Summary</th></tr></thead><tbody><tr><td><strong>Prompt</strong></td><td>Enter the words you want to generate in natural language</td></tr><tr><td><strong>NegativePrompt</strong></td><td>Input elements in natural language that you do not want to include in the generated image</td></tr><tr><td><strong>Width</strong></td><td>Width of the generated image in pixels</td></tr><tr><td><strong>Height</strong></td><td>Height of the generated image in pixels</td></tr><tr><td>Steps</td><td>Increase this parameter if the generated image looks blurry</td></tr><tr><td><strong>Cfg Scale</strong></td><td>Strength to follow prompts<br>Input larger value to strongly follow the prompt.</td></tr><tr><td>Seed</td><td><p>Fixing the seed value to generate a similar image</p><p>In case of -1, the image will be random</p></td></tr><tr><td>Batch Count</td><td><p>The number of images to be generated.</p><p>Select 1 to 100 images.</p><p>Generated images will be stored in StreamingAssets/StableDiffusion. Please check images by date sort in the explorer.</p></td></tr><tr><td>ExportType</td><td><p>Selectable output types: PNG, JPG, TGA</p><p>Apply to Image, RawImage, Material, etc</p></td></tr><tr><td>Sampler</td><td>Changing the nuances of the generated image</td></tr><tr><td><strong>Model</strong></td><td>Base trained model<br>See the "<a href="../production-tips/switch-models-lora">Switch Models/LoRA</a>" to switch new model</td></tr><tr><td><strong>Lora</strong></td><td><p>Additional trained Lora to generate consitent specific pattern image</p><p>See the "<a href="../production-tips/switch-models-lora">Switch Models/LoRA</a>" to switch new LoRA</p><p>If you select Lora, &#x3C;lora:filename:1>will be added to the Prompt and LoRA will be available</p></td></tr></tbody></table>
