[WEB] Add Stable-Diffusion in the SHARK web (#366)

1. This commit adds stable-diffusion as a part of shark web.
2. The V-diffusion model has been disabled for now as it's not
   working(will raise a different patch with fix).
3. Add standard output in the web ui.
4. Add instructions to launch the shark-web.

Signed-Off-by: Gaurav Shukla <gaurav@nod-labs.com>

Signed-off-by: Gaurav Shukla <gaurav@nod-labs.com>
This commit is contained in:
Gaurav Shukla
2022-09-26 23:12:02 +05:30
committed by GitHub
parent c7b2d39ab2
commit d4eeff0a5d
7 changed files with 400 additions and 73 deletions

View File

@@ -103,10 +103,12 @@ def cache_model():
def vdiff_inf(prompts: str, n, bs, steps, _device):
global device
global model
global checkpoint
global clip_model
args = {}
target_embeds = []
weights = []
@@ -197,14 +199,17 @@ def vdiff_inf(prompts: str, n, bs, steps, _device):
mlir_model, func_name, device=args["device"], mlir_dialect="linalg"
)
shark_module.compile()
return run_all(
x,
t,
args["steps"],
args["n"],
args["batch_size"],
side_x,
side_y,
shark_module,
args,
return (
run_all(
x,
t,
args["steps"],
args["n"],
args["batch_size"],
side_x,
side_y,
shark_module,
args,
),
"Testing..",
)