mirror of
https://github.com/deepfakes/faceswap.git
synced 2026-10-16 21:13:34 +08:00
extract bugfixes: vgg-obstructed model path + unet-dfl output shape
This commit is contained in:
@@ -68,7 +68,7 @@ class UNetDFL(FacePlugin):
|
||||
-------
|
||||
The predicted masks from the plugin
|
||||
"""
|
||||
return self.from_torch(batch.transpose(0, 3, 1, 2)).transpose(0, 2, 3, 1)
|
||||
return self.from_torch(batch.transpose(0, 3, 1, 2))[:, 0]
|
||||
|
||||
|
||||
class ConvBlock(nn.Module):
|
||||
|
||||
@@ -39,7 +39,7 @@ class VGGObstructed(FacePlugin):
|
||||
-------
|
||||
The loaded VGGObstructed model
|
||||
"""
|
||||
weights = GetModel("Nirkin_500_softmax_v2.pth", 8).model_path
|
||||
weights = GetModel("Nirkin_500_softmax_v2.pth", 5).model_path
|
||||
assert isinstance(weights, str)
|
||||
return T.cast(VGGObstructedModel, self.load_torch_model(VGGObstructedModel(),
|
||||
weights,
|
||||
|
||||
Reference in New Issue
Block a user