summaryrefslogtreecommitdiffstats
path: root/pipelines
diff options
context:
space:
mode:
Diffstat (limited to 'pipelines')
-rw-r--r--pipelines/stable_diffusion/no_check.py13
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 @@
1from diffusers import ModelMixin
2import torch
3
4
5class 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]