Skip to content

Commit

Permalink
Merge branch 'lllyasviel:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
chouhai2018 authored Jun 4, 2024
2 parents 0c53da9 + ab01104 commit 2be2ddc
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 29 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ RUN chown -R user:user /content
WORKDIR /content
USER user

COPY . /content/app
COPY --chown=user:user . /content/app
RUN mv /content/app/models /content/app/models.org

CMD [ "sh", "-c", "/content/entrypoint.sh ${CMDARGS}" ]
22 changes: 13 additions & 9 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -74,31 +74,35 @@ progress::after {
text-align: right;
width: 215px;
}
div:has(> #positive_prompt) {
border: none;
}

.type_row{
height: 80px !important;
#positive_prompt {
padding: 1px;
background: var(--background-fill-primary);
}

.type_row_half{
height: 32px !important;
.type_row {
height: 84px !important;
}

.scroll-hide{
resize: none !important;
.type_row_half {
height: 34px !important;
}

.refresh_button{
.refresh_button {
border: none !important;
background: none !important;
font-size: none !important;
box-shadow: none !important;
}

.advanced_check_row{
.advanced_check_row {
width: 250px !important;
}

.min_check{
.min_check {
min-width: min(1px, 100%) !important;
}

Expand Down
2 changes: 1 addition & 1 deletion javascript/localization.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function refresh_style_localization() {
}

function refresh_aspect_ratios_label(value) {
label = document.querySelector('#aspect_ratios_accordion div span[data-original-text="Aspect Ratios"]');
label = document.querySelector('#aspect_ratios_accordion div span');
translation = getTranslation("Aspect Ratios");
if (typeof translation == "undefined") {
translation = "Aspect Ratios";
Expand Down
3 changes: 1 addition & 2 deletions ldm_patched/contrib/external_custom_sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,7 @@ def INPUT_TYPES(s):
def get_sigmas(self, model, steps, denoise):
start_step = 10 - int(10 * denoise)
timesteps = torch.flip(torch.arange(1, 11) * 100 - 1, (0,))[start_step:start_step + steps]
ldm_patched.modules.model_management.load_models_gpu([model])
sigmas = model.model.model_sampling.sigma(timesteps)
sigmas = model.model_sampling.sigma(timesteps)
sigmas = torch.cat([sigmas, sigmas.new_zeros([1])])
return (sigmas, )

Expand Down
2 changes: 1 addition & 1 deletion modules/sample_hijack.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def calculate_sigmas_scheduler_hacked(model, scheduler_name, steps):
elif scheduler_name == "sgm_uniform":
sigmas = normal_scheduler(model, steps, sgm=True)
elif scheduler_name == "turbo":
sigmas = SDTurboScheduler().get_sigmas(namedtuple('Patcher', ['model'])(model=model), steps=steps, denoise=1.0)[0]
sigmas = SDTurboScheduler().get_sigmas(model=model, steps=steps, denoise=1.0)[0]
elif scheduler_name == "align_your_steps":
model_type = 'SDXL' if isinstance(model.latent_format, ldm_patched.modules.latent_formats.SDXL) else 'SD1'
sigmas = AlignYourStepsScheduler().get_sigmas(model_type=model_type, steps=steps, denoise=1.0)[0]
Expand Down
35 changes: 23 additions & 12 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -370,25 +370,36 @@ entry_with_update.py [-h] [--listen [IP]] [--port PORT]
[--web-upload-size WEB_UPLOAD_SIZE]
[--hf-mirror HF_MIRROR]
[--external-working-path PATH [PATH ...]]
[--output-path OUTPUT_PATH] [--temp-path TEMP_PATH]
[--output-path OUTPUT_PATH]
[--temp-path TEMP_PATH]
[--cache-path CACHE_PATH] [--in-browser]
[--disable-in-browser] [--gpu-device-id DEVICE_ID]
[--disable-in-browser]
[--gpu-device-id DEVICE_ID]
[--async-cuda-allocation | --disable-async-cuda-allocation]
[--disable-attention-upcast] [--all-in-fp32 | --all-in-fp16]
[--disable-attention-upcast]
[--all-in-fp32 | --all-in-fp16]
[--unet-in-bf16 | --unet-in-fp16 | --unet-in-fp8-e4m3fn | --unet-in-fp8-e5m2]
[--vae-in-fp16 | --vae-in-fp32 | --vae-in-bf16]
[--vae-in-fp16 | --vae-in-fp32 | --vae-in-bf16]
[--vae-in-cpu]
[--clip-in-fp8-e4m3fn | --clip-in-fp8-e5m2 | --clip-in-fp16 | --clip-in-fp32]
[--directml [DIRECTML_DEVICE]] [--disable-ipex-hijack]
[--directml [DIRECTML_DEVICE]]
[--disable-ipex-hijack]
[--preview-option [none,auto,fast,taesd]]
[--attention-split | --attention-quad | --attention-pytorch]
[--disable-xformers]
[--always-gpu | --always-high-vram | --always-normal-vram |
--always-low-vram | --always-no-vram | --always-cpu [CPU_NUM_THREADS]]
[--always-offload-from-vram] [--disable-server-log]
[--debug-mode] [--is-windows-embedded-python]
[--disable-server-info] [--share] [--preset PRESET]
[--language LANGUAGE] [--disable-offload-from-vram]
[--theme THEME] [--disable-image-log]
[--always-gpu | --always-high-vram | --always-normal-vram |
--always-low-vram | --always-no-vram | --always-cpu [CPU_NUM_THREADS]]
[--always-offload-from-vram]
[--pytorch-deterministic] [--disable-server-log]
[--debug-mode] [--is-windows-embedded-python]
[--disable-server-info] [--multi-user] [--share]
[--preset PRESET] [--disable-preset-selection]
[--language LANGUAGE]
[--disable-offload-from-vram] [--theme THEME]
[--disable-image-log] [--disable-analytics]
[--disable-metadata] [--disable-preset-download]
[--enable-describe-uov-image]
[--always-download-new-model]
```

## Advanced Features
Expand Down
6 changes: 3 additions & 3 deletions webui.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ def generate_clicked(task: worker.AsyncTask):
gallery = gr.Gallery(label='Gallery', show_label=False, object_fit='contain', visible=True, height=768,
elem_classes=['resizable_area', 'main_view', 'final_gallery', 'image_gallery'],
elem_id='final_gallery')
with gr.Row(elem_classes='type_row'):
with gr.Row():
with gr.Column(scale=17):
prompt = gr.Textbox(show_label=False, placeholder="Type prompt here or paste parameters.", elem_id='positive_prompt',
container=False, autofocus=True, elem_classes='type_row', lines=1024)
autofocus=True, lines=3)

default_prompt = modules.config.default_prompt
if isinstance(default_prompt, str) and default_prompt != '':
Expand Down Expand Up @@ -569,7 +569,7 @@ def refresh_files_clicked():
modules.config.update_files()
results = [gr.update(choices=modules.config.model_filenames)]
results += [gr.update(choices=['None'] + modules.config.model_filenames)]
results += [gr.update(choices=['None'] + modules.config.vae_filenames)]
results += [gr.update(choices=[flags.default_vae] + modules.config.vae_filenames)]
if not args_manager.args.disable_preset_selection:
results += [gr.update(choices=modules.config.available_presets)]
for i in range(modules.config.default_max_lora_number):
Expand Down

0 comments on commit 2be2ddc

Please sign in to comment.