Lurker News

Comments (148) 33 threads

Earlier comments
mg1 reply#
What is the maximum resolution possible with this?

If it depends on the hardware, what would be the limit when one rents the biggest machine available in the cloud?

jwitthuhn1 reply#
Fixed size of 256x256. It cannot go any bigger or smaller.
01acheru3 replies#
Out of curiosity: why it cannot be changed? I know nothing about this field so... thanks!
freemint#
Because that is how the network is trained. You could modify the network size and retrain to get different resolutions.
petercooper#
It's already being scaled up to 256x256 from something smaller anyway. You could add an extra upscaler to go further which I've tried with moderate success, but you're basically doing CSI style 'enhance' over and over.
ShamelessC#
Transformers output fixed-length sequences. For this transformer they chose 256 pixels, or 32 "image tokens" that each decode to an 8-by-8 pixel "patch".

You can technically increase or decrease this - or use a different aspect ratio by using more or fewer image tokens, but this is static after you start training. It will also require more "decodes" from the backbone VQGAN model (responsible for converting pixels to image tokens), and thus take longer to run inference on.
CLIP-guided VQGAN can get around this by taking the average CLIP score over multiple "cutouts" of the whole image allowing for a broad range of resolutions and aspect ratios.

jcims1 reply#
The google collab link works if you replace the computed path to flax_model.msgpack on line 10 in load_params.py with ‘/content/pretrained/vqgan/flax_model.msgpack’

Edit: actually it's easier to open a terminal and move /content/pretrained/vqgan to /content/min-dalle/pretrained/vqgan

kuprel1 reply#
Thanks for figuring this out. The problem was that the vqgan repository was being cloned to the wrong directory. The updated colab should work now
DivineTraube1 reply#
The updated version gives me this (after successful setup with the example alien thing):

UnfilteredStackTrace Traceback (most recent call last) in () 2 ----> 3 image = generate_image_from_text("alien life", seed=7) 4 display(image)
67 frames UnfilteredStackTrace: TypeError: lax.dynamic_update_slice requires arguments to have the same dtypes, got float16, float32.
The stack trace below excludes JAX-internal frames. The preceding is the original exception that occurred, unmodified.
--------------------
The above exception was the direct cause of the following exception:
TypeError Traceback (most recent call last) /content/min-dalle/min_dalle/models/dalle_bart_decoder_flax.py in __call__(self, decoder_state, keys_state, values_state, attention_mask, state_index) 38 keys_state, 39 self.k_proj(decoder_state).reshape(shape_split), ---> 40 state_index 41 ) 42 values_state = lax.dynamic_update_slice(
TypeError: lax.dynamic_update_slice requires arguments to have the same dtypes, got float16, float32.

jcims1 reply#
You need to install flax 0.4.2. If you're using collab you just open a terminal (icon in the bottom left of the screen) and run:

    pip3 install flax==0.4.2

Continue this thread — 1 reply

bjarneh#

   TypeError: lax.dynamic_update_slice requires arguments to have the same dtypes, got float32, float16.
godmode2019#
That dinosaur image has fantastic meme potential

Load more comments