Set default value of ControlNetUnit.enabled to True (#2912)
parent
b197f7cc41
commit
a5457dcc1c
|
|
@ -73,7 +73,7 @@ class ControlNetUnit(BaseModel):
|
|||
loopback: bool = False
|
||||
|
||||
# General fields.
|
||||
enabled: bool = False
|
||||
enabled: bool = True
|
||||
module: str = "none"
|
||||
|
||||
@validator("module", always=True, pre=True)
|
||||
|
|
|
|||
|
|
@ -666,7 +666,7 @@ class ControlNetUiGroup(object):
|
|||
self.pulid_mode,
|
||||
)
|
||||
|
||||
unit = gr.State(ControlNetUnit())
|
||||
unit = gr.State(ControlNetUnit(enabled=False))
|
||||
|
||||
# It is necessary to update unit state actively to avoid potential
|
||||
# flaky racing issue.
|
||||
|
|
|
|||
|
|
@ -94,6 +94,7 @@ def test_inpaint_mask(module: str):
|
|||
|
||||
@disable_in_cq
|
||||
@pytest.mark.parametrize("img_index", [i for i, _ in enumerate(portrait_imgs)])
|
||||
@pytest.mark.skip(reason="test is for SDXL only")
|
||||
def test_pulid(img_index: int):
|
||||
"""PuLID preprocessor should not memory leak."""
|
||||
payload = dict(
|
||||
|
|
|
|||
|
|
@ -310,6 +310,7 @@ def test_ip_adapter_auto():
|
|||
|
||||
@disable_in_cq
|
||||
@pytest.mark.parametrize("img_index", [i for i, _ in enumerate(portrait_imgs)])
|
||||
@pytest.mark.skip(reason="test is for SDXL only")
|
||||
def test_pulid(img_index: int):
|
||||
"""PuLID should not memory leak."""
|
||||
assert APITestTemplate(
|
||||
|
|
|
|||
Loading…
Reference in New Issue