Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
renzhc
diffusers_dcu
Commits
e564abe2
Unverified
Commit
e564abe2
authored
Nov 20, 2024
by
YiYi Xu
Committed by
GitHub
Nov 20, 2024
Browse files
fix controlnet module refactor (#9968)
* fix
parent
3139d39f
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
3 deletions
+16
-3
src/diffusers/pipelines/pag/pipeline_pag_controlnet_sd_xl_img2img.py
...rs/pipelines/pag/pipeline_pag_controlnet_sd_xl_img2img.py
+1
-3
src/diffusers/utils/dummy_pt_objects.py
src/diffusers/utils/dummy_pt_objects.py
+15
-0
No files found.
src/diffusers/pipelines/pag/pipeline_pag_controlnet_sd_xl_img2img.py
View file @
e564abe2
...
@@ -38,7 +38,7 @@ from ...loaders import (
...
@@ -38,7 +38,7 @@ from ...loaders import (
StableDiffusionXLLoraLoaderMixin
,
StableDiffusionXLLoraLoaderMixin
,
TextualInversionLoaderMixin
,
TextualInversionLoaderMixin
,
)
)
from
...models
import
AutoencoderKL
,
ControlNetModel
,
ImageProjection
,
UNet2DConditionModel
from
...models
import
AutoencoderKL
,
ControlNetModel
,
ImageProjection
,
MultiControlNetModel
,
UNet2DConditionModel
from
...models.attention_processor
import
(
from
...models.attention_processor
import
(
AttnProcessor2_0
,
AttnProcessor2_0
,
XFormersAttnProcessor
,
XFormersAttnProcessor
,
...
@@ -61,8 +61,6 @@ from .pag_utils import PAGMixin
...
@@ -61,8 +61,6 @@ from .pag_utils import PAGMixin
if
is_invisible_watermark_available
():
if
is_invisible_watermark_available
():
from
..stable_diffusion_xl.watermark
import
StableDiffusionXLWatermarker
from
..stable_diffusion_xl.watermark
import
StableDiffusionXLWatermarker
from
..controlnet.multicontrolnet
import
MultiControlNetModel
logger
=
logging
.
get_logger
(
__name__
)
# pylint: disable=invalid-name
logger
=
logging
.
get_logger
(
__name__
)
# pylint: disable=invalid-name
...
...
src/diffusers/utils/dummy_pt_objects.py
View file @
e564abe2
...
@@ -452,6 +452,21 @@ class MultiAdapter(metaclass=DummyObject):
...
@@ -452,6 +452,21 @@ class MultiAdapter(metaclass=DummyObject):
requires_backends
(
cls
,
[
"torch"
])
requires_backends
(
cls
,
[
"torch"
])
class
MultiControlNetModel
(
metaclass
=
DummyObject
):
_backends
=
[
"torch"
]
def
__init__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
@
classmethod
def
from_config
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
@
classmethod
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
class
PixArtTransformer2DModel
(
metaclass
=
DummyObject
):
class
PixArtTransformer2DModel
(
metaclass
=
DummyObject
):
_backends
=
[
"torch"
]
_backends
=
[
"torch"
]
...
...
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment