1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-27 17:22:53 +03:00

fix link in the docs (#10058)

* fix link in the docs

* fix same issue for ko
This commit is contained in:
ChG
2024-12-02 11:45:12 -08:00
committed by GitHub
parent 922c5f5c3c
commit c44fba8899
4 changed files with 6 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
# Create a dataset for training
There are many datasets on the [Hub](https://huggingface.co/datasets?task_categories=task_categories:text-to-image&sort=downloads) to train a model on, but if you can't find one you're interested in or want to use your own, you can create a dataset with the ๐Ÿค— [Datasets](hf.co/docs/datasets) library. The dataset structure depends on the task you want to train your model on. The most basic dataset structure is a directory of images for tasks like unconditional image generation. Another dataset structure may be a directory of images and a text file containing their corresponding text captions for tasks like text-to-image generation.
There are many datasets on the [Hub](https://huggingface.co/datasets?task_categories=task_categories:text-to-image&sort=downloads) to train a model on, but if you can't find one you're interested in or want to use your own, you can create a dataset with the ๐Ÿค— [Datasets](https://huggingface.co/docs/datasets) library. The dataset structure depends on the task you want to train your model on. The most basic dataset structure is a directory of images for tasks like unconditional image generation. Another dataset structure may be a directory of images and a text file containing their corresponding text captions for tasks like text-to-image generation.
This guide will show you two ways to create a dataset to finetune on:
@@ -87,4 +87,4 @@ accelerate launch --mixed_precision="fp16" train_text_to_image.py \
Now that you've created a dataset, you can plug it into the `train_data_dir` (if your dataset is local) or `dataset_name` (if your dataset is on the Hub) arguments of a training script.
For your next steps, feel free to try and use your dataset to train a model for [unconditional generation](unconditional_training) or [text-to-image generation](text2image)!
For your next steps, feel free to try and use your dataset to train a model for [unconditional generation](unconditional_training) or [text-to-image generation](text2image)!

View File

@@ -121,7 +121,7 @@ image = pipe(prompt=prompt, image=init_image, mask_image=mask_image, num_inferen
### ์ด๋ฏธ์ง€ ๊ฒฐ๊ณผ๋ฌผ์„ ์ •์ œํ•˜๊ธฐ
[base ๋ชจ๋ธ ์ฒดํฌํฌ์ธํŠธ](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0)์—์„œ, StableDiffusion-XL ๋˜ํ•œ ๊ณ ์ฃผํŒŒ ํ’ˆ์งˆ์„ ํ–ฅ์ƒ์‹œํ‚ค๋Š” ์ด๋ฏธ์ง€๋ฅผ ์ƒ์„ฑํ•˜๊ธฐ ์œ„ํ•ด ๋‚ฎ์€ ๋…ธ์ด์ฆˆ ๋‹จ๊ณ„ ์ด๋ฏธ์ง€๋ฅผ ์ œ๊ฑฐํ•˜๋Š”๋ฐ ํŠนํ™”๋œ [refiner ์ฒดํฌํฌ์ธํŠธ](huggingface.co/stabilityai/stable-diffusion-xl-refiner-1.0)๋ฅผ ํฌํ•จํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ์ด refiner ์ฒดํฌํฌ์ธํŠธ๋Š” ์ด๋ฏธ์ง€ ํ’ˆ์งˆ์„ ํ–ฅ์ƒ์‹œํ‚ค๊ธฐ ์œ„ํ•ด base ์ฒดํฌํฌ์ธํŠธ๋ฅผ ์‹คํ–‰ํ•œ ํ›„ "๋‘ ๋ฒˆ์งธ ๋‹จ๊ณ„" ํŒŒ์ดํ”„๋ผ์ธ์— ์‚ฌ์šฉ๋  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
[base ๋ชจ๋ธ ์ฒดํฌํฌ์ธํŠธ](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0)์—์„œ, StableDiffusion-XL ๋˜ํ•œ ๊ณ ์ฃผํŒŒ ํ’ˆ์งˆ์„ ํ–ฅ์ƒ์‹œํ‚ค๋Š” ์ด๋ฏธ์ง€๋ฅผ ์ƒ์„ฑํ•˜๊ธฐ ์œ„ํ•ด ๋‚ฎ์€ ๋…ธ์ด์ฆˆ ๋‹จ๊ณ„ ์ด๋ฏธ์ง€๋ฅผ ์ œ๊ฑฐํ•˜๋Š”๋ฐ ํŠนํ™”๋œ [refiner ์ฒดํฌํฌ์ธํŠธ](https://huggingface.co/stabilityai/stable-diffusion-xl-refiner-1.0)๋ฅผ ํฌํ•จํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ์ด refiner ์ฒดํฌํฌ์ธํŠธ๋Š” ์ด๋ฏธ์ง€ ํ’ˆ์งˆ์„ ํ–ฅ์ƒ์‹œํ‚ค๊ธฐ ์œ„ํ•ด base ์ฒดํฌํฌ์ธํŠธ๋ฅผ ์‹คํ–‰ํ•œ ํ›„ "๋‘ ๋ฒˆ์งธ ๋‹จ๊ณ„" ํŒŒ์ดํ”„๋ผ์ธ์— ์‚ฌ์šฉ๋  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
refiner๋ฅผ ์‚ฌ์šฉํ•  ๋•Œ, ์‰ฝ๊ฒŒ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค
- 1.) base ๋ชจ๋ธ๊ณผ refiner์„ ์‚ฌ์šฉํ•˜๋Š”๋ฐ, ์ด๋Š” *Denoisers์˜ ์•™์ƒ๋ธ”*์„ ์œ„ํ•œ ์ฒซ ๋ฒˆ์งธ ์ œ์•ˆ๋œ [eDiff-I](https://research.nvidia.com/labs/dir/eDiff-I/)๋ฅผ ์‚ฌ์šฉํ•˜๊ฑฐ๋‚˜
@@ -215,7 +215,7 @@ image = refiner(
#### 2.) ๋…ธ์ด์ฆˆ๊ฐ€ ์™„์ „ํžˆ ์ œ๊ฑฐ๋œ ๊ธฐ๋ณธ ์ด๋ฏธ์ง€์—์„œ ์ด๋ฏธ์ง€ ์ถœ๋ ฅ์„ ์ •์ œํ•˜๊ธฐ
์ผ๋ฐ˜์ ์ธ [`StableDiffusionImg2ImgPipeline`] ๋ฐฉ์‹์—์„œ, ๊ธฐ๋ณธ ๋ชจ๋ธ์—์„œ ์ƒ์„ฑ๋œ ์™„์ „ํžˆ ๋…ธ์ด์ฆˆ๊ฐ€ ์ œ๊ฑฐ๋œ ์ด๋ฏธ์ง€๋Š” [refiner checkpoint](huggingface.co/stabilityai/stable-diffusion-xl-refiner-1.0)๋ฅผ ์‚ฌ์šฉํ•ด ๋” ํ–ฅ์ƒ์‹œํ‚ฌ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
์ผ๋ฐ˜์ ์ธ [`StableDiffusionImg2ImgPipeline`] ๋ฐฉ์‹์—์„œ, ๊ธฐ๋ณธ ๋ชจ๋ธ์—์„œ ์ƒ์„ฑ๋œ ์™„์ „ํžˆ ๋…ธ์ด์ฆˆ๊ฐ€ ์ œ๊ฑฐ๋œ ์ด๋ฏธ์ง€๋Š” [refiner checkpoint](https://huggingface.co/stabilityai/stable-diffusion-xl-refiner-1.0)๋ฅผ ์‚ฌ์šฉํ•ด ๋” ํ–ฅ์ƒ์‹œํ‚ฌ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
์ด๋ฅผ ์œ„ํ•ด, ๋ณดํ†ต์˜ "base" text-to-image ํŒŒ์ดํ”„๋ผ์ธ์„ ์ˆ˜ํ–‰ ํ›„์— image-to-image ํŒŒ์ดํ”„๋ผ์ธ์œผ๋กœ์จ refiner๋ฅผ ์‹คํ–‰์‹œํ‚ฌ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. base ๋ชจ๋ธ์˜ ์ถœ๋ ฅ์„ ์ž ์žฌ ๊ณต๊ฐ„์— ๋‚จ๊ฒจ๋‘˜ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

View File

@@ -1,7 +1,7 @@
# ํ•™์Šต์„ ์œ„ํ•œ ๋ฐ์ดํ„ฐ์…‹ ๋งŒ๋“ค๊ธฐ
[Hub](https://huggingface.co/datasets?task_categories=task_categories:text-to-image&sort=downloads) ์—๋Š” ๋ชจ๋ธ ๊ต์œก์„ ์œ„ํ•œ ๋งŽ์€ ๋ฐ์ดํ„ฐ์…‹์ด ์žˆ์ง€๋งŒ,
๊ด€์‹ฌ์ด ์žˆ๊ฑฐ๋‚˜ ์‚ฌ์šฉํ•˜๊ณ  ์‹ถ์€ ๋ฐ์ดํ„ฐ์…‹์„ ์ฐพ์„ ์ˆ˜ ์—†๋Š” ๊ฒฝ์šฐ ๐Ÿค— [Datasets](hf.co/docs/datasets) ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋ฐ์ดํ„ฐ์…‹์„ ๋งŒ๋“ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
๊ด€์‹ฌ์ด ์žˆ๊ฑฐ๋‚˜ ์‚ฌ์šฉํ•˜๊ณ  ์‹ถ์€ ๋ฐ์ดํ„ฐ์…‹์„ ์ฐพ์„ ์ˆ˜ ์—†๋Š” ๊ฒฝ์šฐ ๐Ÿค— [Datasets](https://huggingface.co/docs/datasets) ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋ฐ์ดํ„ฐ์…‹์„ ๋งŒ๋“ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
๋ฐ์ดํ„ฐ์…‹ ๊ตฌ์กฐ๋Š” ๋ชจ๋ธ์„ ํ•™์Šตํ•˜๋ ค๋Š” ์ž‘์—…์— ๋”ฐ๋ผ ๋‹ฌ๋ผ์ง‘๋‹ˆ๋‹ค.
๊ฐ€์žฅ ๊ธฐ๋ณธ์ ์ธ ๋ฐ์ดํ„ฐ์…‹ ๊ตฌ์กฐ๋Š” unconditional ์ด๋ฏธ์ง€ ์ƒ์„ฑ๊ณผ ๊ฐ™์€ ์ž‘์—…์„ ์œ„ํ•œ ์ด๋ฏธ์ง€ ๋””๋ ‰ํ† ๋ฆฌ์ž…๋‹ˆ๋‹ค.
๋˜ ๋‹ค๋ฅธ ๋ฐ์ดํ„ฐ์…‹ ๊ตฌ์กฐ๋Š” ์ด๋ฏธ์ง€ ๋””๋ ‰ํ† ๋ฆฌ์™€ text-to-image ์ƒ์„ฑ๊ณผ ๊ฐ™์€ ์ž‘์—…์— ํ•ด๋‹นํ•˜๋Š” ํ…์ŠคํŠธ ์บก์…˜์ด ํฌํ•จ๋œ ํ…์ŠคํŠธ ํŒŒ์ผ์ผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

View File

@@ -36,7 +36,7 @@ specific language governing permissions and limitations under the License.
[cloneofsimo](https://github.com/cloneofsimo)๋Š” ์ธ๊ธฐ ์žˆ๋Š” [lora](https://github.com/cloneofsimo/lora) GitHub ๋ฆฌํฌ์ง€ํ† ๋ฆฌ์—์„œ Stable Diffusion์„ ์œ„ํ•œ LoRA ํ•™์Šต์„ ์ตœ์ดˆ๋กœ ์‹œ๋„ํ–ˆ์Šต๋‹ˆ๋‹ค. ๐Ÿงจ Diffusers๋Š” [text-to-image ์ƒ์„ฑ](https://github.com/huggingface/diffusers/tree/main/examples/text_to_image#training-with-lora) ๋ฐ [DreamBooth](https://github.com/huggingface/diffusers/tree/main/examples/dreambooth#training-with-low-rank-adaptation-of-large-language-models-lora)์„ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค. ์ด ๊ฐ€์ด๋“œ๋Š” ๋‘ ๊ฐ€์ง€๋ฅผ ๋ชจ๋‘ ์ˆ˜ํ–‰ํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ๋ณด์—ฌ์ค๋‹ˆ๋‹ค.
๋ชจ๋ธ์„ ์ €์žฅํ•˜๊ฑฐ๋‚˜ ์ปค๋ฎค๋‹ˆํ‹ฐ์™€ ๊ณต์œ ํ•˜๋ ค๋ฉด Hugging Face ๊ณ„์ •์— ๋กœ๊ทธ์ธํ•˜์„ธ์š”(์•„์ง ๊ณ„์ •์ด ์—†๋Š” ๊ฒฝ์šฐ [์ƒ์„ฑ](hf.co/join)ํ•˜์„ธ์š”):
๋ชจ๋ธ์„ ์ €์žฅํ•˜๊ฑฐ๋‚˜ ์ปค๋ฎค๋‹ˆํ‹ฐ์™€ ๊ณต์œ ํ•˜๋ ค๋ฉด Hugging Face ๊ณ„์ •์— ๋กœ๊ทธ์ธํ•˜์„ธ์š”(์•„์ง ๊ณ„์ •์ด ์—†๋Š” ๊ฒฝ์šฐ [์ƒ์„ฑ](https://huggingface.co/join)ํ•˜์„ธ์š”):
```bash
huggingface-cli login