simplify import

This commit is contained in:
Brett Kuprel 2022-07-01 16:02:05 -04:00
parent 18c72ed34d
commit 69683fec94
3 changed files with 5 additions and 4 deletions

View File

@ -2,14 +2,14 @@ import argparse
import os import os
from PIL import Image from PIL import Image
from min_dalle.min_dalle_torch import MinDalleTorch from min_dalle import MinDalleTorch
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument('--mega', action='store_true') parser.add_argument('--mega', action='store_true')
parser.add_argument('--no-mega', dest='mega', action='store_false') parser.add_argument('--no-mega', dest='mega', action='store_false')
parser.set_defaults(mega=False) parser.set_defaults(mega=False)
parser.add_argument('--text', type=str, default='cat') parser.add_argument('--text', type=str, default='alien life')
parser.add_argument('--seed', type=int, default=0) parser.add_argument('--seed', type=int, default=7)
parser.add_argument('--image_path', type=str, default='generated') parser.add_argument('--image_path', type=str, default='generated')
parser.add_argument('--token_count', type=int, default=256) # for debugging parser.add_argument('--token_count', type=int, default=256) # for debugging

2
min_dalle.ipynb vendored
View File

@ -134,7 +134,7 @@
"source": [ "source": [
"import os\n", "import os\n",
"os.chdir('/content/min-dalle')\n", "os.chdir('/content/min-dalle')\n",
"from min_dalle.min_dalle_torch import MinDalleTorch\n", "from min_dalle import MinDalleTorch\n",
"\n", "\n",
"model = MinDalleTorch(is_mega=True, is_reusable=True)" "model = MinDalleTorch(is_mega=True, is_reusable=True)"
] ]

1
min_dalle/__init__.py Normal file
View File

@ -0,0 +1 @@
from .min_dalle_torch import MinDalleTorch