Commit Graph

1729 Commits

Author SHA1 Message Date
Stefan Kapusniak
bcdcbc63cc SHARK-1.0: Fixes to requirements for newer dependency versions (#2099)
- Adds mpmath==1.3.0 as a direct requirement to workaround a sympy
dependency issue.
- Change setup_venv.ps1 to install torchvision --nodeps. This avoids
a failure to find any common torch version dependency between the
pinned torch-mlir version and torchvision after a long search. This
also more closely matches what setup_venv.sh does.
2024-03-20 22:22:27 -05:00
Stefan Kapusniak
9fc0b5b58e Shark-1.0: Update gradio to 4.19.2 (#2098)
* Shark-1.0: Update gradio to 4.19.2

- Move pin for gradio from 4.12 -> 4.19.2 on SHARK-1.0 branch
- Fix png import txt2img/txt2img_sdxl event handling for gradio 4.19.2
- Fix sendto txt2img/txt2img_sdxl event handling for gradio 4.19.2

* Shark-1.0: Reformat with black

- Apply the new (2024) black reformattings
2024-03-01 11:46:42 -06:00
Jakub Kuderski
85ae2ee57e Pin mpmath version for shark 1.0 (#2100)
Fixes the `AttributeError: module 'mpmath' has no attribute 'rational'` error.
2024-02-29 08:26:31 -05:00
Ean Garvey
721757013f SDXL tweaks (#2072) 20240228.1175 20240126.1139 2024-01-26 11:33:06 -06:00
Ean Garvey
c1efb9cfe0 Add DPM schedulers to sdxl UI 20240118.1128 2024-01-18 15:33:36 -06:00
Ean Garvey
18666dffc0 Fix torch-mlir install on linux. (#2071) 2024-01-18 15:13:47 -06:00
Ean Garvey
06bfcbc7ad Update setup_venv.sh 2024-01-18 13:42:31 -06:00
Stefan Kapusniak
f2966673e9 (Shark 1.0) SD: Fix inpaint (+others) breakage on sharkification (#2066)
* Add the @classmethod decorator to the base implementation of favored_base_models. This fixes running any SD pipeline that does
not have a specific implementation of favored_base_models
(everything but txt2img and txt2img_sdxl) break at the Sharkification
stage.
2024-01-16 21:50:57 -06:00
Stefan Kapusniak
bb431811fb (Shark 1.0) Fix setup_venv.ps1 not finding pinned torch-mlir (#2062) 2024-01-11 17:07:49 -06:00
Ean Garvey
97e112091f Update matmul reassoc flags for cpu llama2. 2024-01-10 14:57:44 -06:00
Ean Garvey
d35288e893 Pin torch-mlir and diffusers. 20240109.1118 2024-01-09 14:38:14 -06:00
Ean Garvey
e80bc9f857 Small fix to vulkan utils. 20240109.1116 20240109.1114 20240109.1113 2024-01-09 13:01:36 -06:00
Ean Garvey
773e6ebebf Move IREE pins for SHARK-1.0 to 2023-12-12 (#2059)
* Move IREE pins for windows, linux, and pip packaging files.

* Remove linux builds from 1.0 nightly workflow

It seems that the VMs used for these workflows are no longer available. Removing linux builds since publishing .exe is sufficient for the one-shot nightly workflows we trigger for SHARK-1.0
2024-01-09 12:39:32 -06:00
Stefan Kapusniak
dda7e8a163 (Shark-1) UI: Fix 'keyword argument' error in txt2img (#2058)
* Removes the incorrect valid_base_models keywoard argument left in text2img_inf
2024-01-08 16:47:15 -06:00
Stefan Kapusniak
7fdd1952ae (Shark 1.0) UI/SD UX improvements for SDXL (#2057)
* SDXL Tab
  * Filter VAEs in dropdown in the same manner as models
  * Set default VAE selection to 'madebyollin/sdxl-vae-fp16-fix'
  * Set default image size to 768x768 to match current Vulkan constraints
* SharkifySDModel Base Unet Model Determination
  * Alway use the model_to_run as the base model for unet, if it is in
base_model.json, instead of potentially trying to compile for other base
models.
  * Allow SharkSDPipelines to define a 'favor_base_models' @classmethod,
answering a list of sane base model names for the pipeline. Exclude base
models not in that list from compilation attempts when trying to determine
a base unet model.
  *  Add a 'favor_base_models' method for both Normal and SDXL Txt2Img
Pipelines. Define the method as answering 'None' in the base class.
20240106.1103
2024-01-06 11:59:18 -06:00
Ean Garvey
0a6f6fad86 (1.0) Fix non-square controlnet dimensions. (#2056)
* Fix non-square controlnet dims

* Hide batch size slider in txt2img
20240104.1100
2024-01-04 21:33:55 -06:00
Ean Garvey
6853a33728 Pin iree versions and fix quant matmul flags. (#2055)
Restricts quantized matmul reassociation flags to cpu compiles of llama2 and pins IREE versions for shark 1.0
2024-01-04 14:22:54 -06:00
Stefan Kapusniak
3887d83f5d (Shark 1.0) UI: Upgrade to gradio 4.12.0 and fix breakage (#2051)
* (Shark 1.0) UI: Upgrade to gradio 4.12.0 and fix breakage

* Upgrade Shark 1.0 to gradio 4.12.0
* Add javascript workaround for gradio currently ignoring @media rules in custom CSS. This fixes UI not showing at full width on desktop (>1536px width).

* (Shark 1.0) UI: Re-enable gallery download buttons

* Re-enable gallery download buttons, as this is now working again in Gradio 4.12
2024-01-03 19:00:08 -06:00
Stefan Kapusniak
8d9b5b3afa SD/UI: Merge Lora Selection Boxes, Add LoRA Strength (#2052)
* Merges LoRA selection in the UI into a single selection, rather than
one for LoRAs under ./models and another for Hugging Face Id
* Add LoRA strength to UI and pipeline parameters.
* Add a `--lora_strength` command line argument.
* Bake LoRA strength into .vmfb naming when a LoRA is specified.
* Use LoRA embedded alpha values and (up tensor dimension *
LoRA strength) for final alpha when applying LoRA weights rather
than a hardcoded value of 0.75
* Adds additional cases to the LoRA weight application that are
present for weight application in the Kohya scripts.
* Include lora strength when reading and writing png metadata.
* Allow lora_strength to be set above 1.0 in the UI, so similar effects
to the prior (overdriven alpha) implementation can be obtained.
2024-01-03 18:59:47 -06:00
xzuyn
16c03e4b44 fix for TypeError: Image2ImagePipeline.generate_images() missing 1 required positional argument: 'images' (#2053) 2024-01-03 18:54:54 -06:00
Stefan Kapusniak
17dab8334d Setup a separate .shark1.venv for Shark-1.0 (#2043)
* Updates setup_venv.ps1 to create and use ./shark1.venv/
* Updates setup_venv.sh to default to creating ./shark1.venv/
20231229.1091
2023-12-16 23:18:29 -06:00
Stefan Kapusniak
f692a012e1 UI: Fixes for Gradio 4.7.1/4.8.0 update (#2024)
* Upgrade Gradio pin from 4.7.1 to 4.80.
* Make Nod AI logos visible again.
* Remove image toolbars from png import boxes.
* Set Input Images on img2img, outpaint and upscaler tabs to be upload
only.
* Change Image control to an ImageEditor control for masking on the
inpaint tab. Remove previous height restriction as this hides the
editing controls.
* Move Input Image/Masked Image on img2img, inpaint, outpaint and
upscaler tabs to be the first control on their tabs.
* Remove download buttons from all galleries as they download some
html rather the image (gradio issue #6595)
* Remove add new row and column from Output Gallery parameters
dataframe.
* Add partial workaround for not being able to select text in the Output
Gallery Gallery parameters dataframe (gradio issue #6086 )
* Fix uglified formatting of subdirectory selection dropown, refresh
button, and open folder buttons on the Output Gallery tab.
* Force Output Gallery to use the full width of the Gallery control
for the preview overlay when an image is selected, rather than
an overlay the width of the selected image.
* Fix sendto buttons.
* Reset Inpaint ImageEditor control with the Mask Layer after generation
is complete, as it gets lost if the image was sent to the tab from
another tab rather than being uploaded. Also rework queuing and
progress rendering along this codepath. This doesn't solve the
underlying problem of the Mask Layer being removed, but does get inpaint
fully working with the Gradio update.
2023-12-14 14:56:37 -06:00
Vivek Khandelwal
3cc643b2de Add support for StableLM-3B model (#2019)
* Add support for StableLM-3B model

* Add support for Quantized StableLM-3B model

* Update stablelm_pipeline.py
2023-12-12 22:39:50 +05:30
Phaneesh Barwaria
bf70e80d20 vulkan device id fix (#2028) 20231208.1070 2023-12-08 19:00:26 -06:00
Ean Garvey
7159698496 (Studio) Fix controlnet switching. (#2026)
* Fix controlnet switching.

* Fix txt2img + control adapters
20231207.1069 20231206.1068
2023-12-07 00:52:36 -06:00
gpetters94
7e12d1782a Fix stencil pipline to use input image (#2027) 2023-12-07 00:25:18 -06:00
Ean Garvey
bb5f133e1c Many UI fixes and controlnet impovements (#2025)
* multi-controlnet UI and perf fixes

* Controlnet fixes
20231206.1067
2023-12-06 20:10:06 -06:00
Richard Pastirčák
3af0c6c658 #1843 - Add Export Default settings button (#2016)
* #1843 - Add Export Default settings button

* #1843 reformating units test

---------

Co-authored-by: Richard Pastirčák <richard.pastircak@student.tuke.sk>
2023-12-06 14:58:17 -06:00
Ean Garvey
3322b7264f (vicuna.py) Move enable_tracy_tracing outside of BenchmarkRunInfo (#2011) 2023-12-06 14:57:32 -06:00
Ean Garvey
eeb7bdd143 Fix nodlogo (#2023) 2023-12-06 14:57:16 -06:00
Ean Garvey
2d6f48821d Fix SharkEulerDiscrete (#2022) 20231206.1066 2023-12-06 12:25:06 -06:00
Gaurav Shukla
c74b55f24e [ui] Add UI for sharding
Signed-Off-by: Gaurav Shukla <gaurav@nod-labs.com>
2023-12-06 17:25:49 +05:30
Elias Joseph
1a723645fb finilized fixes for sharded llama2 2023-12-06 15:35:29 +05:30
Eliasj42
dfdd3b1f78 improved sharded performance and fixed issue with lmhead on rocm (#2008)
* improved sharded performance and fixed issue with lmhead on rocm

* mmap shards + disable sharing of device arrays across devices

* fix device_idx for non-layer vmfbs

* fix time calc for sharded

---------

Co-authored-by: Elias Joseph <elias@nod-labs.com>
Co-authored-by: PhaneeshB <b.phaneesh@gmail.com>
20231205.1065
2023-12-05 11:53:44 -08:00
Ean Garvey
6384780d16 Fixes to llama2 cpu compilation and studio UI, schedulers (#2013)
* Fix some issues with defaults

Fixes to llama2 cpu compilation (turns off data tiling for old argmax
mode)

---------

Co-authored-by: Max Dawkins <max.dawkins@gmail.com>
20231205.1064
2023-12-05 11:19:19 -05:00
gpetters94
db0c53ae59 Fix zoedepth (#2010) 20231205.1063 2023-12-05 04:31:50 -05:00
Ean Garvey
ce9ce3a7c8 (SD) Fix schedulers and multi-controlnet. (#2006)
* (SD) Fixes schedulers if recieving noise preds as numpy arrays

* Fix schedulers and stencil name

* Multicontrolnet fixes
2023-12-05 03:29:18 -06:00
Ean Garvey
d72da3801f (Studio) Update gradio and multicontrolnet UI. (#2001)
* (Studio) Update gradio and multicontrolnet UI.

* Fixes for outputgallery, exe build

* Fix image return types.

* Update Gradio to 4.7.1

* Fix send buttons and hiresfix

* Various bugfixes and SDXL additions.

* More UI fixes and txt2img_sdxl presets.

*enable SDXL-Turbo and custom models, custom VAE for sdxl

* img2img ui tweaks
20231204.1062
2023-12-04 12:37:51 -06:00
Eliasj42
9c50edc664 fixed functionality of sharded vicuna/llama2 (#1982)
Co-authored-by: Elias Joseph <elias@nod-labs.com>
2023-12-04 09:11:52 -08:00
Abhishek Varma
a1b7110550 [SDXL] Add SDXL pipeline to SHARK (#1941)
* [SDXL] Add SDXL pipeline to SHARK

-- This commit adds SDXL pipeline to SHARK.

Signed-off-by: Abhishek Varma <abhishek@nod-labs.com>

* (SDXL) Fix --ondemand and vae scale factor use, and fix VAE flags.

---------

Signed-off-by: Abhishek Varma <abhishek@nod-labs.com>
Co-authored-by: Ean Garvey <87458719+monorimet@users.noreply.github.com>
20231202.1057 20231203.1059
2023-12-02 03:15:15 -06:00
gpetters94
ff15fd74f6 Add multicontrolnet (#1958) 20231201.1048 2023-12-01 13:51:20 -06:00
gpetters94
552b2c3ee3 Add controlmode (#1957) 2023-12-01 13:04:47 -06:00
Ean Garvey
795fc33001 Update default compilation flags for data tiling. (#2000)
* Update default CPU compilation flags.

c5a6cdc8dd

52eb7e9b82

tweak CPU iree-compile flags to match upstream changes.

* Add an option for data tiling on SD models.
20231130.1047
2023-11-30 17:05:37 -06:00
gpetters94
2910841fe6 Fix an importer issue on Linux (#1986) 2023-11-30 10:50:33 -06:00
Vivek Khandelwal
396a054856 Fix Sharded Falcon-180b 2023-11-30 21:51:57 +05:30
Vivek Khandelwal
5c66948d4f Fix unsharded Falcon pipeline 2023-11-30 21:51:57 +05:30
Ean Garvey
ed3dda94c0 Cleanup xfails in pytest suite. (#1995) 20231129.1046 2023-11-29 23:16:15 -06:00
Quinn Dawkins
d31d28b082 [SD] Add flag to collapse reduction dims pre dispatch formation (#1999) 2023-11-30 00:09:17 -05:00
Evan Ruttenberg
78c607e1d3 Fix typo in default_rocm_arch (#1998) 20231129.1045 2023-11-29 20:40:56 -05:00
Vivek Khandelwal
666e601dd9 Remove sharding support for non-180B falcon variants 20231128.1044 20231127.1043 2023-11-27 13:45:13 +05:30