Introduction of sd-latent-control-dora-rank128-head3d
Model Details of sd-latent-control-dora-rank128-head3d
ControlLoRA - Head3d Version
ControlLoRA is a neural network structure extended from Controlnet to control diffusion models by adding extra conditions. This checkpoint corresponds to the ControlLoRA conditioned on Head3d.
ControlLoRA uses the same structure as Controlnet. But its core weight comes from UNet, unmodified. Only hint image encoding layers, linear lora layers and conv2d lora layers used in weight offset are trained.
import torch
from PIL import Image
from diffusers import StableDiffusionControlNetPipeline, UNet2DConditionModel, UniPCMultistepScheduler
from models.control_lora import ControlLoRAModel
device = 'cuda'if torch.cuda.is_available() else'cpu'
dtype = torch.float16 if torch.cuda.is_available() else torch.float32
image = Image.open('<Your Conditioning Image Path>')
base_model = "runwayml/stable-diffusion-v1-5"
unet = UNet2DConditionModel.from_pretrained(
base_model, subfolder="unet", torch_dtype=dtype
)
control_lora: ControlLoRAModel = ControlLoRAModel.from_pretrained(
"HighCWu/sd-latent-control-dora-rank128-head3d", torch_dtype=dtype
)
control_lora.tie_weights(unet)
pipe = StableDiffusionControlNetPipeline.from_pretrained(
base_model, unet=unet, controlnet=control_lora, safety_checker=None, torch_dtype=dtype
).to(device)
control_lora.bind_vae(pipe.vae)
pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)
# Remove if you do not have xformers installed# see https://huggingface.co/docs/diffusers/v0.13.0/en/optimization/xformers#installing-xformers# for installation instructions
pipe.enable_xformers_memory_efficient_attention()
# pipe.enable_model_cpu_offload()
image = pipe("Girl smiling, professional dslr photograph, high quality", image, num_inference_steps=20).images[0]
image.show()
You can find some example images below.
prompt: a photography of a man with a beard and sunglasses on
prompt: worst quality , low quality , portrait , close - up , inconsistent head shape
prompt: a photography of a man with a mustache and a suit jacket
Runs of HighCWu sd-latent-control-dora-rank128-head3d on huggingface.co
30
Total runs
0
24-hour runs
-1
3-day runs
-3
7-day runs
19
30-day runs
More Information About sd-latent-control-dora-rank128-head3d huggingface.co Model
More sd-latent-control-dora-rank128-head3d license Visit here:
sd-latent-control-dora-rank128-head3d huggingface.co is an AI model on huggingface.co that provides sd-latent-control-dora-rank128-head3d's model effect (), which can be used instantly with this HighCWu sd-latent-control-dora-rank128-head3d model. huggingface.co supports a free trial of the sd-latent-control-dora-rank128-head3d model, and also provides paid use of the sd-latent-control-dora-rank128-head3d. Support call sd-latent-control-dora-rank128-head3d model through api, including Node.js, Python, http.
sd-latent-control-dora-rank128-head3d huggingface.co is an online trial and call api platform, which integrates sd-latent-control-dora-rank128-head3d's modeling effects, including api services, and provides a free online trial of sd-latent-control-dora-rank128-head3d, you can try sd-latent-control-dora-rank128-head3d online for free by clicking the link below.
HighCWu sd-latent-control-dora-rank128-head3d online free url in huggingface.co:
sd-latent-control-dora-rank128-head3d is an open source model from GitHub that offers a free installation service, and any user can find sd-latent-control-dora-rank128-head3d on GitHub to install. At the same time, huggingface.co provides the effect of sd-latent-control-dora-rank128-head3d install, users can directly use sd-latent-control-dora-rank128-head3d installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
sd-latent-control-dora-rank128-head3d install url in huggingface.co: