diff options
Diffstat (limited to 'pipelines/stable_diffusion')
-rw-r--r-- | pipelines/stable_diffusion/no_check.py | 13 |
1 files changed, 13 insertions, 0 deletions
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 @@ | |||
1 | from diffusers import ModelMixin | ||
2 | import torch | ||
3 | |||
4 | |||
5 | class NoCheck(ModelMixin): | ||
6 | """Can be used in place of safety checker. Use responsibly and at your own risk.""" | ||
7 | |||
8 | def __init__(self): | ||
9 | super().__init__() | ||
10 | self.register_parameter(name='asdf', param=torch.nn.Parameter(torch.randn(3))) | ||
11 | |||
12 | def forward(self, images=None, **kwargs): | ||
13 | return images, [False] | ||