Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Colab? #1

Open
Devetec opened this issue Apr 17, 2021 · 8 comments
Open

Colab? #1

Devetec opened this issue Apr 17, 2021 · 8 comments

Comments

@Devetec
Copy link

Devetec commented Apr 17, 2021

Any way to run this in colab?

@gllmp
Copy link

gllmp commented Apr 21, 2021

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 :)

@universome
Copy link
Owner

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

@universome
Copy link
Owner

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

@gllmp
Copy link

gllmp commented Apr 22, 2021

@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 !

@Devetec
Copy link
Author

Devetec commented Apr 22, 2021

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

@universome
Copy link
Owner

@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.

@timelf123
Copy link

timelf123 commented May 23, 2021

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

@kilik128
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants