alis icon indicating copy to clipboard operation
alis copied to clipboard

Colab?

Open Devetec opened this issue 3 years ago • 8 comments

Any way to run this in colab?

Devetec avatar Apr 17 '21 20:04 Devetec

got it running from the notebooks/generate.ipynb example somehow: https://colab.research.google.com/drive/1WCrjoz130n6hc2o34KCizVXpxKIZylLM

I was able to export a landscape panorama video but if anyone has any hints on how to use your own .pkl file instead of the default lhq1024-snapshot.pkl that'd be awesome :)

gllmp avatar Apr 21 '21 00:04 gllmp

@Devetec yes, you can run the model in Colab: here is the Colab version of notebooks/generate.ipynb.

universome avatar Apr 21 '21 10:04 universome

@gllmp Could you please tell what problem you encounter when using your own .pkl file?

universome avatar Apr 21 '21 10:04 universome

@universome thank you for sharing the Colab version, that's really cool !

when I tried to use my own .pkl file I got this error:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-8-d6861fec3e68> in <module>()
     22 
     23 with dnnlib.util.open_url(network_pkl) as f:
---> 24     G = load_network_pkl(f)['G_ema'].to(device) # type: ignore
     25     G.eval()
     26     G.progressive_growing_update(100000)

7 frames
/content/alis/training/networks.py in __init__(self, in_channels, out_channels, w_dim, resolution, img_channels, is_last, architecture, resample_filter, conv_clamp, use_fp16, fp16_channels_last, cfg, **layer_kwargs)
    735         self.w_dim = w_dim
    736 
--> 737         if resolution <= self.cfg.min_resolution:
    738             self.resolution = self.cfg.min_resolution
    739             self.up = 1

TypeError: '<=' not supported between instances of 'int' and 'NoneType'

It looks like a resolution problem, but not sure what's going on. The pickle was created with StyleGAN2-ADA on a custom dataset w/ rooms images using ffhq1024 as transfer learning source.

Alternatively, I'd be curious to know how to try the LSUN Bedroom dataset instead, the extrapolation example in the project page looked fantastic !

gllmp avatar Apr 22 '21 17:04 gllmp

@gllmp I'm pretty sure you have to train using the ALIS code (maybe)

Devetec avatar Apr 22 '21 19:04 Devetec

@gllmp Yes, as @Devetec said, it is not possible to use original StyleGAN2's checkpoints with ALIS code since there are large differences in architectures (like patchwise generation and coordinate conditioning). But honestly, your question makes me think that it might actually be possible to redesign ALIS in such a way that it is convertible from StyleGAN2, though it is not trivial and I expect the quality to be lower.

universome avatar Apr 24 '21 08:04 universome

Training can be done like this: https://github.com/universome/alis#training

timelf123 avatar May 23 '21 20:05 timelf123

after training how use it ? thank's i'm big fan !

kilik128 avatar Dec 18 '21 20:12 kilik128