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

How to use your own models in this notebook #1

Open
mindblowingaiart opened this issue Apr 24, 2021 · 3 comments
Open

How to use your own models in this notebook #1

mindblowingaiart opened this issue Apr 24, 2021 · 3 comments

Comments

@mindblowingaiart
Copy link

mindblowingaiart commented Apr 24, 2021

Hi I wanted to try out mixing the layers of two of my model .pkls using your notebook, I can get it to work for the models which come in the notebook (when you run the code line and it downloads them), but if I mount my drive and move MY .pkls to the same spot as the ones installed automatically by the "neural networks handling" cell, and try to blend those networks together it doesn't work? Not sure what I am doing wrong...

When I go to insert text here for the mix layers step - if I just put the name of the .pkl it doesn't work, unless I use the networks which were downloaded in the "neural networks handling" step...In which case it works if I just put in two of the names from the downloaded ones.

If I use my own networks for layers do I need to run the 'utility function step' for it to work or just "installs" & "mix layer"?

Hopefully there is an easy fix for this or something simple I am missing ( I am not a coder so just looking for an easy explanation how I could do this if possible). This seems to be the easiest notebook I have found for network blending that I can wrap my head around, now if I could just get it to work for my own networks... thanks for making this.

@dobrosketchkun
Copy link
Owner

if I mount my drive and move MY .pkls to the same spot as the ones installed automatically by the "neural networks handling" cell, and try to blend those networks together it doesn't work? Not sure what I am doing wrong...

So you are saying you mount your google drive and copy your styleGAN2-ada model .pkl files in /content/ folder? What type of error are we talking about?

If I use my own networks for layers do I need to run the 'utility function step' for it to work

Yes, you should run it.

@mindblowingaiart
Copy link
Author

mindblowingaiart commented Apr 24, 2021

I figured out what to do -
1)mount google drive

from google.colab import drive
drive.mount('/content/drive')

2)I had to replace your .json link with my .json link, and then I uploaded the .json file itself into the content folder of Gdrive. In order to run the cell properly first you have to click the 3 verticle dots on the right of the "nueral networks handling cell", click show code, and then change the .json link to your github link (which you have to create beforehand by making a repository on github and uploading the .json file to gdrive content folder).

3)Next change the code right below this to the actual .json file location itself - see where it says 'content/...' right under the github 'raw' .json url link you just changed.

Thats what you will replace with the file path of the .json file(you will need to upload the .json file to your gdrive content folder and click copy path). the .json file structure looks like this:
{"portraits" : "https://drive.google.com/file/d/10hCoR57tc0q40_WwezxSOAiNXKmqPE/view?usp=sharing",
"variety" : "https://drive.google.com/file/d/10hCoR57tc0q40_WyGweSOAiNXKmqPE/view?usp=sharing"}

After the cell runs, you will be able to type in the names for each network which you want to mix.

@dobrosketchkun
Copy link
Owner

Yeah, it's one way to address this issue. I'm glad you figured it out since I'm was kind of slow on a solution.

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

2 participants