# Text to Image

テキストのプロンプトから画像生成を行います。<br>

<div align="left"><figure><img src="/files/m3kVVgetgAfdKYULTK8n" alt=""><figcaption></figcaption></figure></div>

Text2Img.csコンポーネントをオブジェクトにアタッチして使用します。

以下ローカルサーバーが立ち上がっている前提です。下記を参考にStartServerしてからご使用ください

[ローカルサーバーについて](/production/rkarusbnitsuite.md)

パラメータ概要を下記に示します。特によく調整を行うパラメータを太字にしています

<table><thead><tr><th width="177">パラメータ</th><th>内容</th></tr></thead><tbody><tr><td><strong>Prompt</strong></td><td>生成したい画像を自然言語で入力</td></tr><tr><td><strong>NegativePrompt</strong></td><td>生成画像に含みたくない要素を自然言語で入力</td></tr><tr><td><strong>Width</strong></td><td>生成画像の横幅をpixelで入力</td></tr><tr><td><strong>Height</strong></td><td>生成画像の高さをpixelで入力</td></tr><tr><td>Steps</td><td><p>生成画像の精細さが変わる</p><p>生成画像がぼやけた感じになる場合に大きくしてください</p></td></tr><tr><td><strong>Cfg Scale</strong></td><td>プロンプトに従う強さ<br>プロンプトの要素の反映が弱い場合に多きな値に調整してください。</td></tr><tr><td>Seed</td><td>シード値を固定すると同じような画像が生成かの可能<br>-1の場合ランダムとなる</td></tr><tr><td>Batch Count</td><td>画像生成を行う枚数を指定します<br>1~100枚で選択することが出来ます。<br>生成画像はStreamingAssets/StableDiffusion内に保存されます。エクスプローラーで日時順などにして確認してください</td></tr><tr><td>ExportType</td><td>出力タイプとしてPNG, JPG, TGAを選択可能<br>Image, RawImage, Materialなどに適用</td></tr><tr><td>Sampler</td><td>生成画像のニュアンスを変える</td></tr><tr><td><strong>Model</strong></td><td>ベースとなるモデル<br>変え方はも<a href="/pages/24c2T1IRr8BBpYX29QrQ">モデル/LoRAの差し替え</a>ご覧ください</td></tr><tr><td><strong>Lora</strong></td><td>追加学習により特定の要素を出しやすくする要素<br>変え方は<a href="/pages/24c2T1IRr8BBpYX29QrQ">モデル/LoRAの差し替え</a>をご覧ください<br>Loraを選択するとPromptに&#x3C;lora:ファイル名:1>が追加されて使用可能になります</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.witchpot.com/component/text-to-image.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
