forgot missing 2**

This commit is contained in:
Brett Kuprel 2022-07-04 23:29:48 -04:00
parent 976f438879
commit ccdcbc7d46
5 changed files with 5 additions and 5 deletions

2
cog.yaml vendored
View File

@ -6,7 +6,7 @@ build:
- "libgl1-mesa-glx"
- "libglib2.0-0"
python_packages:
- "min-dalle==0.2.26"
- "min-dalle==0.2.27"
run:
- pip install torch==1.10.0+cu113 -f https://download.pytorch.org/whl/torch_stable.html

View File

@ -34,7 +34,7 @@ class Predictor(BasePredictor):
supercondition_factor: int = Input(
description='Lower results in a wider variety of images but less agreement with the text',
choices=[2, 4, 8, 16, 32, 64],
default=16
default=8
),
) -> Iterator[Path]:
image_stream = self.model.generate_image_stream(

2
min_dalle.ipynb vendored
View File

@ -180,7 +180,7 @@
"grid_size = 3 #@param {type:\"integer\"}\n",
"seed = -1 #@param {type:\"integer\"}\n",
"intermediate_image_count = 8 #@param [\"1\", \"2\", \"4\", \"8\", \"16\"] {type:\"raw\"}\n",
"supercondition_factor = 16 #@param [\"2\", \"4\", \"8\", \"16\", \"32\", \"64\"] {type:\"raw\"}\n",
"supercondition_factor = 8 #@param [\"2\", \"4\", \"8\", \"16\", \"32\", \"64\"] {type:\"raw\"}\n",
"\n",
"image_stream = model.generate_image_stream(\n",
" text=text,\n",

View File

@ -164,7 +164,7 @@ class DalleBartDecoder(nn.Module):
)
decoder_state = self.final_ln(decoder_state)
logits = self.lm_head(decoder_state)
a = log2_supercondition_factor
a = 2 ** log2_supercondition_factor
logits: FloatTensor = (
logits[:image_count, -1] * (1 - a) +
logits[image_count:, -1] * a

View File

@ -5,7 +5,7 @@ setuptools.setup(
name='min-dalle',
description = 'min(DALL·E)',
long_description=(Path(__file__).parent / "README.rst").read_text(),
version='0.2.26',
version='0.2.27',
author='Brett Kuprel',
author_email='brkuprel@gmail.com',
url='https://github.com/kuprel/min-dalle',