Giter Club home page Giter Club logo

ganinterface's People

Contributors

nolan-dev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ganinterface's Issues

Non frozen models?

I was looking into porting this to something like pytorch, however in order to do so (efficiently) I would need the non frozen models (the checkpoints, meta, etc). I was wondering if you'd be willing to upload said data somewhere :)

Thanks

Compatibility with other models (*.pb)? Also, I found a way to use cudnn with this.

a. Is this compatible with 1024x1024 models like these:
https://github.com/a312863063/generators-with-stylegan2
?
(It says it's StyleGAN2 though)

b. Are there hardcoded parts in the (C# and the dll) codes?

c. I saved a *.pkl model to *.pb on GoogleColab with this script:

############
import pickle
import dnnlib.tflib as tflib
import tensorflow as tf

EXPORT_PATH = "savemodel2"

tflib.init_tf()
_G, _D, Gs = pickle.load(open("xxx.pkl", "rb"))

sess = tf.get_default_session()

tf.saved_model.simple_save(
sess,
EXPORT_PATH,
inputs={t.name:t for t in Gs.input_templates},
outputs={t.name:t for t in Gs.output_templates})
############

(from http://tachibana.ai/2019/06/15/Portal-Log-One.html)

It generates a pb and a "Variables" folder (Weights not embed inside pb?), Can this kind of saved binary be loaded?

=============

Also I found that replacing tensorflow.dll with Topaz ones from
https://d2xkriaa67cpt4.cloudfront.net/packages/win/topazmask/com.topazlabs.topazmask.libs3rdparty/1.0.7topazmasklibs3rdparty.7z
can make this use cudnn:

with cudnn:
cudnn

without cudnn:
nocudnn

Any of you who has interest can try yourself. This one
https://d2xkriaa67cpt4.cloudfront.net/packages/win/topazstudio2/com.topazlabs.topazstudio2.libs3rdparty/2.1.1topazstudio2libs3rdparty.7z
(TF 1.14, no cudnn) works too.

System.FormatException when launching or using some features

Hello, I got an error when trying to launch the interface or using some of the features (for example, I can't import images):

System.FormatException: Input string was not in a correct format.
at System.Number.ParseSingle(String value, NumberStyles options, NumberFormatInfo numfmt)
at System.Single.Parse(String s)
at System.Array.ConvertAll[TInput,TOutput](TInput[] array, Converter`2 converter)
at GanimeStudio.LatentManipulator.ReadAverageLatentFromCsv(String csvPath)
at GanimeStudio.GanimeStudio.Form1_Load(Object sender, EventArgs el)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

I have .NET framework 4.7 installed (and others versions as well, perhaps it's conflicting).

How to use a stylegan2 pkl like cat image pkl, to generate images

I want to make a morphing cat gif.

I have downloaded the stylegan2 cat pkl, as well as the compiled version of GANInterface from the anime tutorial, hoping to instead generate a morphing cat animation gif from images and their interpolations generated from the cat pkl.

How do I do this? Is their an option to load other stylegan2 pkl from the compiled ui? If there is no pkl loading option, is there a way to convert pkl to latent space for loading into GANInterface? (I ask the last question because I notice changing name of "data_b75d22410203401232872f3627826b4d" folder leads to an error, and I suspect this particular error concerns some saved pkl in some way.

256x512 resolution anime generation

I think it would be really useful if there was an option to make 256x512 resolution anime artworks, as they can be used in card games, visual novels, RPGs, and many other gaming and artistic mediums, removing a lot of the existing barriers for creativity in those fields.

Thanks again for making the future possible! This is one of the AI I'm most excited for its potential.

Conversion of .pkl to .pb file?

Actually I want to convert pkl to pb file with all the weights, variables and the tensorflow inference frozen graph stored into it? Can you even write the script for the conversion of such file? Will be of great help.
The shell script docker run will convert all the parameters mentioned above? Some problems with permission denied with the shell script run.

Add compilation instructions / release compiled version?

Hello! Could you update the readme with instructions for compiling the GANStudio executable? Or, would you be willing to drop your compiled exe in a release tab in this repo? I'd love to try this out but I'm at a loss for getting the projects compiled.

For additional context on what I've tried so far (I'm doing this on Windows 7 x64 with Visual Studio 2019, and I'm honestly not familiar with it at all...): I loaded and compiled each of the different solutions for TensorflowInterface, GanTools, and GanStudio in turn. Compiling GanStudio does create an executable but it throws an error. I figured out I needed a graph.pb and related StyleGAN checkpoint, so I put that in the bin folder alongside the executable. That seemed to work, but a new error indicated GanTools.dll was missing a required dll (Exception thrown: 'System.ArgumentException' in GanTools.dll ...I don't know how to get more verbose debug messages). I guessed it needed the TensorflowInterface.dll, which itself needed a Tensorflow.dll (I acquired one, unsure if it is the right version or if that matters at all), and I dropped all of those in the same folder as the GanStudio.exe. Anyway, that didn't work so I'm pretty much stuck. Hopefully I am just doing something foolish and there's a simple solution. I think I have the correct .NET framework version 4.7.2 and AVX enabled, if that matters.

Bad results for pb model inference?

@nolan-dev
Hi, firstly really thanks for your work.
I am finding a way to convert stylegan2.pkl model to .pb file. And I get succeed using your pkl_convert fuc, thanks!
The problem is that after I trying 2 model (ffhq-512-config-f.pkl and animeportraits-conf-f-512.pkl) and convert them to pb format,
then inference using .pb model.
But ffhq is good but anime is worse. I don't know why, Could you please tell me why about this ?

ffhq Result:
ffhq pkl model: https://drive.google.com/file/d/1Krc_m8Nj2PQXu9yBUnJ8-Na4mud_VCIj/view?usp=sharing
good

anime Result:
anime pkl model: https://drive.google.com/file/d/1exJwAJQT6BsdStyfuOkBTyZF4QeK5T61/view?usp=sharing
bad_1

Part inference code:

input_tensor = graph.get_tensor_by_name('Gs/dlatent_avg:0')
output_tensor = graph.get_tensor_by_name('Gs/G_synthesis/output:0')

How to find a stable combination of feature maps to edit specified locations?

really appreciate your nice work!
But I have a small trouble. you have found the stable combination of feature map to edit anime faces.
but when I edit the non-anime face images on your v0.2.0-alpha using ffhq.pb . I can't find a stable combination of feature maps to edit specified area of those face photos,such as mouth-smiling.
How to get those combination?
looking forward to your reply?Thanks

Generating image pushes UI outside the window and becomes inaccessible

I generate an image at 1024px and it's so large that the contents of the window with all the controls and buttons are pushed to the side, to the point of being outside the window and inaccessible. There's no horizontal scroll, there's no zoom out option that I can see, there's no way to pop out the image or hide it, I genuinely can't use the program because of this.

Clipboard02

Stylegan Pytorch Ada pkl conversion

Hello,

I am getting an error while trying to convert a stylegan pytorch ada model (.pkl) to a pb using your instructions, I get this error:
Loading networks from "../file.pkl"... Traceback (most recent call last): File "run_conversion.py", line 70, in <module> main() File "run_conversion.py", line 65, in main save_weights(args.network) File "run_conversion.py", line 24, in save_weights _G, _D, Gs = pretrained_networks.load_networks(network_pkl) File "/tmp/work/stylegan2/pretrained_networks.py", line 76, in load_networks G, D, Gs = pickle.load(stream, encoding='latin1') ModuleNotFoundError: No module named 'torch_utils'
Is there any way to solve this ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.