Skip to content

Commit

Permalink
Revert "Set default value of ControlNetUnit.enabled to True (#2912)"
Browse files Browse the repository at this point in the history
This reverts commit a5457dc.
  • Loading branch information
huchenlei authored May 20, 2024
1 parent a5457dc commit cf8c36c
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion internal_controlnet/args.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class Config:
loopback: bool = False

# General fields.
enabled: bool = True
enabled: bool = False
module: str = "none"

@validator("module", always=True, pre=True)
Expand Down
2 changes: 1 addition & 1 deletion scripts/controlnet_ui/controlnet_ui_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ def render(self, tabname: str, elem_id_tabname: str) -> None:
self.pulid_mode,
)

unit = gr.State(ControlNetUnit(enabled=False))
unit = gr.State(ControlNetUnit())

# It is necessary to update unit state actively to avoid potential
# flaky racing issue.
Expand Down
1 change: 0 additions & 1 deletion tests/web_api/detect_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ 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(
Expand Down
1 change: 0 additions & 1 deletion tests/web_api/generation_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,6 @@ 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(
Expand Down

0 comments on commit cf8c36c

Please sign in to comment.