Spaces:
Running
on
Zero
Running
on
Zero
XuDongZhou
commited on
Update pipeline_controlnet_xs_sd_xl_instantid.py
Browse files
pipeline_controlnet_xs_sd_xl_instantid.py
CHANGED
@@ -50,21 +50,22 @@ from diffusers.pipelines.stable_diffusion_xl.pipeline_output import StableDiffus
|
|
50 |
|
51 |
from utils.callbacks import MultiPipelineCallbacks, PipelineCallback
|
52 |
|
|
|
|
|
53 |
# lora
|
54 |
from diffusers.models.unets.unet_2d_condition import UNet2DConditionModel
|
55 |
-
from controlnet_xs import ControlNetXSAdapter, UNetControlNetXSModel
|
56 |
from diffusers.loaders.lora_conversion_utils import _maybe_map_sgm_blocks_to_diffusers, _convert_non_diffusers_lora_to_diffusers
|
57 |
from utils.tools import get_module_kohya_state_dict_xs
|
58 |
|
59 |
|
60 |
#ipa
|
61 |
-
from
|
62 |
-
from
|
63 |
if is_torch2_available():
|
64 |
-
from
|
65 |
else:
|
66 |
-
from
|
67 |
-
from
|
68 |
|
69 |
|
70 |
if is_invisible_watermark_available():
|
|
|
50 |
|
51 |
from utils.callbacks import MultiPipelineCallbacks, PipelineCallback
|
52 |
|
53 |
+
|
54 |
+
from utils.controlnet_xs import ControlNetXSAdapter, UNetControlNetXSModel
|
55 |
# lora
|
56 |
from diffusers.models.unets.unet_2d_condition import UNet2DConditionModel
|
|
|
57 |
from diffusers.loaders.lora_conversion_utils import _maybe_map_sgm_blocks_to_diffusers, _convert_non_diffusers_lora_to_diffusers
|
58 |
from utils.tools import get_module_kohya_state_dict_xs
|
59 |
|
60 |
|
61 |
#ipa
|
62 |
+
from utils.resampler import Resampler
|
63 |
+
from utils.utils import is_torch2_available
|
64 |
if is_torch2_available():
|
65 |
+
from utils.attention_processor import IPAttnProcessor2_0 as IPAttnProcessor, AttnProcessor2_0 as AttnProcessor
|
66 |
else:
|
67 |
+
from utils.attention_processor import IPAttnProcessor, AttnProcessor
|
68 |
+
from utils.attention_processor import region_control
|
69 |
|
70 |
|
71 |
if is_invisible_watermark_available():
|