From 5588b93859c4380082a7e46bf5bef2119ec1907a Mon Sep 17 00:00:00 2001 From: Volpeon Date: Mon, 26 Sep 2022 16:36:42 +0200 Subject: Init --- pipelines/stable_diffusion/no_check.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 pipelines/stable_diffusion/no_check.py (limited to 'pipelines/stable_diffusion') diff --git a/pipelines/stable_diffusion/no_check.py b/pipelines/stable_diffusion/no_check.py new file mode 100644 index 0000000..06c2f72 --- /dev/null +++ b/pipelines/stable_diffusion/no_check.py @@ -0,0 +1,13 @@ +from diffusers import ModelMixin +import torch + + +class NoCheck(ModelMixin): + """Can be used in place of safety checker. Use responsibly and at your own risk.""" + + def __init__(self): + super().__init__() + self.register_parameter(name='asdf', param=torch.nn.Parameter(torch.randn(3))) + + def forward(self, images=None, **kwargs): + return images, [False] -- cgit v1.2.3-70-g09d2