Update README.md
Browse files
README.md
CHANGED
|
@@ -124,13 +124,7 @@ mask_image = mask_image.convert("L")
|
|
| 124 |
|
| 125 |
width, height = init_image.size
|
| 126 |
|
| 127 |
-
# Load, init model
|
| 128 |
-
controlnet = ControlNetModel().from_config('briaai/DEV-ControlNetInpaintingFast', torch_dtype=torch.float16)
|
| 129 |
-
controlnet.controlnet_cond_embedding = ControlNetConditioningEmbedding(
|
| 130 |
-
conditioning_embedding_channels=320,
|
| 131 |
-
conditioning_channels = 5
|
| 132 |
-
)
|
| 133 |
-
|
| 134 |
controlnet = ControlNetModel().from_pretrained("briaai/DEV-ControlNetInpaintingFast", torch_dtype=torch.float16)
|
| 135 |
vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
|
| 136 |
pipe = StableDiffusionXLControlNetPipeline.from_pretrained("briaai/BRIA-2.3", controlnet=controlnet.to(dtype=torch.float16), torch_dtype=torch.float16, vae=vae) #force_zeros_for_empty_prompt=False, # vae=vae)
|
|
@@ -144,7 +138,6 @@ pipe.enable_xformers_memory_efficient_attention()
|
|
| 144 |
|
| 145 |
generator = torch.Generator(device='cuda:0').manual_seed(123456)
|
| 146 |
|
| 147 |
-
|
| 148 |
vae = pipe.vae
|
| 149 |
|
| 150 |
masked_image, image_mask, masked_image_to_present = get_masked_image(init_image, mask_image, width, height)
|
|
|
|
| 124 |
|
| 125 |
width, height = init_image.size
|
| 126 |
|
| 127 |
+
# Load, init model
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 128 |
controlnet = ControlNetModel().from_pretrained("briaai/DEV-ControlNetInpaintingFast", torch_dtype=torch.float16)
|
| 129 |
vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
|
| 130 |
pipe = StableDiffusionXLControlNetPipeline.from_pretrained("briaai/BRIA-2.3", controlnet=controlnet.to(dtype=torch.float16), torch_dtype=torch.float16, vae=vae) #force_zeros_for_empty_prompt=False, # vae=vae)
|
|
|
|
| 138 |
|
| 139 |
generator = torch.Generator(device='cuda:0').manual_seed(123456)
|
| 140 |
|
|
|
|
| 141 |
vae = pipe.vae
|
| 142 |
|
| 143 |
masked_image, image_mask, masked_image_to_present = get_masked_image(init_image, mask_image, width, height)
|