File python-stable-diffusion.spec of Package python-stable-diffusion
#
# spec file for package stable-diffusion
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define sname stable-diffusion
Name: python-%{sname}
Version: 0.0.1+git.20221116
Release: 0
Summary: Latent text-to-image diffusion model
License: CreativeML Open RAIL-M
URL: https://github.com/CompVis/stable-diffusion
Source: %{sname}-%{version}.tar.bz2
BuildRequires: python-rpm-macros
BuildRequires: %{python_module numpy}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module tqdm}
Requires: python-numpy
Requires: python-torch
Requires: python-tqdm
%python_subpackages
%description
Stable Diffusion is a latent text-to-image diffusion model. Thanks to a
generous compute donation from Stability AI and support from LAION, we were
able to train a Latent Diffusion Model on 512x512 images from a subset of
the LAION-5B database. Similar to Google's Imagen, this model uses a frozen
CLIP ViT-L/14 text encoder to condition the model on text prompts. With its
860M UNet and 123M text encoder, the model is relatively lightweight and
runs on a GPU with at least 10GB VRAM. See this section below and the model
card.
%prep
%autosetup -n %{sname}-%{version}
%build
%python_build
%install
%python_install
%files %{python_files}
%license LICENSE
%doc README.md
%{python_sitelib}/*
%changelog