Commit Graph

213 Commits

Author SHA1 Message Date
Erik Scholz
f469b835a3
fix: reading memory of stack allocated object past its scope (#91) 2023-11-27 21:37:12 +08:00
Steward Garcia
8124588cf1
feat: ggml-alloc integration and gpu acceleration (#75)
* set ggml url to FSSRepo/ggml

* ggml-alloc integration

* offload all functions to gpu

* gguf format + native converter

* merge custom vae to a model

* full offload to gpu

* improve pretty progress

---------

Co-authored-by: leejet <leejet714@gmail.com>
2023-11-26 19:02:36 +08:00
Erik Scholz
c874063408
fix: support bf16 lora weights (#82) 2023-11-20 22:34:17 +08:00
Urs Ganse
ae1d5dcebb
feat: allow LoRAs with negative multiplier (#83)
* Allow Loras with negative weight, too.

There are a couple of loras, which serve to adjust certain concepts in
both positive and negative directions (like exposure, detail level etc).

The current code rejects them if loaded with a negative weight, but I
suggest that this check can simply be dropped.

* ignore lora in the case of multiplier == 0.f

---------

Co-authored-by: Urs Ganse <urs@nerd2nerd.org>
Co-authored-by: leejet <leejet714@gmail.com>
2023-11-20 22:23:52 +08:00
leejet
51b53d4cb1 chore: typo remote => remove 2023-11-19 23:21:49 +08:00
leejet
0d9b801aaa fix: fix multi loras prompt parse 2023-11-19 23:19:37 +08:00
leejet
176a00b606 chore: add .clang-format 2023-11-19 19:35:33 +08:00
leejet
64f6002457 docs: add contributors info to README.md 2023-11-19 18:35:19 +08:00
leejet
9a9f3daf8e feat: add LoRA support 2023-11-19 17:43:49 +08:00
leejet
536f3af672 feat: add lcm sampler support
This referenced an issue discussion of the stable-diffusion-webui at
https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/13952, which
may not be too perfect.
2023-11-17 22:53:46 +08:00
leejet
3bf1665885 chore: clear the msvc compilation warning 2023-10-28 20:55:24 +08:00
leejet
3001c23f7d perf: change ggml graph eval order to RIGHT_TO_LEFT to optimize memory usage 2023-10-28 20:19:15 +08:00
leejet
ed374983f3 fix: set eps of ggml_norm(LayerNorm) to 1e-5 2023-10-27 00:50:23 +08:00
leejet
4c96185fcc fix: update ggml to avoid insufficient memory error on macOS 2023-10-24 22:04:00 +08:00
leejet
fbd18e1059 fix: avoid stack overflow on MSVC 2023-10-23 21:10:46 +08:00
leejet
09cab2a2ae chore: set default BUILD_SHARED_LIBS to OFF 2023-10-22 14:59:03 +08:00
leejet
69e54ace14 sync: update ggml 2023-10-22 14:11:06 +08:00
Robert Bledsaw
29a56f2e98
docs: update README.md (#71)
fixed type in curl command.
2023-10-22 13:03:32 +08:00
Urs Ganse
afec5051cf
feat: write generation parameter exif data into output png (#57)
* Write generation parameter exif data into output pngs.

This adds prompt, negative prompt (if nonempty) and other generation
parameters to the output file as a tEXt PNG block, in the same format as
AUTOMATIC1111 webui does.

In order to keep everything free of external library dependencies, I
have somewhat dirtily hacked this into the stb_image_write
implementation.

* Mention png text data in README.md, include "karras" in sampler text

* add Steps/Model/RNG to parameter string

---------

Co-authored-by: leejet <leejet714@gmail.com>
2023-09-18 21:09:15 +08:00
leejet
bd62138751 feat: adapt to more weight formats 2023-09-13 00:07:16 +08:00
Urs Ganse
3a25179d52
feat: add DPM2 and DPM++(2s) a samplers (#56)
* Add DPM2 sampler.

* Add DPM++ (2s) a sampler.

* Update README.md with added samplers

---------

Co-authored-by: leejet <leejet714@gmail.com>
2023-09-12 23:02:09 +08:00
Urs Ganse
968fbf02aa
feat: add option to switch the sigma schedule (#51)
Concretely, this allows switching to the "Karras" schedule from the
Karras et al 2022 paper, equivalent to the samplers marked as "Karras"
in the AUTOMATIC1111 WebUI. This choice is in principle orthogonal to
the sampler choice and can be given independently.
2023-09-09 00:02:07 +08:00
Urs Ganse
b6899e8fc2
feat: add Euler, Heun and DPM++ (2M) samplers (#50)
* Add Euler sampler

* Add Heun sampler

* Add DPM++ (2M) sampler

* Add modified DPM++ (2M) "v2" sampler.

This was proposed in a issue discussion of the stable diffusion webui,
at https://github.com/AUTOMATIC1111/stable-diffusion-webui/discussions/8457
and apparently works around overstepping of the DPM++ (2M) method with
small step counts.

The parameter is called dpmpp2mv2 here.

* match code style

---------

Co-authored-by: Urs Ganse <urs@nerd2nerd.org>
Co-authored-by: leejet <leejet714@gmail.com>
2023-09-08 23:47:28 +08:00
leejet
b85b236b13 feat: set default rng to cuda 2023-09-04 21:46:54 +08:00
leejet
34a118d407 fix: avoid coredump when steps == 1 2023-09-04 21:44:38 +08:00
leejet
f6ff06fcb7 fix: avoid coredump when generating large image 2023-09-04 21:37:46 +08:00
leejet
cf38e238d4 fix: width and height should be a multiple of 64 2023-09-04 20:49:52 +08:00
leejet
b247581782 fix: insufficient memory error on macOS 2023-09-04 03:50:42 +08:00
leejet
bb3f19cb40 fix: increase ctx_size 2023-09-04 03:45:43 +08:00
leejet
7620b920c8 use new graph api to avoid stack overflow on msvc 2023-09-03 22:56:33 +08:00
leejet
3ffffa6929 fix: do not check weights of open clip last layer 2023-09-03 21:10:08 +08:00
leejet
45842865ff fix: seed should be 64 bit 2023-09-03 20:08:22 +08:00
leejet
e5a7aec252 feat: add CUDA RNG 2023-09-03 19:24:07 +08:00
leejet
31e77e1573
feat: add SD2.x support (#40) 2023-09-03 16:00:33 +08:00
leejet
c542a77a3f fix: correct the handling of weight loading 2023-08-30 21:44:06 +08:00
Derek Anderson
1b5a868296
fix: flushes after printf (#38) 2023-08-30 20:47:25 +08:00
leejet
c8f85a4e30 sync: update ggml 2023-08-27 14:35:26 +08:00
leejet
d765b95ed1 perf: make ggml_conv_2d faster 2023-08-26 17:08:59 +08:00
leejet
008d80a0b1 docs: update README.md 2023-08-25 20:59:18 +08:00
leejet
467bc5baeb perf: make ggml_conv_2d a little faster 2023-08-25 00:09:34 +08:00
leejet
0d7f04b135 feat: print seed value when args.seed < 0 2023-08-22 23:03:17 +08:00
leejet
721cb324af chore: add sd Dockerfile 2023-08-22 22:14:20 +08:00
leejet
a393bebec8 docs: update README.md 2023-08-22 20:45:23 +08:00
Derek Anderson
76b9b2e9a2
docs: update README.md (#23) 2023-08-21 23:53:50 +08:00
leejet
5ae4795535
chore: fix tag_name 2023-08-21 23:17:26 +08:00
leejet
cb22c594fd chore: add release workflow 2023-08-21 23:08:05 +08:00
leejet
5d4d56f62c
chore: add windows x64 release (#21) 2023-08-21 22:52:23 +08:00
Ikko Eltociear Ashimine
cb01adee20
docs: fix typo in convert.py (#17)
signficant -> significant
2023-08-21 21:56:21 +08:00
Tim Miller
a22722631a
fix: fix regex for macOS/Clang support (#16)
---------

Co-authored-by: leejet <leejet714@gmail.com>
2023-08-21 21:55:00 +08:00
leejet
17095dddea
feat: add token weighting support (#13) 2023-08-20 20:28:36 +08:00