FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
diffusers/src/diffusers/__init__.py at patch-2 · themrzmaster/diffusers · GitHub
themrzmaster
/
diffusers
Public
forked from
huggingface/diffusers
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
diffusers
/
src
/
diffusers
/
__init__.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
245 lines (230 loc) · 7.76 KB
Breadcrumbs
diffusers
/
src
/
diffusers
/
__init__.py
Copy path
File metadata and controls
245 lines (230 loc) · 7.76 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
__version__
=
"0.17.0.dev0"
from
.
configuration_utils
import
ConfigMixin
from
.
utils
import
(
OptionalDependencyNotAvailable
,
is_flax_available
,
is_inflect_available
,
is_k_diffusion_available
,
is_k_diffusion_version
,
is_librosa_available
,
is_note_seq_available
,
is_onnx_available
,
is_scipy_available
,
is_torch_available
,
is_torchsde_available
,
is_transformers_available
,
is_transformers_version
,
is_unidecode_available
,
logging
,
)
try
:
if
not
is_onnx_available
():
raise
OptionalDependencyNotAvailable
()
except
OptionalDependencyNotAvailable
:
from
.
utils
.
dummy_onnx_objects
import
*
# noqa F403
else
:
from
.
pipelines
import
OnnxRuntimeModel
try
:
if
not
is_torch_available
():
raise
OptionalDependencyNotAvailable
()
except
OptionalDependencyNotAvailable
:
from
.
utils
.
dummy_pt_objects
import
*
# noqa F403
else
:
from
.
models
import
(
AutoencoderKL
,
ControlNetModel
,
ModelMixin
,
PriorTransformer
,
T5FilmDecoder
,
Transformer2DModel
,
UNet1DModel
,
UNet2DConditionModel
,
UNet2DModel
,
UNet3DConditionModel
,
VQModel
,
)
from
.
optimization
import
(
get_constant_schedule
,
get_constant_schedule_with_warmup
,
get_cosine_schedule_with_warmup
,
get_cosine_with_hard_restarts_schedule_with_warmup
,
get_linear_schedule_with_warmup
,
get_polynomial_decay_schedule_with_warmup
,
get_scheduler
,
)
from
.
pipelines
import
(
AudioPipelineOutput
,
DanceDiffusionPipeline
,
DDIMPipeline
,
DDPMPipeline
,
DiffusionPipeline
,
DiTPipeline
,
ImagePipelineOutput
,
KarrasVePipeline
,
LDMPipeline
,
LDMSuperResolutionPipeline
,
PNDMPipeline
,
RePaintPipeline
,
ScoreSdeVePipeline
,
)
from
.
schedulers
import
(
DDIMInverseScheduler
,
DDIMScheduler
,
DDPMScheduler
,
DEISMultistepScheduler
,
DPMSolverMultistepScheduler
,
DPMSolverSinglestepScheduler
,
EulerAncestralDiscreteScheduler
,
EulerDiscreteScheduler
,
HeunDiscreteScheduler
,
IPNDMScheduler
,
KarrasVeScheduler
,
KDPM2AncestralDiscreteScheduler
,
KDPM2DiscreteScheduler
,
PNDMScheduler
,
RePaintScheduler
,
SchedulerMixin
,
ScoreSdeVeScheduler
,
UnCLIPScheduler
,
UniPCMultistepScheduler
,
VQDiffusionScheduler
,
)
from
.
training_utils
import
EMAModel
try
:
if
not
(
is_torch_available
()
and
is_scipy_available
()):
raise
OptionalDependencyNotAvailable
()
except
OptionalDependencyNotAvailable
:
from
.
utils
.
dummy_torch_and_scipy_objects
import
*
# noqa F403
else
:
from
.
schedulers
import
LMSDiscreteScheduler
try
:
if
not
(
is_torch_available
()
and
is_torchsde_available
()):
raise
OptionalDependencyNotAvailable
()
except
OptionalDependencyNotAvailable
:
from
.
utils
.
dummy_torch_and_torchsde_objects
import
*
# noqa F403
else
:
from
.
schedulers
import
DPMSolverSDEScheduler
try
:
if
not
(
is_torch_available
()
and
is_transformers_available
()):
raise
OptionalDependencyNotAvailable
()
except
OptionalDependencyNotAvailable
:
from
.
utils
.
dummy_torch_and_transformers_objects
import
*
# noqa F403
else
:
from
.
pipelines
import
(
AltDiffusionImg2ImgPipeline
,
AltDiffusionPipeline
,
AudioLDMPipeline
,
CycleDiffusionPipeline
,
IFImg2ImgPipeline
,
IFImg2ImgSuperResolutionPipeline
,
IFInpaintingPipeline
,
IFInpaintingSuperResolutionPipeline
,
IFPipeline
,
IFSuperResolutionPipeline
,
LDMTextToImagePipeline
,
PaintByExamplePipeline
,
SemanticStableDiffusionPipeline
,
StableDiffusionAttendAndExcitePipeline
,
StableDiffusionControlNetPipeline
,
StableDiffusionDepth2ImgPipeline
,
StableDiffusionDiffEditPipeline
,
StableDiffusionImageVariationPipeline
,
StableDiffusionImg2ImgPipeline
,
StableDiffusionInpaintPipeline
,
StableDiffusionInpaintPipelineLegacy
,
StableDiffusionInstructPix2PixPipeline
,
StableDiffusionLatentUpscalePipeline
,
StableDiffusionModelEditingPipeline
,
StableDiffusionPanoramaPipeline
,
StableDiffusionPipeline
,
StableDiffusionPipelineSafe
,
StableDiffusionPix2PixZeroPipeline
,
StableDiffusionSAGPipeline
,
StableDiffusionUpscalePipeline
,
StableUnCLIPImg2ImgPipeline
,
StableUnCLIPPipeline
,
TextToVideoSDPipeline
,
TextToVideoZeroPipeline
,
UnCLIPImageVariationPipeline
,
UnCLIPPipeline
,
VersatileDiffusionDualGuidedPipeline
,
VersatileDiffusionImageVariationPipeline
,
VersatileDiffusionPipeline
,
VersatileDiffusionTextToImagePipeline
,
VQDiffusionPipeline
,
)
try
:
if
not
(
is_torch_available
()
and
is_transformers_available
()
and
is_k_diffusion_available
()):
raise
OptionalDependencyNotAvailable
()
except
OptionalDependencyNotAvailable
:
from
.
utils
.
dummy_torch_and_transformers_and_k_diffusion_objects
import
*
# noqa F403
else
:
from
.
pipelines
import
StableDiffusionKDiffusionPipeline
try
:
if
not
(
is_torch_available
()
and
is_transformers_available
()
and
is_onnx_available
()):
raise
OptionalDependencyNotAvailable
()
except
OptionalDependencyNotAvailable
:
from
.
utils
.
dummy_torch_and_transformers_and_onnx_objects
import
*
# noqa F403
else
:
from
.
pipelines
import
(
OnnxStableDiffusionImg2ImgPipeline
,
OnnxStableDiffusionInpaintPipeline
,
OnnxStableDiffusionInpaintPipelineLegacy
,
OnnxStableDiffusionPipeline
,
OnnxStableDiffusionUpscalePipeline
,
StableDiffusionOnnxPipeline
,
)
try
:
if
not
(
is_torch_available
()
and
is_librosa_available
()):
raise
OptionalDependencyNotAvailable
()
except
OptionalDependencyNotAvailable
:
from
.
utils
.
dummy_torch_and_librosa_objects
import
*
# noqa F403
else
:
from
.
pipelines
import
AudioDiffusionPipeline
,
Mel
try
:
if
not
(
is_transformers_available
()
and
is_torch_available
()
and
is_note_seq_available
()):
raise
OptionalDependencyNotAvailable
()
except
OptionalDependencyNotAvailable
:
from
.
utils
.
dummy_transformers_and_torch_and_note_seq_objects
import
*
# noqa F403
else
:
from
.
pipelines
import
SpectrogramDiffusionPipeline
try
:
if
not
is_flax_available
():
raise
OptionalDependencyNotAvailable
()
except
OptionalDependencyNotAvailable
:
from
.
utils
.
dummy_flax_objects
import
*
# noqa F403
else
:
from
.
models
.
controlnet_flax
import
FlaxControlNetModel
from
.
models
.
modeling_flax_utils
import
FlaxModelMixin
from
.
models
.
unet_2d_condition_flax
import
FlaxUNet2DConditionModel
from
.
models
.
vae_flax
import
FlaxAutoencoderKL
from
.
pipelines
import
FlaxDiffusionPipeline
from
.
schedulers
import
(
FlaxDDIMScheduler
,
FlaxDDPMScheduler
,
FlaxDPMSolverMultistepScheduler
,
FlaxKarrasVeScheduler
,
FlaxLMSDiscreteScheduler
,
FlaxPNDMScheduler
,
FlaxSchedulerMixin
,
FlaxScoreSdeVeScheduler
,
)
try
:
if
not
(
is_flax_available
()
and
is_transformers_available
()):
raise
OptionalDependencyNotAvailable
()
except
OptionalDependencyNotAvailable
:
from
.
utils
.
dummy_flax_and_transformers_objects
import
*
# noqa F403
else
:
from
.
pipelines
import
(
FlaxStableDiffusionControlNetPipeline
,
FlaxStableDiffusionImg2ImgPipeline
,
FlaxStableDiffusionInpaintPipeline
,
FlaxStableDiffusionPipeline
,
)
try
:
if
not
(
is_note_seq_available
()):
raise
OptionalDependencyNotAvailable
()
except
OptionalDependencyNotAvailable
:
from
.
utils
.
dummy_note_seq_objects
import
*
# noqa F403
else
:
from
.
pipelines
import
MidiProcessor
Back
|
FazBrowse Home
|
New Git URL