mirror of
https://github.com/nod-ai/AMD-SHARK-Studio.git
synced 2026-04-03 03:00:17 -04:00
[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:
@@ -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..",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user