foodai-pipeline-ko / README.md
jangmin's picture
Update README.md
26b7b92 verified
metadata
base_model: CompVis/stable-diffusion-v1-4
library_name: diffusers
license: creativeml-openrail-m
tags:
  - stable-diffusion
  - stable-diffusion-diffusers
  - text-to-image
  - diffusers
  - diffusers-training
inference: true

Text-to-image finetuning - jangmin/foodai-pipeline-ko

This pipeline was finetuned from CompVis/stable-diffusion-v1-4 with replacement of text encoder Bingsu/my-korean-stable-diffusion-v1-5 on the AI-HUB: 건강관리를 위한 음식 이미지 dataset.

Pipeline usage

You can use the pipeline like so:

from diffusers import StableDiffusionPipeline
import torch

# Set device
device = (
    "mps"
    if torch.backends.mps.is_available()
    else "cuda"
    if torch.cuda.is_available()
    else "cpu"
)
torch_dtype = torch.float16 if device == "cuda" else torch.float32
pipeline = StableDiffusionPipeline.from_pretrained("jangmin/foodai-pipeline-ko", torch_dtype=torch_dtype)
pipeline.to(device)

prompt = "짜장면, 정면에서 본 사진, 그릇에 담긴"
image = pipeline(prompt, guidance_scale=8, num_inference_steps=35).images[0]
image

Training info

These are the key hyperparameters used during training:

  • Epochs: 1
  • Learning rate: 1e-05
  • Batch size: 8
  • Gradient accumulation steps: 4
  • Image resolution:512
  • Mixed-precision: bf16