Skip to content

Commit

Permalink
temporarily disable langchain stuff in webui (#1719)
Browse files Browse the repository at this point in the history
its breaking the exe
  • Loading branch information
dan-garvey authored Aug 4, 2023
1 parent ed484b8 commit a686d7d
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 15 deletions.
5 changes: 1 addition & 4 deletions apps/stable_diffusion/scripts/train_lora_word.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,7 @@ def __getitem__(self, i):

if self.center_crop:
crop = min(img.shape[0], img.shape[1])
(
h,
w,
) = (
(h, w,) = (
img.shape[0],
img.shape[1],
)
Expand Down
1 change: 1 addition & 0 deletions apps/stable_diffusion/shark_studio_imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
datas += collect_data_files("jsonschema")
datas += collect_data_files("jsonschema_specifications")
datas += collect_data_files("cpuinfo")
datas += collect_data_files("langchain")
datas += [
("src/utils/resources/prompts.json", "resources"),
("src/utils/resources/model_db.json", "resources"),
Expand Down
5 changes: 1 addition & 4 deletions apps/stable_diffusion/src/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,7 @@ def compile_through_fx(
if "cuda" in args.device:
shark_args.enable_tf32 = True

(
mlir_module,
func_name,
) = import_with_fx(
(mlir_module, func_name,) = import_with_fx(
model=model,
inputs=inputs,
is_f16=is_f16,
Expand Down
12 changes: 6 additions & 6 deletions apps/stable_diffusion/web/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ def resource_path(relative_path):
txt2img_sendto_inpaint,
txt2img_sendto_outpaint,
txt2img_sendto_upscaler,
h2ogpt_upload,
h2ogpt_web,
# h2ogpt_upload,
# h2ogpt_web,
img2img_web,
img2img_custom_model,
img2img_hf_model_id,
Expand Down Expand Up @@ -248,10 +248,10 @@ def register_outputgallery_button(button, selectedid, inputs, outputs):
upscaler_status,
]
)
with gr.TabItem(label="DocuChat Upload", id=11):
h2ogpt_upload.render()
with gr.TabItem(label="DocuChat(Experimental)", id=12):
h2ogpt_web.render()
# with gr.TabItem(label="DocuChat Upload", id=11):
# h2ogpt_upload.render()
# with gr.TabItem(label="DocuChat(Experimental)", id=12):
# h2ogpt_web.render()

# send to buttons
register_button_click(
Expand Down
1 change: 0 additions & 1 deletion apps/stable_diffusion/web/ui/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
llm_chat_api,
)
from apps.stable_diffusion.web.ui.generate_config import model_config_web
from apps.stable_diffusion.web.ui.h2ogpt import h2ogpt_upload, h2ogpt_web
from apps.stable_diffusion.web.ui.minigpt4_ui import minigpt4_web
from apps.stable_diffusion.web.ui.outputgallery_ui import (
outputgallery_web,
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ py-cpuinfo
tiktoken # for codegen
joblib # for langchain
timm # for MiniGPT4
langchain

# Keep PyInstaller at the end. Sometimes Windows Defender flags it but most folks can continue even if it errors
pefile
Expand Down

0 comments on commit a686d7d

Please sign in to comment.