Upload folder using huggingface_hub
Browse files
gray-inpaint/config.json
CHANGED
@@ -10,6 +10,6 @@
|
|
10 |
"height": 512,
|
11 |
"model_type": "sd_gray_inpaint",
|
12 |
"torch_dtype": "float32",
|
13 |
-
"transformers_version": "4.
|
14 |
"width": 512
|
15 |
}
|
|
|
10 |
"height": 512,
|
11 |
"model_type": "sd_gray_inpaint",
|
12 |
"torch_dtype": "float32",
|
13 |
+
"transformers_version": "4.47.0",
|
14 |
"width": 512
|
15 |
}
|
gray-inpaint/model.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 4055354432
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9d7e04ec5bbbda567c7fa7e1d8478f997ec5bc1376dc3fa633dc737171b774da
|
3 |
size 4055354432
|
gray-inpaint/modeling_sd_gray_inpaint.py
CHANGED
@@ -64,6 +64,7 @@ class SDGrayInpaintModel(PreTrainedModel):
|
|
64 |
masks_logits = self.mask_predictor(images_gray_masked)
|
65 |
masks = (torch.sigmoid(masks_logits)>0.5)*1.
|
66 |
masks = masks.float().to(self.vae.device)
|
|
|
67 |
B, C, H, W = images_gray_masked.shape
|
68 |
prompt_embeds = self.prompt_embeds.repeat(B,1,1)
|
69 |
|
|
|
64 |
masks_logits = self.mask_predictor(images_gray_masked)
|
65 |
masks = (torch.sigmoid(masks_logits)>0.5)*1.
|
66 |
masks = masks.float().to(self.vae.device)
|
67 |
+
images_gray_masked = (1-masks) * images_gray_masked
|
68 |
B, C, H, W = images_gray_masked.shape
|
69 |
prompt_embeds = self.prompt_embeds.repeat(B,1,1)
|
70 |
|
modeling_sd_gray_inpaint.py
CHANGED
@@ -64,6 +64,7 @@ class SDGrayInpaintModel(PreTrainedModel):
|
|
64 |
masks_logits = self.mask_predictor(images_gray_masked)
|
65 |
masks = (torch.sigmoid(masks_logits)>0.5)*1.
|
66 |
masks = masks.float().to(self.vae.device)
|
|
|
67 |
B, C, H, W = images_gray_masked.shape
|
68 |
prompt_embeds = self.prompt_embeds.repeat(B,1,1)
|
69 |
|
|
|
64 |
masks_logits = self.mask_predictor(images_gray_masked)
|
65 |
masks = (torch.sigmoid(masks_logits)>0.5)*1.
|
66 |
masks = masks.float().to(self.vae.device)
|
67 |
+
images_gray_masked = (1-masks) * images_gray_masked
|
68 |
B, C, H, W = images_gray_masked.shape
|
69 |
prompt_embeds = self.prompt_embeds.repeat(B,1,1)
|
70 |
|