jwengr commited on
Commit
37ab5a2
1 Parent(s): d3782e4

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -19,7 +19,7 @@ tags:
19
  # **Stable Diffusion 2-Based Gray-Inpainting to RGB**
20
 
21
 
22
- 1. **Gray-Inpainting Model**: Fills missing regions of a grayscale image using a masked inpainting diffusion process based on an autoencoder (AE) instead of a variational autoencoder (VAE).
23
 
24
  2. **Gray-to-RGB Conversion Model**: Converts the grayscale image (or inpainted output) into a full-color RGB image by adding a residual path in the AE. internel unet directly predicts difference between gray and color image's latent
25
 
@@ -69,5 +69,5 @@ gray2rgb.to('cuda')
69
  with torch.autocast('cuda',dtype=torch.bfloat16):
70
  with torch.no_grad():
71
  # each model's input image should be one of PIL.Image, List[PIL.Image], preprocessed tensor (B,3,H,W). Image must be 3 channel
72
- image_gray_restored = gray_inpaintor(image_gray_masked, num_inference_steps=250, seed=10)[0].convert('L') # you can pass 'mask' arg explictly. mask : Tensor (B,1,512,512)
73
  image_restored = gray2rgb(image_gray_restored.convert('RGB'))
 
19
  # **Stable Diffusion 2-Based Gray-Inpainting to RGB**
20
 
21
 
22
+ 1. **Gray-Inpainting Model**: Fills missing regions of a grayscale image using a masked inpainting diffusion process based on an autoencoder (AE) instead of a variational autoencoder (VAE). It Contains mask dectector to enable restoration without mask information(or you can pass explicitly)
23
 
24
  2. **Gray-to-RGB Conversion Model**: Converts the grayscale image (or inpainted output) into a full-color RGB image by adding a residual path in the AE. internel unet directly predicts difference between gray and color image's latent
25
 
 
69
  with torch.autocast('cuda',dtype=torch.bfloat16):
70
  with torch.no_grad():
71
  # each model's input image should be one of PIL.Image, List[PIL.Image], preprocessed tensor (B,3,H,W). Image must be 3 channel
72
+ image_gray_restored = gray_inpaintor(image_gray_masked, num_inference_steps=250, seed=10)[0].convert('L') # you can pass 'mask' arg explicitly. mask : Tensor (B,1,512,512)
73
  image_restored = gray2rgb(image_gray_restored.convert('RGB'))