This commit is contained in:
Phil Wang
2022-04-07 07:29:34 -07:00
parent 25fb133c83
commit f283bf25be
5 changed files with 80 additions and 0 deletions

38
.github/workflows/python-publish.yml vendored Normal file
View File

@@ -0,0 +1,38 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Upload Python Package
on:
release:
types: [published]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

View File

@@ -4,6 +4,8 @@
Implementation of <a href="https://openai.com/dall-e-2/">DALL-E 2</a>, OpenAI's updated text-to-image synthesis neural network, in Pytorch
This is SOTA for text-to-image now, but probably not for long.
## Citations
```bibtex

View File

@@ -0,0 +1 @@
from dalle2_pytorch.dalle2_pytorch import DALLE2

View File

@@ -0,0 +1,11 @@
import torch
import torch.nn.functional as F
from torch import nn, einsum
from einops import rearrange
class DALLE2(nn.Module):
def __init__(self):
super().__init__()
def forward(self, x):
return x

28
setup.py Normal file
View File

@@ -0,0 +1,28 @@
from setuptools import setup, find_packages
setup(
name = 'dalle2-pytorch',
packages = find_packages(exclude=[]),
version = '0.0.1',
license='MIT',
description = 'DALL-E 2',
author = 'Phil Wang',
author_email = 'lucidrains@gmail.com',
url = 'https://github.com/lucidrains/dalle2-pytorch',
keywords = [
'artificial intelligence',
'deep learning',
'text to image'
],
install_requires=[
'einops>=0.4',
'torch>=1.6',
],
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3.6',
],
)