i (#114)
This commit is contained in:
parent
6d4e1d22e7
commit
5e5a2d428f
|
|
@ -1 +1 @@
|
|||
version = '1.0.29'
|
||||
version = '1.0.30'
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ def worker():
|
|||
import random
|
||||
import modules.default_pipeline as pipeline
|
||||
import modules.path
|
||||
import modules.patch
|
||||
|
||||
from PIL import Image
|
||||
from modules.sdxl_styles import apply_style, aspect_ratios
|
||||
|
|
@ -30,11 +31,13 @@ def worker():
|
|||
|
||||
def handler(task):
|
||||
prompt, negative_prompt, style_selction, performance_selction, \
|
||||
aspect_ratios_selction, image_number, image_seed, base_model_name, refiner_model_name, \
|
||||
aspect_ratios_selction, image_number, image_seed, sharpness, base_model_name, refiner_model_name, \
|
||||
l1, w1, l2, w2, l3, w3, l4, w4, l5, w5 = task
|
||||
|
||||
loras = [(l1, w1), (l2, w2), (l3, w3), (l4, w4), (l5, w5)]
|
||||
|
||||
modules.patch.sharpness = sharpness
|
||||
|
||||
pipeline.refresh_base_model(base_model_name)
|
||||
pipeline.refresh_refiner_model(refiner_model_name)
|
||||
pipeline.refresh_loras(loras)
|
||||
|
|
|
|||
|
|
@ -76,6 +76,12 @@ progress::after {
|
|||
resize: none !important;
|
||||
}
|
||||
|
||||
.refresh_button{
|
||||
border: none !important;
|
||||
background: none !important;
|
||||
font-size: none !important;
|
||||
}
|
||||
|
||||
'''
|
||||
progress_html = '''
|
||||
<div class="loader-container">
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ from comfy.samplers import model_management, lcm, math
|
|||
from comfy.ldm.modules.diffusionmodules.openaimodel import timestep_embedding, forward_timestep_embed
|
||||
from modules.filters import gaussian_filter_2d
|
||||
|
||||
sharpness = 2.0
|
||||
|
||||
|
||||
def sampling_function_patched(model_function, x, timestep, uncond, cond, cond_scale, cond_concat=None, model_options={},
|
||||
seed=None):
|
||||
|
|
@ -346,7 +348,7 @@ def unet_forward_patched(self, x, timesteps=None, context=None, y=None, control=
|
|||
x0 = self.out(h)
|
||||
|
||||
alpha = 1.0 - (timesteps / 999.0)[:, None, None, None].clone()
|
||||
alpha *= 0.002
|
||||
alpha *= 0.001 * sharpness
|
||||
degraded_x0 = gaussian_filter_2d(x0) * alpha + x0 * (1.0 - alpha)
|
||||
|
||||
x0 = x0 * uc_mask + degraded_x0 * (1.0 - uc_mask)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
### 1.0.29
|
||||
|
||||
* Added "Advanced->Advanced->Advanced" block for future development.
|
||||
|
||||
### 1.0.29
|
||||
|
||||
* Fix overcook problem in 1.0.28
|
||||
|
||||
### 1.0.28
|
||||
|
|
|
|||
7
webui.py
7
webui.py
|
|
@ -75,7 +75,10 @@ with shared.gradio_root:
|
|||
lora_model = gr.Dropdown(label=f'SDXL LoRA {i+1}', choices=['None'] + modules.path.lora_filenames, value=modules.path.default_lora_name if i == 0 else 'None')
|
||||
lora_weight = gr.Slider(label='Weight', minimum=-2, maximum=2, step=0.01, value=modules.path.default_lora_weight)
|
||||
lora_ctrls += [lora_model, lora_weight]
|
||||
model_refresh = gr.Button(label='Refresh', value='Refresh All Files', variant='secondary')
|
||||
with gr.Row():
|
||||
model_refresh = gr.Button(label='Refresh', value='\U0001f504 Refresh All Files', variant='secondary', elem_classes='refresh_button')
|
||||
with gr.Accordion(label='Advanced', open=False):
|
||||
sharpness = gr.Slider(label='Image Sharpness', minimum=0.0, maximum=20.0, step=0.01, value=2.0)
|
||||
|
||||
def model_refresh_clicked():
|
||||
modules.path.update_all_model_names()
|
||||
|
|
@ -90,7 +93,7 @@ with shared.gradio_root:
|
|||
advanced_checkbox.change(lambda x: gr.update(visible=x), advanced_checkbox, right_col)
|
||||
ctrls = [
|
||||
prompt, negative_prompt, style_selction,
|
||||
performance_selction, aspect_ratios_selction, image_number, image_seed
|
||||
performance_selction, aspect_ratios_selction, image_number, image_seed, sharpness
|
||||
]
|
||||
ctrls += [base_model, refiner_model] + lora_ctrls
|
||||
run_button.click(fn=generate_clicked, inputs=ctrls, outputs=[run_button, progress_html, progress_window, gallery])
|
||||
|
|
|
|||
Loading…
Reference in New Issue