본문 바로가기
데이터 어쩌구/기술 써보기

이미지 생성 모델 (2024. 02)

by annmunju 2024. 2. 27.
  • Stable cascade

    Stable Cascade - a Hugging Face Space by multimodalart

    • 효율성에 대한 Stable Cascade의 초점은 아키텍처와 더 높은 압축 잠재 공간을 통해 입증됩니다. Stable Diffusion XL보다 14억 개 더 많은 매개변수를 포함하는 가장 큰 모델에도 불구하고 아래 그림에서 볼 수 있듯이 여전히 더 빠른 추론 시간을 제공합니다.
  • GUI

  • Koala

    ETRI, '달리'보다 5배 빠른 이미지 생성 모델 공개

    • 달리보다 5배 빠른 이미지 생성 모델이 나왔다고 해요..!마침 허깅페이스에 등록되어 있어서 사용해보았습니다.

      1. 모델 : koala-700m
      2. GPU : 마티스 GPU 하나 사용. 메모리 30%.
      3. 생성 속도 : 5초 내외
      4. 생성 이미지
      5. (첨부 이미지 1) A little girl flying in the sky
      6. (첨부 이미지 2) One, background white, Disney, illustration, cute, dachshund face, emoji, small size
      7. (첨부 이미지 3) background white, ghibli, illustration, A cat face, emoji
    • 성능이 엄청 좋지는 않은 것 같은데 확실히 가볍고 빠른 것 같네요 🙂

    • code

        import torch
        from diffusers import StableDiffusionXLPipeline
      
        pipe = StableDiffusionXLPipeline.from_pretrained("etri-vilab/koala-700m", torch_dtype=torch.float16)
        pipe = pipe.to("cuda")
      
        engText = 'One, background white, ghibli, illustration, A cat face, emoji'
        prompt = f"Please create an image of '{engText}' in Disney style. Reflecting Disney's classic animation style and design features, emphasize the character's expressions and dynamic characteristics."
        negative = "worst quality, low quality, illustration, low resolution"
        image = pipe(prompt=prompt, negative_prompt=negative).images[0]
      
        image
728x90