mirror of
https://github.com/vladmandic/automatic
synced 2026-09-20 01:31:13 +02:00
fix installer and requirements
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import os
|
||||
|
||||
import modules.face_restoration
|
||||
from installer import install
|
||||
from modules import paths, shared, devices, modelloader, errors
|
||||
|
||||
model_dir = "GFPGAN"
|
||||
@@ -72,8 +72,11 @@ def setup_model(dirname):
|
||||
except Exception:
|
||||
pass
|
||||
try:
|
||||
install('basicsr')
|
||||
install('gfpgan')
|
||||
import gfpgan
|
||||
import facexlib
|
||||
import modules.face_restoration
|
||||
|
||||
global user_path # pylint: disable=global-statement
|
||||
global have_gfpgan # pylint: disable=global-statement
|
||||
|
||||
@@ -9,6 +9,7 @@ from tqdm import tqdm
|
||||
import safetensors.torch
|
||||
import numpy as np
|
||||
from PIL import Image, PngImagePlugin
|
||||
from installer import install
|
||||
from modules import shared, devices, processing, sd_models, images, errors
|
||||
import modules.textual_inversion.dataset
|
||||
from modules.textual_inversion.learn_schedule import LearnRateScheduler
|
||||
@@ -432,6 +433,7 @@ def write_loss(log_directory, filename, step, epoch_len, values):
|
||||
|
||||
|
||||
def tensorboard_setup(log_directory):
|
||||
install('tensorboard')
|
||||
from torch.utils.tensorboard import SummaryWriter
|
||||
os.makedirs(os.path.join(log_directory, "tensorboard"), exist_ok=True)
|
||||
return SummaryWriter(
|
||||
|
||||
Reference in New Issue
Block a user