change grid_size argument of generate_images to image_count
This commit is contained in:
parent
736904ef2f
commit
24162ee717
2
cog.yaml
vendored
2
cog.yaml
vendored
|
@ -6,7 +6,7 @@ build:
|
||||||
- "libgl1-mesa-glx"
|
- "libgl1-mesa-glx"
|
||||||
- "libglib2.0-0"
|
- "libglib2.0-0"
|
||||||
python_packages:
|
python_packages:
|
||||||
- "min-dalle==0.3.1"
|
- "min-dalle==0.3.3"
|
||||||
run:
|
run:
|
||||||
- pip install torch==1.11.0+cu113 -f https://download.pytorch.org/whl/torch_stable.html
|
- pip install torch==1.11.0+cu113 -f https://download.pytorch.org/whl/torch_stable.html
|
||||||
|
|
||||||
|
|
|
@ -170,7 +170,7 @@ class MinDalle:
|
||||||
self,
|
self,
|
||||||
text: str,
|
text: str,
|
||||||
seed: int,
|
seed: int,
|
||||||
grid_size: int,
|
image_count: int,
|
||||||
log2_mid_count: int,
|
log2_mid_count: int,
|
||||||
log2_k: int = 6,
|
log2_k: int = 6,
|
||||||
log2_supercondition_factor: int = 3,
|
log2_supercondition_factor: int = 3,
|
||||||
|
@ -202,7 +202,7 @@ class MinDalle:
|
||||||
encoder_state, attention_mask, attention_state, image_tokens = (
|
encoder_state, attention_mask, attention_state, image_tokens = (
|
||||||
self.decoder.decode_initial(
|
self.decoder.decode_initial(
|
||||||
seed,
|
seed,
|
||||||
grid_size ** 2,
|
image_count,
|
||||||
text_tokens,
|
text_tokens,
|
||||||
encoder_state
|
encoder_state
|
||||||
)
|
)
|
||||||
|
@ -242,7 +242,7 @@ class MinDalle:
|
||||||
images_stream = self.generate_images_stream(
|
images_stream = self.generate_images_stream(
|
||||||
text,
|
text,
|
||||||
seed,
|
seed,
|
||||||
grid_size,
|
grid_size ** 2,
|
||||||
log2_mid_count,
|
log2_mid_count,
|
||||||
log2_k,
|
log2_k,
|
||||||
log2_supercondition_factor,
|
log2_supercondition_factor,
|
||||||
|
@ -256,7 +256,7 @@ class MinDalle:
|
||||||
self,
|
self,
|
||||||
text: str,
|
text: str,
|
||||||
seed: int = -1,
|
seed: int = -1,
|
||||||
grid_size: int = 1,
|
image_count: int = 1,
|
||||||
log2_k: int = 6,
|
log2_k: int = 6,
|
||||||
log2_supercondition_factor: int = 3,
|
log2_supercondition_factor: int = 3,
|
||||||
is_verbose: bool = False
|
is_verbose: bool = False
|
||||||
|
@ -265,7 +265,7 @@ class MinDalle:
|
||||||
images_stream = self.generate_images_stream(
|
images_stream = self.generate_images_stream(
|
||||||
text,
|
text,
|
||||||
seed,
|
seed,
|
||||||
grid_size,
|
image_count,
|
||||||
log2_mid_count,
|
log2_mid_count,
|
||||||
log2_k,
|
log2_k,
|
||||||
log2_supercondition_factor,
|
log2_supercondition_factor,
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -5,7 +5,7 @@ setuptools.setup(
|
||||||
name='min-dalle',
|
name='min-dalle',
|
||||||
description = 'min(DALL·E)',
|
description = 'min(DALL·E)',
|
||||||
# long_description=(Path(__file__).parent / "README.rst").read_text(),
|
# long_description=(Path(__file__).parent / "README.rst").read_text(),
|
||||||
version='0.3.1',
|
version='0.3.3',
|
||||||
author='Brett Kuprel',
|
author='Brett Kuprel',
|
||||||
author_email='brkuprel@gmail.com',
|
author_email='brkuprel@gmail.com',
|
||||||
url='https://github.com/kuprel/min-dalle',
|
url='https://github.com/kuprel/min-dalle',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user