Closed mapleyuan closed 3 years ago
I have solve prob. check the path config
could you please tell me how I can fix the error that is similar to you,I would be appreciative if you could help me KeyError Traceback (most recent call last) Input In [36], in <cell line: 1>() 3 device = 'cuda:0' # please use GPU, do not use CPU 4 path = 'COCO2014_Language-free_Gaussian.pkl' # pre-trained model ----> 5 generator = Generator(device=device, path=path) 6 clipmodel, = clip.load("ViT-B/32", device=device) 7 clip_model = clip_model.eval()
Input In [35], in Generator.init(self, device, path) 2 def init(self, device, path): 3 self.name = 'generator' ----> 4 self.model = self.load_model(device, path) 5 self.device = device 6 self.force_32 = False
Input In [35], in Generator.load_model(self, device, path) 8 def load_model(self, device, path): 9 with dnnlib.util.open_url(path) as f: ---> 10 network= legacy.load_network_pkl(f) 11 self.G_ema = network['G_ema'].to(device) 12 self.D = network['D'].to(device)
File D:\Lafite-main\legacy.py:14, in load_network_pkl(f, force_fp16) 13 def load_network_pkl(f, force_fp16=False): ---> 14 data = _LegacyUnpickler(f).load() 16 # Legacy TensorFlow pickle => convert. 17 if isinstance(data, tuple) and len(data) == 3 and all(isinstance(net, _TFNetworkStub) for net in data):
File D:\Lafite-main\torch_utils\persistence.py:186, in _reconstruct_persistent_obj(meta) 183 module = _src_to_module(meta.module_src) 185 assert meta.type == 'class' --> 186 orig_class = module.dict[meta.class_name] 187 decorator_class = persistent_class(orig_class) 188 obj = decorator_class.new(decorator_class)
KeyError: 'FullyConnectedLayer'
hi, i have run the file run_PTI, but get the error: KeyError: 'FullyConnectedLayer' detail: KeyError Traceback (most recent call last)