ucalyptus commited on
Commit
f799d59
1 Parent(s): 33102e1
app.py CHANGED
@@ -3,9 +3,10 @@ os.system("pip install gdown lpips gradio")
3
  os.system("gdown --id 1HKmjg6iXsWr4aFPuU0gBXPGR83wqMzq7 -O align.dat")
4
  os.system("wget https://nvlabs-fi-cdn.nvidia.com/stylegan2-ada-pytorch/pretrained/ffhq.pkl")
5
  os.system("gdown https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-linux.zip")
6
- os.system("unzip -d /usr/local/bin/")
7
  os.system("sudo update-alternatives --install /usr/bin/ninja ninja /usr/local/bin/ninja 1 --force")
8
  os.mkdir("embeddings/")
 
9
 
10
 
11
  import gradio as gr
 
3
  os.system("gdown --id 1HKmjg6iXsWr4aFPuU0gBXPGR83wqMzq7 -O align.dat")
4
  os.system("wget https://nvlabs-fi-cdn.nvidia.com/stylegan2-ada-pytorch/pretrained/ffhq.pkl")
5
  os.system("gdown https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-linux.zip")
6
+ os.system("unzip ninja-linux.zip -d /usr/local/bin/")
7
  os.system("sudo update-alternatives --install /usr/bin/ninja ninja /usr/local/bin/ninja 1 --force")
8
  os.mkdir("embeddings/")
9
+ os.mkdir("images/")
10
 
11
 
12
  import gradio as gr
criteria/localitly_regulizer.py CHANGED
@@ -1,6 +1,5 @@
1
  import torch
2
  import numpy as np
3
- import wandb
4
  from criteria import l2_loss
5
  from configs import hyperparameters
6
  from configs import global_config
 
1
  import torch
2
  import numpy as np
 
3
  from criteria import l2_loss
4
  from configs import hyperparameters
5
  from configs import global_config
edit.py CHANGED
@@ -1,4 +1,3 @@
1
- import wandb
2
  import click
3
  import os
4
  import sys
 
 
1
  import click
2
  import os
3
  import sys
makedirs.py CHANGED
@@ -1,4 +1,3 @@
1
- import wandb
2
  import click
3
  import os
4
  import sys
 
 
1
  import click
2
  import os
3
  import sys
scripts/latent_creators/base_latent_creator.py CHANGED
@@ -8,7 +8,7 @@ from random import choice
8
  from string import ascii_uppercase
9
  import torch
10
  from torch.utils.data import DataLoader
11
- import wandb
12
  from configs import global_config, paths_config
13
  from tqdm import tqdm
14
 
 
8
  from string import ascii_uppercase
9
  import torch
10
  from torch.utils.data import DataLoader
11
+
12
  from configs import global_config, paths_config
13
  from tqdm import tqdm
14
 
scripts/run_pti.py CHANGED
@@ -4,7 +4,7 @@ from torch.utils.data import DataLoader
4
  from torchvision.transforms import transforms
5
  import os
6
  from configs import global_config, paths_config
7
- import wandb
8
 
9
  from training.coaches.multi_id_coach import MultiIDCoach
10
  from training.coaches.single_id_coach import SingleIDCoach
 
4
  from torchvision.transforms import transforms
5
  import os
6
  from configs import global_config, paths_config
7
+
8
 
9
  from training.coaches.multi_id_coach import MultiIDCoach
10
  from training.coaches.single_id_coach import SingleIDCoach
training/coaches/base_coach.py CHANGED
@@ -2,7 +2,7 @@ import abc
2
  import os
3
  import pickle
4
  from argparse import Namespace
5
- import wandb
6
  import os.path
7
  from criteria.localitly_regulizer import Space_Regulizer
8
  import torch
 
2
  import os
3
  import pickle
4
  from argparse import Namespace
5
+
6
  import os.path
7
  from criteria.localitly_regulizer import Space_Regulizer
8
  import torch
training/projectors/w_plus_projector.py CHANGED
@@ -9,7 +9,6 @@
9
  """Project given image to the latent space of pretrained network pickle."""
10
 
11
  import copy
12
- import wandb
13
  import numpy as np
14
  import torch
15
  import torch.nn.functional as F
 
9
  """Project given image to the latent space of pretrained network pickle."""
10
 
11
  import copy
 
12
  import numpy as np
13
  import torch
14
  import torch.nn.functional as F
training/projectors/w_projector.py CHANGED
@@ -9,7 +9,7 @@
9
  """Project given image to the latent space of pretrained network pickle."""
10
 
11
  import copy
12
- import wandb
13
  import numpy as np
14
  import torch
15
  import torch.nn.functional as F
 
9
  """Project given image to the latent space of pretrained network pickle."""
10
 
11
  import copy
12
+
13
  import numpy as np
14
  import torch
15
  import torch.nn.functional as F
utils/log_utils.py CHANGED
@@ -1,6 +1,5 @@
1
  import numpy as np
2
  from PIL import Image
3
- import wandb
4
  from configs import global_config
5
  import torch
6
  import matplotlib.pyplot as plt
 
1
  import numpy as np
2
  from PIL import Image
 
3
  from configs import global_config
4
  import torch
5
  import matplotlib.pyplot as plt