File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 11# texturize — Copyright (c) 2020, Novelty Factory KG. See LICENSE for details.
22
3- import os
43import math
54
65import torch
7- import torch .nn .functional as F
86from creativeai .vision import encoders
97
10- from .critics import GramMatrixCritic , PatchCritic , HistogramCritic
11- from .app import TextureSynthesizer , Application , Result
8+ from .app import Application , Result
129from .io import *
1310
1411
@@ -80,6 +77,8 @@ def process_iterations(
8077 except RuntimeError as e :
8178 if "CUDA out of memory." not in str (e ):
8279 raise
80+ app .log .error (f"ERROR: Out of memory at octave { octave } ." )
81+ app .log .debug (e )
8382
8483 import gc ; gc .collect
8584 torch .cuda .empty_cache ()
Original file line number Diff line number Diff line change @@ -70,6 +70,9 @@ def info(self, *args):
7070 def warn (self , * args ):
7171 print (ansi .YELLOW + "" .join (args ) + ansi .ENDC )
7272
73+ def error (self , * args ):
74+ print (ansi .PINK + "" .join (args ) + ansi .ENDC )
75+
7376
7477class NotebookLog :
7578 class ProgressBar :
You can’t perform that action at this time.
0 commit comments