Sean Sube
f718087a54
lint(api): make chain pipeline logs more consistent
2023-07-04 12:27:17 -05:00
Sean Sube
d1ecef9f2e
apply lint
2023-07-04 12:09:46 -05:00
Sean Sube
6ec7777f77
lint(api): type fixes and hints throughout
2023-07-04 10:20:28 -05:00
Sean Sube
5d13629ee8
fix(api): log number of tiles contributing to each image pixel
2023-07-03 11:39:48 -05:00
Sean Sube
ed953f518a
feat(api): apply overlap to highres upscaling stage
2023-07-03 11:34:17 -05:00
Sean Sube
47b10945ff
fix(api): use consistent cache key for each model type
2023-07-03 11:33:56 -05:00
Sean Sube
a9fa76737e
fix(api): pass strength to LPW pipe from img2img blend
2023-07-03 08:27:37 -05:00
Sean Sube
3653723742
lint(api): move tile gradient logs to debug level
2023-07-03 08:05:57 -05:00
Sean Sube
197dc48b06
fix(api): make img2img blend work with LPW
2023-07-03 08:05:30 -05:00
Sean Sube
12698d38eb
fix(api): remove inner loops in upscale stages
2023-07-02 20:38:52 -05:00
Sean Sube
99c91a301c
feat: make enabling highres a parameter of its own
2023-07-02 19:08:40 -05:00
Sean Sube
3edf5e6c4d
fix(api): handle unlimited size stages correctly
2023-07-02 18:57:11 -05:00
Sean Sube
d8ec93a619
feat(api): pass tile size param to most pipeline stages
2023-07-02 18:54:10 -05:00
Sean Sube
c515d25dd4
fix(api): use upscaling method param in highres
2023-07-02 18:45:22 -05:00
Sean Sube
8781f7fda0
fix(api): make tiling compatible with source stages
2023-07-02 18:31:47 -05:00
Sean Sube
2a9e4a24a3
lint(api): make all other stages inherit from base stage
2023-07-02 18:21:21 -05:00
Sean Sube
c9a1ace40b
fix(api): tile stages based on input image or size param
2023-07-02 18:14:52 -05:00
Sean Sube
d98ecc023d
fix(api): do not overlap upscale tiles during highres
2023-07-02 17:13:16 -05:00
Sean Sube
a7be651032
fix(api): remove nested tiling in highres
2023-07-02 12:39:59 -05:00
Sean Sube
eef055eddd
fix(api): log tile size and overlap
2023-07-02 05:15:01 -05:00
Sean Sube
db86108dc5
apply lint
2023-07-01 14:39:02 -05:00
Sean Sube
8dbecd6947
lint(api): avoid shadowing params var
2023-07-01 12:38:26 -05:00
Sean Sube
7736430fe7
fix(api): pass overlap params to tile calculation
2023-07-01 12:36:17 -05:00
Sean Sube
2913cd0382
feat(api): make chain stages into classes with max tile size and step count estimate
2023-07-01 12:33:14 -05:00
Sean Sube
5e1b70091c
feat(api): remove size restrictions on most pipelines
2023-07-01 12:33:04 -05:00
Sean Sube
934dabb39e
fix(api): pass mask and sources to blending pipeline in correct order
2023-07-01 12:32:39 -05:00
Sean Sube
d9f251c88b
fix(api): repair progress for API pipelines
2023-07-01 12:32:05 -05:00
Sean Sube
2d10252564
fix(api): use kwargs for chain stages
2023-07-01 12:31:59 -05:00
Sean Sube
7a73c9ff61
fix(api): pass additional params to new stages
2023-07-01 12:31:41 -05:00
Sean Sube
7a951065e4
# This is a combination of 3 commits.
...
# This is the 1st commit message:
pass size to txt2img stage
# This is the commit message #2 :
pass highres and upscale params
# This is the commit message #3 :
pass correct strength param
2023-07-01 12:30:53 -05:00
Sean Sube
af416c252d
feat(api): make chain pipeline work without a source image
2023-07-01 12:30:43 -05:00
Sean Sube
fd3e65eafc
feat(api): start using chain pipelines for all images
2023-07-01 12:30:30 -05:00
Sean Sube
7e21b9539e
feat(api): embed image parameters in EXIF data ( #383 )
2023-06-26 07:03:06 -05:00
Sean Sube
82a80bb60b
fix(api): ensure gradient points are always in order
2023-06-10 15:20:17 -05:00
Sean Sube
732b07eb46
fix(api): skip gradient blending when tiles do not overlap
2023-06-09 17:24:08 -05:00
Sean Sube
f4d944acbe
apply lint
2023-06-08 07:20:19 -05:00
Sean Sube
3f00da9681
feat(api): add option for CPU-only conversion on systems with CUDA
2023-06-08 07:20:03 -05:00
Sean Sube
8215a1bf8a
fix(api): do not overlap tiles by default
2023-06-08 07:09:10 -05:00
Sean Sube
b92853d438
fix(api): limit latent padding to tile size
2023-06-06 08:14:09 -05:00
Sean Sube
78e606b049
lint(api): move some progress messages to info level
2023-06-05 23:47:32 -05:00
Sean Sube
6a09404243
disable histogram matching for now
2023-06-03 21:00:59 -05:00
Sean Sube
7a00d5d446
fix overlap factor
2023-06-03 20:56:56 -05:00
Sean Sube
1abd7060dc
remove second uint conversion
2023-06-03 20:46:46 -05:00
Sean Sube
e79a157957
blend in float, paste results back into scratch texture
2023-06-03 20:38:16 -05:00
Sean Sube
55e5f73d20
apply lint
2023-06-03 20:35:33 -05:00
Sean Sube
ec8f367316
use overlap param, apply to spiral tiling as well
2023-06-03 20:35:21 -05:00
Sean Sube
e64be674ea
crop count layer
2023-06-03 14:02:58 -05:00
Sean Sube
3bdf3692f4
crop output image
2023-06-03 13:50:27 -05:00
Sean Sube
20bf5ecbfc
use scaled dims for max
2023-06-03 13:28:09 -05:00
Sean Sube
51c5b63090
use adjusted tile for gradients, repeat mask based on output shape
2023-06-03 13:17:20 -05:00
Sean Sube
ec4ee49806
use mask for count
2023-06-03 12:22:50 -05:00
Sean Sube
a19bf06003
attempt gradient blending of tiles
2023-06-03 09:51:44 -05:00
Sean Sube
6317094c5f
feat(api): histogram equalization and blending for highres tiling
2023-06-02 01:14:40 -05:00
Sean Sube
23aaf656d3
fix(api): match mask and image size before adding noise ( #373 )
2023-05-03 23:05:40 -05:00
Sean Sube
ac4aef6ae3
resize mask to cover source image before trimming
2023-05-02 21:15:14 -05:00
Sean Sube
c8bc175239
fix(api): keep aspect ratio of mask for non-square sources ( #373 )
2023-05-02 20:52:28 -05:00
Sean Sube
8b57767f4a
fix chain stage loading
2023-05-01 23:25:55 -05:00
Sean Sube
95725fff79
feat(api): add tile size and stride to image parameters
2023-05-01 23:21:25 -05:00
Sean Sube
746e33b1f5
slice mask for views
2023-05-01 19:40:19 -05:00
Sean Sube
e8d6ab64c1
add view iteration to panoramic inpaint
2023-05-01 19:09:52 -05:00
Sean Sube
ca611f03df
enable all valid inpaint pipes
2023-05-01 18:58:29 -05:00
Sean Sube
fbab26fe31
resize mask to match source
2023-04-29 15:40:26 -05:00
Sean Sube
bfe989997e
use full tile size for mask and noise
2023-04-29 15:10:43 -05:00
Sean Sube
a1e7a5d077
pad incomplete mask tiles
2023-04-29 15:00:59 -05:00
Sean Sube
a4d197a6e7
round entire canvas up to tile size
2023-04-29 14:55:41 -05:00
Sean Sube
f782f39cce
fix(api): remove size limit on inpainting stage
2023-04-29 14:23:00 -05:00
Sean Sube
ec7d563c58
fix(api): resolve SD upscaling model relative to models path
2023-04-24 18:23:56 -05:00
Sean Sube
4f9d12cefa
remove LoRAs and TIs from SD upscaling
2023-04-23 18:22:44 -05:00
Sean Sube
8146ef881d
only apply prompt embeds when LPW is not selected, load upscale pipeline like others
2023-04-23 18:22:41 -05:00
Sean Sube
0eeb342576
apply alternatives to upscale stage
2023-04-23 18:22:38 -05:00
Sean Sube
b249936963
feat(api): parse alternative groups in prompts
2023-04-23 15:03:11 -05:00
Sean Sube
b20df68131
fix(api): switch between available pipelines
2023-04-15 15:37:45 -05:00
Sean Sube
bd992398ae
lint, fix numpy error in pix2pix
2023-04-13 18:41:22 -05:00
Sean Sube
52d639ffed
use keyword args for networks
2023-04-13 00:02:47 -05:00
Sean Sube
4aabf1ee27
wire up pipeline parameter, apply lint
2023-04-12 23:11:53 -05:00
Sean Sube
2af1530a7e
feat: make pipeline type a request parameter
2023-04-12 22:58:48 -05:00
Sean Sube
9e017ee35d
feat: add parameter for ControlNet selection
2023-04-12 08:43:15 -05:00
Sean Sube
a3daaf0112
initial integration of controlnet pipeline
2023-04-11 19:29:25 -05:00
Sean Sube
00be4f4721
fix(api): run PyTorch GC on ROCm devices ( #323 )
2023-04-11 08:34:21 -05:00
Sean Sube
de61e388a0
chore(api): remove some unused non-ONNX code paths
2023-04-11 08:26:21 -05:00
Sean Sube
e3540ac435
feat(api): add linear blend stage for chain pipeline ( #183 )
2023-04-10 21:15:57 -05:00
Sean Sube
2eaf85a43e
feat(api): add chain pipeline stages to load images from S3 or URL ( #184 , #185 )
2023-04-10 21:03:19 -05:00
Sean Sube
2a7621c195
feat(api): add params for more SwinIR models
2023-04-10 19:02:12 -05:00
Sean Sube
62aa7e8473
feat(api): add initial support for BSRGAN and SwinIR upscaling ( #153 , #154 )
2023-04-10 17:49:56 -05:00
Sean Sube
464bfd01b8
fix(api): apply FP16 patches to SD upscaling pipeline
2023-04-10 08:37:49 -05:00
Sean Sube
9698e29268
lint(api): name context params consistently ( #278 )
2023-04-09 20:33:03 -05:00
Sean Sube
1cfc538018
fix(api): ensure spiral grid coords are always whole pixels
2023-04-06 08:52:27 -05:00
Sean Sube
c8382dc689
feat(api): implement spiral tile order for non-square images
2023-04-04 20:02:13 -05:00
Sean Sube
0fdf4d3092
implement proper spiral grid coverage
2023-04-03 21:39:17 -05:00
Sean Sube
2c47904057
lint(api): use constant for model filename
2023-03-24 08:14:19 -05:00
Sean Sube
a9e55ff9f2
remove references to inversion parameter
2023-03-18 19:47:22 -05:00
Sean Sube
f336cc5d02
fix(api): provide noise parameter to SD upscaling ( #196 )
2023-03-18 14:02:30 -05:00
Sean Sube
226710a015
fix(api): use exception level logs
2023-03-16 22:29:07 -05:00
Sean Sube
6bdaa4a4ed
fix(api): make stage-specific source image optional in GFPGAN stage ( #233 )
2023-03-10 18:15:31 -06:00
Sean Sube
10fbafaff0
fix(api): correct imports
2023-03-04 22:25:49 -06:00
Sean Sube
dbf9eaf1a4
fix(api): run shape inference before converting models to fp16
...
per discussion in https://github.com/microsoft/onnxruntime/issues/14827
2023-02-28 22:36:45 -06:00
Sean Sube
565873b3ae
test half precision on all diffusion models
2023-02-28 22:23:55 -06:00
Sean Sube
1f9efb433a
apply lint
2023-02-28 22:04:55 -06:00
Sean Sube
c99aa67220
name threads, max queues, type/lint fixes
2023-02-28 21:44:52 -06:00
Sean Sube
525ee24e91
track started and finished jobs
2023-02-26 20:09:42 -06:00
Sean Sube
584dddb5d6
lint all the new stuff
2023-02-26 14:15:30 -06:00
Sean Sube
06c74a7a96
feat(api): remove Flask app from global scope
2023-02-26 10:15:12 -06:00
Sean Sube
f898de8c54
background workers, logger
2023-02-25 23:49:39 -06:00
Sean Sube
2e7de16778
feat: add a way to select textual inversions
2023-02-25 11:53:32 -06:00
Sean Sube
14c7e6a78c
apply lint
2023-02-21 08:26:09 -06:00
Sean Sube
82016a163a
restore single output in chain pipeline stages
2023-02-21 08:14:04 -06:00
Sean Sube
5f3b84827b
feat(api): add batch size to txt2img and img2img pipelines ( #195 )
2023-02-20 08:35:18 -06:00
Sean Sube
0deaa8898d
fix(api): add missing params to SD upscale
2023-02-19 23:30:48 -06:00
Sean Sube
c1189aad96
feat: add eta parameter ( fixes #194 )
2023-02-19 23:29:26 -06:00
Sean Sube
40e396a2c4
sonar lint fixes
2023-02-19 22:10:35 -06:00
Sean Sube
f561dfae83
fix(api): correct blending mask ( fixes #188 )
2023-02-19 11:04:11 -06:00
Sean Sube
c69e342ee4
apply sonar lint
2023-02-19 07:53:20 -06:00
Sean Sube
30978e3e5b
fix(api): only run GC is devices are passed
2023-02-19 07:41:16 -06:00
Sean Sube
b7a780bacc
correct param name for upscale mask
2023-02-18 22:53:57 -06:00
Sean Sube
ac1f7449bb
fix(api): use stage source when available
2023-02-18 22:11:44 -06:00
Sean Sube
25c56c7d5c
fix imports
2023-02-18 20:28:21 -06:00
Sean Sube
2b83f942af
restore original LPW names
2023-02-18 18:55:02 -06:00
Sean Sube
4d93c13431
apply lint, fix shadowed names
2023-02-18 17:59:13 -06:00
Sean Sube
b4f7973c1e
lint(api): use consistent name for source/mask images to avoid conflict with kwargs
2023-02-18 16:35:57 -06:00
Sean Sube
7b8ced0f68
feat(api): prefer chain stage parameters over request parameters ( #138 )
2023-02-18 16:27:48 -06:00
Sean Sube
ab6462d095
feat(api): enable optimizations for SD pipelines based on env vars ( #155 )
2023-02-18 11:53:13 -06:00
Sean Sube
ecf3c03f0f
feat: add parameter to run correction before upscaling ( #132 )
2023-02-18 11:04:08 -06:00
Sean Sube
b2de114c8c
fix(api): disable progress in diffusers pipelines
2023-02-18 09:42:38 -06:00
Sean Sube
b4e66ef502
feat(api): add flag to disable progress bars ( #158 )
2023-02-18 09:26:13 -06:00
Sean Sube
400e579491
Merge branch 'feat/113-onnx-resrgan'
2023-02-18 09:23:36 -06:00
Sean Sube
b3b10b4746
apply lint
2023-02-18 08:46:46 -06:00
Sean Sube
338fc237c7
fix(api): convert Real ESRGAN v3 using same arch as runtime
2023-02-18 08:41:15 -06:00
Sean Sube
3ca02d4875
fix(api): make size params iterable
2023-02-18 05:44:43 -06:00
Sean Sube
0e108daa0f
fix(api): resize images to min dimensions by padding if necessary ( #172 )
2023-02-18 05:35:53 -06:00
Sean Sube
2c9d96d2ee
feat(api): use ONNX for Real ESRGAN v3 model
2023-02-17 23:25:42 -06:00
Sean Sube
0ed4af18ad
fix(api): run torch gc alongside python ( #156 )
2023-02-16 18:11:35 -06:00
Sean Sube
8a2a9174ba
fix(api): pass both device and session options to ORT ( #38 )
2023-02-14 18:57:50 -06:00
Sean Sube
d473a0fd2d
fix(api): pass device options to ORT session ( #38 )
2023-02-14 17:12:52 -06:00
Sean Sube
1289c560bd
apply lint
2023-02-14 00:12:07 -06:00
Sean Sube
05756b2b08
fix(api): patch more download paths ( #134 )
2023-02-13 22:23:17 -06:00
Sean Sube
d1b250660e
fix(api): convert blend sources to the same size as the mask
2023-02-13 21:57:47 -06:00
Sean Sube
c432ab0795
remove oldest items from model cache first
2023-02-13 18:33:06 -06:00
Sean Sube
51d53597c0
fix(api): load Real ESRGAN PTH from cache
2023-02-13 18:21:05 -06:00
Sean Sube
0709c1dbf0
feat(api): add GFPGAN and Real ESRGAN to model cache
2023-02-13 18:10:11 -06:00
Sean Sube
e9472bc005
feat(api): add model cache for diffusion models
2023-02-13 18:04:46 -06:00
Sean Sube
7fa1783be4
feat: implement blend tab and copy buttons ( #62 )
2023-02-13 17:34:42 -06:00
Sean Sube
82487f5771
fix(api): separate Real ESRGAN upsampler from GFPGAN stage ( #87 )
2023-02-12 13:50:28 -06:00
Sean Sube
034be3266e
fix(api): accumulate progress from inpaint pipelines ( #90 )
2023-02-12 13:16:17 -06:00
Sean Sube
2f6a3afddb
pass progress on to most stages
2023-02-12 12:33:36 -06:00
Sean Sube
06d4f32574
make progress callbacks optional
2023-02-12 12:22:11 -06:00
Sean Sube
d9fc908592
feat(api): collect progress from chain pipelines ( #90 )
2023-02-12 12:17:36 -06:00
Sean Sube
8ea33e9874
fix(api): patch various download fns to use cache ( #95 )
2023-02-12 06:25:44 -06:00
Sean Sube
ffbe0929e6
apply lint
2023-02-11 18:10:36 -06:00
Sean Sube
3a290822eb
feat(api): pass tile order to inpaint and outpaint pipelines
2023-02-11 18:00:18 -06:00
Sean Sube
b1a1a2b9c4
lint(api): apply style fixes
2023-02-07 08:20:02 -06:00
Sean Sube
b6fd288842
fix(api): calculate outpaint overlap factor before adding margins
2023-02-06 22:49:58 -06:00
Sean Sube
a9f4e19616
chore(api): log overlap factor when outpainting
2023-02-06 22:43:58 -06:00
Sean Sube
de4a3818a0
fix(api): use SRVGG net for Real ESRGAN v3
2023-02-06 21:36:20 -06:00
Sean Sube
ae5cf1fd28
fix(api): restore denoise code path for Real ESRGAN v3 ( #109 )
2023-02-06 18:11:45 -06:00
Sean Sube
651acf6991
lint recent changes
2023-02-06 17:26:51 -06:00
Sean Sube
de4e7b0dc9
feat: add face outscale as its own parameter ( #111 )
2023-02-06 17:13:37 -06:00
Sean Sube
564cfc1279
lint(api): remove unused upsampler arg
2023-02-06 08:56:34 -06:00
Sean Sube
24ab52bf0d
fix(api): remove background upscaler from GFPGAN stage ( #108 )
2023-02-06 08:33:36 -06:00
Sean Sube
1dfd9e72ef
fix(api): run background ESRGAN on same device as GFPGAN
2023-02-06 08:10:36 -06:00
Sean Sube
c7e0041229
fix(api): pass current device when loading GFPGAN
2023-02-06 08:07:06 -06:00
Sean Sube
811b6640a8
fix(api): only run one form of outpaint tiling
2023-02-05 23:02:06 -06:00
Sean Sube
d6c1244d72
fix(api): use grid tiling when inpaint margin is 0
2023-02-05 22:57:52 -06:00
Sean Sube
7462c96616
apply lint fixes again
2023-02-05 17:55:04 -06:00
Sean Sube
20467aafac
chore(api): add logging for LPW pipelines
2023-02-05 17:53:51 -06:00
Sean Sube
9c84d853c9
add missing lpw param
2023-02-05 17:40:10 -06:00
Sean Sube
5f35a2853b
fix(api): fully switch between LPW and regular ONNX pipelines
2023-02-05 17:36:00 -06:00
Sean Sube
f3983a7917
fix(api): switch RNG based on LPW parameter
2023-02-05 17:24:15 -06:00
Sean Sube
fb376c6b62
feat(api): make LPW an image parameter
2023-02-05 17:15:37 -06:00
Sean Sube
6fe278c744
fix(api): switch between spiral and grid tiling based on outpaint margins ( #101 )
2023-02-05 16:56:11 -06:00
Sean Sube
ca2f0a6404
fix(api): pass outscale factor to CodeFormer ( fixes #100 )
2023-02-05 16:22:04 -06:00
Sean Sube
cb3590720b
lint(api): remove unused imports
2023-02-05 15:33:56 -06:00
Sean Sube
401df84069
fix(api): replace some numpy RNGs with torch equivalent
2023-02-05 13:43:33 -06:00
Sean Sube
7b506cb6d3
feat(api): enable LPW custom pipeline ( #27 )
2023-02-05 11:31:40 -06:00
Sean Sube
0a9f108156
feat(api): add CodeFormer to automatic upscale
2023-02-05 10:49:20 -06:00
Sean Sube
bf1378bf96
fix(api): log stacktrace from job errors
2023-02-05 08:50:26 -06:00
Sean Sube
e059f11253
feat(api): add CodeFormer stage for chain pipelines
2023-02-05 08:37:47 -06:00
Sean Sube
35681efc1b
clean up draft CodeFormer stage
2023-02-05 08:06:50 -06:00
Sean Sube
54dd34d211
lint(api): apply black and isort style
2023-02-05 07:53:35 -06:00
Sean Sube
37dd8927bf
fix(api): pass device ID in provider params
2023-02-04 21:52:45 -06:00
Sean Sube
cc12cb0fcf
clean up lingering provider refs
2023-02-04 21:23:34 -06:00
Sean Sube
04a2faffd9
fix(api): set CUDA device in ORT session
2023-02-04 21:17:39 -06:00
Sean Sube
8a81e8b810
add missing arg to chain pipeline
2023-02-04 14:27:27 -06:00
Sean Sube
ea69753bfd
fix(api): additional logging around model load ops
2023-02-02 23:34:02 -06:00
Sean Sube
aff3a3f2ee
lint(api): fix interpolation in some log messages
2023-02-02 18:52:31 -06:00
Sean Sube
a1298f1565
fix(api): respect model selection when running inpaint/outpaint stages
2023-02-02 18:51:54 -06:00
Sean Sube
6ce13096ed
feat(api): server setting to select image format
2023-02-02 08:19:57 -06:00
Sean Sube
6697c2eb6a
feat(api): save image params along with image ( #81 )
2023-02-01 22:20:40 -06:00
Sean Sube
066b1a0230
fix(api): run garbage collection after each model change
2023-02-01 21:20:48 -06:00
Sean Sube
c34ddacf55
fix(api): pin outscale for GFPGAN to 1 to avoid sparse tiling
2023-01-31 17:08:30 -06:00
Sean Sube
1ca7edb4a8
fix(api): variable name in GFPGAN
2023-01-31 08:24:10 -06:00
Sean Sube
39f84c4a49
fix(api): convert images to ndarray before passing to GFPGAN
2023-01-31 08:16:57 -06:00
Sean Sube
d5e5588939
fix(api): supply missing parameter to GFPGAN
2023-01-30 20:54:39 -06:00
Sean Sube
ec1e3614f5
remove unused import
2023-01-29 22:07:51 -06:00
Sean Sube
301cbe8b8c
pass provider to upscale pipeline, clean up some debug
2023-01-29 18:54:35 -06:00
Sean Sube
bacce0ace9
testing ONNX upscaling
2023-01-29 18:42:05 -06:00
Sean Sube
ca613cabe1
more ONNX upscaling
2023-01-29 16:57:18 -06:00
Sean Sube
c905fbb728
feat(api): add reduce stages, noise source
2023-01-29 15:23:01 -06:00
Sean Sube
f0c905721f
fix imports
2023-01-29 11:42:42 -06:00
Sean Sube
483a1bad68
feat(api): use per-tile latents for outpainting
2023-01-29 10:31:22 -06:00
Sean Sube
b1ba09af3e
fix(api): make sure each pipeline has its own list of stages
2023-01-29 00:25:49 -06:00