Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support for TIs #294

Merged
merged 1 commit into from
Aug 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bridge_stable_diffusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ def main():
MODEL_CATEGORY_NAMES.esrgan,
MODEL_CATEGORY_NAMES.safety_checker,
MODEL_CATEGORY_NAMES.lora,
MODEL_CATEGORY_NAMES.ti,
],
)

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ torch # We have to place it here otherwise it installs the CPU version
pydantic==1.10.12
horde_model_reference~=0.2.2
transformers==4.30.2
hordelib==1.6.2
hordelib==1.6.5
gradio
pyyaml
unidecode
Expand Down
2 changes: 1 addition & 1 deletion worker/consts.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
BRIDGE_VERSION = 23
BRIDGE_VERSION = 24
RELEASE = f"{BRIDGE_VERSION}.1.11"
BRIDGE_CONFIG_FILE = "bridgeData.yaml"
KNOWN_UPSCALERS = {
Expand Down
8 changes: 6 additions & 2 deletions worker/jobs/stable_diffusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ def start_job(self):
gen_payload["return_control_map"] = self.current_payload.get("return_control_map", False)
if "loras" in self.current_payload:
gen_payload["loras"] = self.current_payload["loras"]
if "tis" in self.current_payload:
gen_payload["tis"] = self.current_payload["tis"]
except KeyError as err:
logger.error("Received incomplete payload from job. Aborting. ({})", err)
self.status = JobStatus.FAULTED
Expand Down Expand Up @@ -170,8 +172,10 @@ def start_job(self):
f"for {self.current_payload.get('ddim_steps',50)} steps "
f"{self.current_payload.get('sampler_name','unknown sampler')}. "
f"Prompt length is {len(self.current_payload['prompt'])} characters "
f"And it appears to contain {len(gen_payload.get('loras', []))} "
f"loras: {[lora['name'] for lora in gen_payload.get('loras', [])]}",
f"and it appears to contain {len(gen_payload.get('loras', []))} "
f"LoRas: {[lora['name'] for lora in gen_payload.get('loras', [])]} "
f"and {len(gen_payload.get('tis', []))} "
f"Textual Inversions: {[ti['name'] for ti in gen_payload.get('tis', [])]}",
)
time_state = time.time()
gen_payload["model"] = self.current_model
Expand Down
Loading