* Add simple templating
* Little grid generation image fix
* Add new grid help to readme
* Grid image generation fixes
* Trim @ symbol if no matrix inputs
* Resolve conflicts
* Simplified the UI, using JS, removing the need for image select input
Signed-off-by: Alex Volkov <alex.volkov@fundbox.com>
* Merging incoming changes before PR
Signed-off-by: Alex Volkov <alex.volkov@fundbox.com>
* Removing pychache
Signed-off-by: Alex Volkov <alex.volkov@fundbox.com>
* adding gitignore
Signed-off-by: Alex Volkov <alex.volkov@fundbox.com>
Signed-off-by: Alex Volkov <alex.volkov@fundbox.com>
Fixed
At most should produce 2 samples
>original & gfpgan
>original & esrgan
>original & gfpgan -> esrgan
Turn off save individual samples to save only gfpgan, esrgan or gfpgan -> esrgan
The previous color magenta (255, 0, 255) distracts from the actual
images. Use white instead.
The text already has black stroke, so it remains readable even on white
backgrounds.
* Fix minor things from last big UI restyle
These two changes were applied to txt2img tab but not img2img tab:
Sample select changed from Radio to Dropdown,
Seed Input restricted to single line, which also removes the resize handlebar
Added a small CSS Workaround for a gradio bug in firefox: The Seed output box is a disabled number field, in chromium gradio will hide the up/down arrows but on firefox it leaves a weird grey square, the CSS rule included in this commit fixes that issue.
* remove full_width from where it doesn't belong
Co-authored-by: hlky <106811348+hlky@users.noreply.github.com>
The negative filename reported in #112 was caused by the old (now
replaced) listdir-based sequence number calculation, that incorrectly
subtracted 1 from the number of files already in the directory:
base_count = len([x for x in os.listdir(sample_path_i) if x.endswith(('.png', '.jpg'))]) - 1 # start at 0
The `- 1` was probably copied from the code for the base directory,
which had to subtract 1 to account for the `samples/` subdirectory (that
was before the listdir code started checking file extensions).
The get_next_sequence_number could never return negative numbers, since
it returns `result + 1`, meaning the sequence starts at 0 as intended.
Commit 82770bacae broke regular prompt
matrix, causing the following error:
Traceback (most recent call last):
File "/.../sd/miniconda3/envs/ldx/lib/python3.8/site-packages/gradio/routes.py", line 247, in run_predict
output = await app.blocks.process_api(
File "/.../sd/miniconda3/envs/ldx/lib/python3.8/site-packages/gradio/blocks.py", line 641, in process_api
predictions, duration = await self.call_function(fn_index, processed_input)
File "/.../sd/miniconda3/envs/ldx/lib/python3.8/site-packages/gradio/blocks.py", line 556, in call_function
prediction = await anyio.to_thread.run_sync(
File "/.../sd/miniconda3/envs/ldx/lib/python3.8/site-packages/anyio/to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/.../sd/miniconda3/envs/ldx/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "/.../sd/miniconda3/envs/ldx/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 867, in run
result = context.run(func, *args)
File "scripts/webui.py", line 933, in txt2img
output_images, seed, info, stats = process_images(
File "scripts/webui.py", line 841, in process_images
grid = image_grid(output_images, batch_size, force_n_rows=1 << ((len(prompt_matrix_parts)-1)//2), captions=prompt_matrix_parts)
File "scripts/webui.py", line 384, in image_grid
size = d.textbbox( (0,0), captions[i], font=fnt, stroke_width=2, align="center" )
IndexError: list index out of range