mmedit.apis.inferencers.controlnet_animation_inferencer¶
Module Contents¶
Classes¶
Base inferencer. |
Functions¶
|
Args: |
Attributes¶
- mmedit.apis.inferencers.controlnet_animation_inferencer.VIDEO_EXTENSIONS = ('.mp4', '.mov', '.avi')[源代码]¶
- mmedit.apis.inferencers.controlnet_animation_inferencer.IMAGE_EXTENSIONS = ('.jpg', '.jpeg', '.png', '.JPG', '.JPEG', '.PNG')[源代码]¶
- mmedit.apis.inferencers.controlnet_animation_inferencer.load_image(image: Union[str, PIL.Image.Image]) PIL.Image.Image[源代码]¶
Args: Loads image to a PIL Image.
- image (str or PIL.Image.Image):
The image to convert to the PIL Image format.
- 返回
A PIL Image.
- 返回类型
PIL.Image.Image
- class mmedit.apis.inferencers.controlnet_animation_inferencer.ControlnetAnimationInferencer(config: Union[mmedit.utils.ConfigType, str], device: Optional[str] = None, extra_parameters: Optional[Dict] = None, dtype=torch.float32, **kwargs)[源代码]¶
Bases:
mmedit.apis.inferencers.base_mmedit_inferencer.BaseMMEditInferencerBase inferencer.
- 参数
config (str or ConfigType) – Model config or the path to it.
ckpt (str, optional) – Path to the checkpoint.
device (str, optional) – Device to run inference. If None, the best device will be automatically used.
result_out_dir (str) – Output directory of images. Defaults to ‘’.
- __call__(prompt=None, video=None, negative_prompt=None, controlnet_conditioning_scale=0.7, image_width=512, image_height=512, save_path=None, strength=0.75, num_inference_steps=20, seed=1, **kwargs) Union[Dict, List[Dict]][源代码]¶
Call the inferencer.
- 参数
kwargs – Keyword arguments for the inferencer.
- 返回
Results of inference pipeline.
- 返回类型
Union[Dict, List[Dict]]