Image-to-Image
Diffusers
Safetensors
stable-diffusion
stable-diffusion-diffusers
controlnet
control-lora
Instructions to use HighCWu/sd-control-lora-face-landmarks with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use HighCWu/sd-control-lora-face-landmarks with Diffusers:
pip install -U diffusers transformers accelerate
from diffusers import ControlNetModel, StableDiffusionControlNetPipeline controlnet = ControlNetModel.from_pretrained("HighCWu/sd-control-lora-face-landmarks") pipe = StableDiffusionControlNetPipeline.from_pretrained( "runwayml/stable-diffusion-v1-5", controlnet=controlnet ) - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -37,7 +37,6 @@ from PIL import Image
|
|
| 37 |
from diffusers import StableDiffusionControlNetPipeline, UNet2DConditionModel, UniPCMultistepScheduler
|
| 38 |
import torch
|
| 39 |
from PIL import Image
|
| 40 |
-
from diffusers.utils import load_image
|
| 41 |
from models.controllora import ControlLoRAModel
|
| 42 |
|
| 43 |
image = Image.open('<Your Conditioning Image Path>')
|
|
@@ -45,13 +44,13 @@ image = Image.open('<Your Conditioning Image Path>')
|
|
| 45 |
unet = UNet2DConditionModel.from_pretrained(
|
| 46 |
"runwayml/stable-diffusion-v1-5", subfolder="unet"
|
| 47 |
)
|
| 48 |
-
controllora =
|
| 49 |
"HighCWu/HighCWu/sd-controllora-face-landmarks", torch_dtype=torch.float16
|
| 50 |
)
|
| 51 |
controllora.tie_weights(unet)
|
| 52 |
|
| 53 |
pipe = StableDiffusionControlNetPipeline.from_pretrained(
|
| 54 |
-
"runwayml/stable-diffusion-v1-5", unet=unet, controlnet=
|
| 55 |
)
|
| 56 |
|
| 57 |
pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)
|
|
|
|
| 37 |
from diffusers import StableDiffusionControlNetPipeline, UNet2DConditionModel, UniPCMultistepScheduler
|
| 38 |
import torch
|
| 39 |
from PIL import Image
|
|
|
|
| 40 |
from models.controllora import ControlLoRAModel
|
| 41 |
|
| 42 |
image = Image.open('<Your Conditioning Image Path>')
|
|
|
|
| 44 |
unet = UNet2DConditionModel.from_pretrained(
|
| 45 |
"runwayml/stable-diffusion-v1-5", subfolder="unet"
|
| 46 |
)
|
| 47 |
+
controllora = ControlLoRAModel.from_pretrained(
|
| 48 |
"HighCWu/HighCWu/sd-controllora-face-landmarks", torch_dtype=torch.float16
|
| 49 |
)
|
| 50 |
controllora.tie_weights(unet)
|
| 51 |
|
| 52 |
pipe = StableDiffusionControlNetPipeline.from_pretrained(
|
| 53 |
+
"runwayml/stable-diffusion-v1-5", unet=unet, controlnet=controllora, safety_checker=None, torch_dtype=torch.float16
|
| 54 |
)
|
| 55 |
|
| 56 |
pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)
|