diffusers-patchfw 0.37__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
diffusers_patchfw.py,sha256=jwdFcVP-8j16czdhJIuGJpoeiqJ1Wn5JlXULV1-JeOw,2156
|
|
2
|
+
diffusers_patchfw-0.37.dist-info/METADATA,sha256=v8zljwabIzC993nqBE9Cxnh9eLZHXctvbXfG_xj_Mm8,168
|
|
3
|
+
diffusers_patchfw-0.37.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
4
|
+
diffusers_patchfw-0.37.dist-info/historia.json,sha256=T1PNoYwrqgwDVLtfmj7L5e0Sq02OEbqHPC8RFhICuUU,2
|
|
5
|
+
diffusers_patchfw-0.37.dist-info/top_level.txt,sha256=22CwqlmYWt4r6_E70gRwnPT3LKlwhkYzUN3bhuwsRpM,18
|
|
6
|
+
diffusers_patchfw-0.37.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
diffusers_patchfw
|
diffusers_patchfw.py
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
try:
|
|
2
|
+
from diffusers.pipelines.controlnet.pipeline_flax_controlnet import (
|
|
3
|
+
FlaxStableDiffusionControlNetPipeline
|
|
4
|
+
)
|
|
5
|
+
except ModuleNotFoundError:
|
|
6
|
+
pass
|
|
7
|
+
else:
|
|
8
|
+
FlaxStableDiffusionControlNetPipeline._run_safety_checker = (
|
|
9
|
+
lambda self, images, safety_model_params, jit=False: (
|
|
10
|
+
images, False
|
|
11
|
+
)
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
try:
|
|
15
|
+
from diffusers.pipelines.deepfloyd_if.safety_checker import (
|
|
16
|
+
IFSafetyChecker
|
|
17
|
+
)
|
|
18
|
+
except ModuleNotFoundError:
|
|
19
|
+
pass
|
|
20
|
+
else:
|
|
21
|
+
IFSafetyChecker.forward = (
|
|
22
|
+
lambda self, clip_input, images, p_threshold=0.5, w_threshold=0.5: (
|
|
23
|
+
images, False, False
|
|
24
|
+
)
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
try:
|
|
28
|
+
from diffusers.pipelines.stable_diffusion.safety_checker import (
|
|
29
|
+
StableDiffusionSafetyChecker
|
|
30
|
+
)
|
|
31
|
+
except ModuleNotFoundError:
|
|
32
|
+
pass
|
|
33
|
+
else:
|
|
34
|
+
StableDiffusionSafetyChecker.forward = (
|
|
35
|
+
lambda self, clip_input, images: (
|
|
36
|
+
images, [False]
|
|
37
|
+
)
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
try:
|
|
41
|
+
from diffusers.pipelines.stable_diffusion.pipeline_flax_stable_diffusion import (
|
|
42
|
+
FlaxStableDiffusionPipeline
|
|
43
|
+
)
|
|
44
|
+
except ModuleNotFoundError:
|
|
45
|
+
pass
|
|
46
|
+
else:
|
|
47
|
+
FlaxStableDiffusionPipeline._run_safety_checker = (
|
|
48
|
+
lambda self, images, safety_model_params, jit=False: (
|
|
49
|
+
images, False
|
|
50
|
+
)
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
try:
|
|
54
|
+
from diffusers.pipelines.stable_diffusion.pipeline_flax_stable_diffusion_img2img import (
|
|
55
|
+
FlaxStableDiffusionImg2ImgPipeline
|
|
56
|
+
)
|
|
57
|
+
except ModuleNotFoundError:
|
|
58
|
+
pass
|
|
59
|
+
else:
|
|
60
|
+
FlaxStableDiffusionImg2ImgPipeline._run_safety_checker = (
|
|
61
|
+
lambda self, images, safety_model_params, jit=False: (
|
|
62
|
+
images, False
|
|
63
|
+
)
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
try:
|
|
67
|
+
from diffusers.pipelines.stable_diffusion.pipeline_flax_stable_diffusion_inpaint import (
|
|
68
|
+
FlaxStableDiffusionInpaintPipeline
|
|
69
|
+
)
|
|
70
|
+
except ModuleNotFoundError:
|
|
71
|
+
pass
|
|
72
|
+
else:
|
|
73
|
+
FlaxStableDiffusionInpaintPipeline._run_safety_checker = (
|
|
74
|
+
lambda self, images, safety_model_params, jit=False: (
|
|
75
|
+
images, False
|
|
76
|
+
)
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
try:
|
|
80
|
+
from diffusers.pipelines.stable_diffusion_safe.pipeline_stable_diffusion_safe import (
|
|
81
|
+
StableDiffusionPipelineSafe
|
|
82
|
+
)
|
|
83
|
+
except ModuleNotFoundError:
|
|
84
|
+
pass
|
|
85
|
+
else:
|
|
86
|
+
StableDiffusionPipelineSafe.run_safety_checker = (
|
|
87
|
+
lambda self, image, device, dtype, enable_safety_guidance: (
|
|
88
|
+
image, None, None
|
|
89
|
+
)
|
|
90
|
+
)
|