Commit Graph

224 Commits

Author SHA1 Message Date
PrinzKasper
a3456f9992
Minor Fixes to the recent UI restyling (#154)
* 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>
2022-08-27 21:38:52 +01:00
dr3amer
e1cc092ba9 removed useless comments
removed useless comments
2022-08-27 21:09:49 +01:00
dr3amer
eb6f513fdf added go big implementation 2022-08-27 21:09:49 +01:00
hlky
bb3c02368d
Create txt2img.jpg 2022-08-27 19:26:24 +01:00
hlky
bdd876f60a
Delete txt2img.jpg 2022-08-27 19:26:12 +01:00
hlky
44eb1bbf15
Update images 2022-08-27 19:23:14 +01:00
Torbjörn Lönnemark
93412100a6 Revert bad fix for #112
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.
2022-08-27 19:16:53 +01:00
hlky
10f8f4c078
Fixes #112 #125 2022-08-27 18:51:56 +01:00
Torbjörn Lönnemark
446d18f94c Use get_next_sequence_number everywhere
This got lost at some point for seemingly no reason, so restore it.
2022-08-27 18:37:58 +01:00
Torbjörn Lönnemark
fe6f1e3dc5 Fix regular prompt matrix
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
2022-08-27 18:31:16 +01:00
Torbjörn Lönnemark
145102950a Extract font loading into function and use everywhere
Fixes font loading on linux (again).
2022-08-27 18:31:04 +01:00
hdon1
d89c381f69 Steps in sample filename
Include steps before the sampler name in sample filename to make easier quick reference.
2022-08-27 18:28:47 +01:00
hdon1
7859bc9205 Update webui.py 2022-08-27 18:28:47 +01:00
hdon1
c861b71d95 Prevent overwriting with different sampler
Include sampler name in image filename to prevent overwriting when same seed is used
2022-08-27 18:28:47 +01:00
hlky
ddf8fb1693
Update README.md 2022-08-27 18:28:24 +01:00
altryne
fa42bc7574 Update issue templates
This adds issue templates for bug and feature requests
2022-08-27 17:56:32 +01:00
JohannesGaessler
fba80c4484 Allow unicode in YAML info dicts 2022-08-27 17:56:18 +01:00
Oxlamon
82770bacae Add simple templating 2022-08-27 16:38:50 +01:00
EyeDeck
54a24088aa
fix debug (#126)
* Expose some useful Gradio server launch arguments to command line

* add --grid-format, --gradio-share args

* fixes, add --gradio-disable-queue

* space

* remove debug oops
2022-08-27 16:38:19 +01:00
EyeDeck
b2dc4539d4
Added --grid-format command-line arg (#123)
* Expose some useful Gradio server launch arguments to command line

* add --grid-format, --gradio-share args

* fixes, add --gradio-disable-queue

* space
2022-08-27 14:28:10 +01:00
hlky
a91d2af413 Update webui.py
Co-authored-by: PrinzKasper <jan.schaufelberger@viadukt4.de>
2022-08-27 13:55:57 +01:00
hlky
08e95348d6 Update webui.py
Co-authored-by: PrinzKasper <jan.schaufelberger@viadukt4.de>
2022-08-27 13:55:57 +01:00
hlky
1b341dd84c Update webui.py
Co-authored-by: PrinzKasper <jan.schaufelberger@viadukt4.de>
2022-08-27 13:55:57 +01:00
altryne
cb0953c312 Adding 2 options, --share and --share-password, to share online with gradio
Signed-off-by: altryne <altryne@gmail.com>
2022-08-27 13:55:57 +01:00
altryne
aec6308035 Ok now css is fixed
Signed-off-by: altryne <altryne@gmail.com>
2022-08-27 13:55:57 +01:00
altryne
3fbc950cd6 FIxed css to have the center column take most of the space
Signed-off-by: altryne <altryne@gmail.com>
2022-08-27 13:55:57 +01:00
altryne
bfe6d32d42 Typo in styleing
Signed-off-by: altryne <altryne@gmail.com>
2022-08-27 13:55:57 +01:00
Alex Volkov
98d87b8842 Fixed auto selecting of the img2img tab with gr.Update
Signed-off-by: Alex Volkov <alex.volkov@fundbox.com>
2022-08-27 13:55:57 +01:00
Alex Volkov
87afca1b7f Select the img2img tab when user clicks push to img2img
Signed-off-by: Alex Volkov <alex.volkov@fundbox.com>
2022-08-27 13:55:57 +01:00
Alex Volkov
43889682c6 Working on reslying the UI
Signed-off-by: Alex Volkov <alex.volkov@fundbox.com>
2022-08-27 13:55:57 +01:00
JohannesGaessler
55487bc60c Basic scripting support, CLI batch processing 2022-08-27 13:38:12 +01:00
hlky
b9b74329ae
Save original copy of image before upscaling or face fixing #103 2022-08-27 05:54:59 +01:00
Torbjörn Lönnemark
343b4157d4 Improve sequence number generation
This should behave much better, for example if (re)moving older files
from the output directories.

Also remove the increments (which never had any effect), and move the
grid_count calculation right before where it's used.
2022-08-27 05:06:46 +01:00
hlky
7613b17d59
fix img2img ValueError: negative shift count 2022-08-27 04:56:39 +01:00
Torbjörn Lönnemark
4ac26312ff Default --gpu to value of $CUDA_VISIBLE_DEVICES if set
Trust the value of $CUDA_VISIBLE_DEVICES if it is already set and --gpu
is not passed.
2022-08-27 04:41:03 +01:00
hlky
1d622b2120
Prompt matrix fix 2022-08-27 04:39:00 +01:00
hlky
34a0611e9c
NameError undefined '_' 2022-08-27 03:43:41 +01:00
hlky
3e9998a699
Update README.md 2022-08-27 03:40:26 +01:00
hlky
670ab25a6a Fix again, final hopefully 2022-08-27 03:39:14 +01:00
hlky
bc212870ae Fix conflicts 2022-08-27 03:39:14 +01:00
hlky
ddc1f428e8 Conflicts 2022-08-27 03:39:14 +01:00
hlky
b0b9c8a1d9 Optimized support force push 2022-08-27 03:39:14 +01:00
hlky
8c1ea1311a
Update README.md 2022-08-27 02:22:07 +01:00
hlky
32108a54a0
Update sync.yml 2022-08-27 02:10:39 +01:00
hlky
474f146527
Update README.md 2022-08-27 02:10:04 +01:00
hlky
9ef82a0ac7
Update README.md 2022-08-27 00:54:28 +01:00
oldfndm
0aa9727f6c feat(): add mask blur strength slider 2022-08-27 00:53:36 +01:00
hlky
78d136e9f2
glob functionality using listdir 🔥 2022-08-27 00:52:56 +01:00
Torbjörn Lönnemark
6d5ac72790 Fix seed conversion
Max value for a 32bit unsigned int is 2**32 - 1, not 2**32 (and the
range of possible values returned by randint includes both of its
arguments).

Python's hash() function is not deterministic across different
invocations of the interpreter. This meant a given string seed would
produce different results after restarting the script. Use the passed
strings to seed a Random instance instead.
2022-08-27 00:19:41 +01:00
oldfndm
ab9f89a585 feat(): add advanced editor 2022-08-27 00:08:15 +01:00