Skip to content

Commit

Permalink
update logs styles infotext
Browse files Browse the repository at this point in the history
Signed-off-by: Vladimir Mandic <[email protected]>
  • Loading branch information
vladmandic committed Feb 24, 2025
1 parent 1062627 commit c11952a
Show file tree
Hide file tree
Showing 14 changed files with 20 additions and 19 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Change Log for SD.Next

## Update for 2025-02-23
## Update for 2025-02-24

- **Remote Decode**
- final step of image generate, VAE decode, is by far the most memory intensive operation and can easily result in out-of-memory errors
Expand Down
4 changes: 3 additions & 1 deletion installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ class Dot(dict): # dot notation access to dictionary attributes
# 'stable-diffusion-webui-images-browser': '27fe4a7',
}
control_extensions = [ # 3rd party extensions marked as safe for control ui
'NudeNet', 'IP Adapters',
'NudeNet',
'IP Adapters',
'Remove background',
]


Expand Down
6 changes: 4 additions & 2 deletions javascript/sdnext.css
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { margin-left
/* custom gradio elements */
.accordion-compact { padding: 8px 0px 4px 0px !important; }
.settings-accordion>div { flex-flow: wrap; }
.small-accordion .form { min-width: var(--left-column) !important; max-width: max-content; }
.small-accordion .label-wrap .icon { margin-right: 1em; margin-left: 0.3em; color: var(--button-primary-border-color); }
.small-accordion .label-wrap { padding: 16px 0px 8px 0px; margin: 0; border-top: 2px solid var(--button-secondary-border-color); }
.small-accordion { width: fit-content !important; min-width: fit-content !important; padding-left: 0 !important; }
Expand Down Expand Up @@ -102,7 +101,10 @@ button.custom-button { border-radius: var(--button-large-radius); padding: var(-
#control-inputs { margin-top: 1em; }
#txt2img_prompt_container, #img2img_prompt_container, #control_prompt_container { margin-right: var(--layout-gap) }
#txt2img_footer, #img2img_footer, #control_footer { height: fit-content; display: none; }
#txt2img_generate_box, #img2img_generate_box, #control_generate_box { gap: 0.5em; flex-wrap: unset; min-width: unset; width: 66.6%; }
#txt2img_generate_box, #img2img_generate_box { gap: 0.5em; flex-wrap: unset; min-width: unset; width: 66.6%; }
#control_generate_box { gap: 0.5em; flex-wrap: unset; min-width: unset; width: 100%; }
#control_generate_box button:nth-child(1) { flex-grow: 2; }
#control_generate_box button:nth-child(2) { flex-grow: 1; }
#txt2img_actions_column, #img2img_actions_column, #control_actions_column { gap: 0.3em; height: fit-content; }
#txt2img_generate_box>button, #img2img_generate_box>button, #control_generate_box>button, #txt2img_enqueue, #img2img_enqueue, #txt2img_enqueue>button, #img2img_enqueue>button { min-height: 44px !important; max-height: 44px !important; line-height: 1em; white-space: break-spaces; min-width: unset; }
#txt2img_enqueue_wrapper, #img2img_enqueue_wrapper, #control_enqueue_wrapper { min-width: unset !important; width: 31%; }
Expand Down
2 changes: 1 addition & 1 deletion modules/control/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def check_active(p, unit_type, units):
else:
if u.process.processor_id is not None:
active_process.append(u.process)
shared.log.debug(f'Control process unit: i={num_units} process={u.process.processor_id}')
shared.log.debug(f'Control process unit: i={num_units} process={u.process.processor_id}')
active_strength.append(float(u.strength))
debug_log(f'Control active: process={len(active_process)} model={len(active_model)}')
return active_process, active_model, active_strength, active_start, active_end
Expand Down
3 changes: 1 addition & 2 deletions modules/history.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def selected(self):
else:
current_index = 0
item = self.latents[current_index]
shared.log.debug(f'History get: index={current_index} time={item.ts} shape={item.latent.shape} dtype={item.latent.dtype} count={self.count}')
shared.log.debug(f'History get: index={current_index} time={item.ts} shape={list(item.latent.shape)} dtype={item.latent.dtype} count={self.count}')
return item.latent.to(devices.device), current_index

def find(self, name):
Expand All @@ -68,7 +68,6 @@ def add(self, latent, preview=None, info=None, ops=[]):
if torch.is_tensor(latent):
item = Item(latent, preview, info, ops)
self.latents.appendleft(item)
# shared.log.debug(f'History add: shape={latent.shape} dtype={latent.dtype} count={self.count}')
if self.count >= shared.opts.latent_history:
self.latents.pop()

Expand Down
2 changes: 1 addition & 1 deletion modules/processing_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ def init_hr(self, scale = None, upscaler = None, force = False):
self.hr_upscale_to_x, self.hr_upscale_to_y = self.hr_resize_x, self.hr_resize_y
# hypertile_set(self, hr=True)
# shared.state.job_count = 2 * self.n_iter
shared.log.debug(f'Control hires: upscaler="{self.hr_upscaler}" scale={scale} fixed={not use_scale} size={self.hr_upscale_to_x}x{self.hr_upscale_to_y}')
# shared.log.debug(f'Control refine: upscaler="{self.hr_upscaler}" scale={scale} fixed={not use_scale} size={self.hr_upscale_to_x}x{self.hr_upscale_to_y}')


def switch_class(p: StableDiffusionProcessing, new_class: type, dct: dict = None):
Expand Down
6 changes: 3 additions & 3 deletions modules/processing_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ def create_infotext(p: StableDiffusionProcessing, all_prompts=None, all_seeds=No
# sdnext
"App": 'SD.Next',
"Version": git_commit,
"Backend": 'Diffusers' if shared.native else 'Original',
"Pipeline": 'LDM',
"Parser": shared.opts.prompt_attention.split()[0],
"Backend": 'Legacy' if not shared.native else None,
"Pipeline": 'LDM' if not shared.native else None,
"Parser": shared.opts.prompt_attention if shared.opts.prompt_attention != 'native' else None,
"Comment": comment,
"Operations": '; '.join(ops).replace('"', '') if len(p.ops) > 0 else 'none',
}
Expand Down
2 changes: 1 addition & 1 deletion modules/processing_vae.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def full_vae_decode(latents, model):
if debug:
log_debug(f'VAE memory: {shared.mem_mon.read()}')
vae_name = os.path.splitext(os.path.basename(sd_vae.loaded_vae_file))[0] if sd_vae.loaded_vae_file is not None else "default"
shared.log.debug(f'Decode: vae="{vae_name}" upcast={upcast} slicing={getattr(model.vae, "use_slicing", None)} tiling={getattr(model.vae, "use_tiling", None)} latents={latents.shape}:{latents.device}:{latents.dtype} time={t1-t0:.3f}')
shared.log.debug(f'Decode: vae="{vae_name}" upcast={upcast} slicing={getattr(model.vae, "use_slicing", None)} tiling={getattr(model.vae, "use_tiling", None)} latents={list(latents.shape)}:{latents.device}:{latents.dtype} time={t1-t0:.3f}')
return decoded


Expand Down
2 changes: 1 addition & 1 deletion modules/sd_checkpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def list_models():
shared.opts.data['sd_model_checkpoint'] = checkpoint_info.title
elif shared.cmd_opts.ckpt != shared.default_sd_model_file and shared.cmd_opts.ckpt is not None:
shared.log.warning(f'Load model: path="{shared.cmd_opts.ckpt}" not found')
shared.log.info(f'Available Models: items={len(checkpoints_list)} safetensors="{shared.opts.ckpt_dir}":{len(safetensors_list)} diffusers="{shared.opts.diffusers_dir}":{len(diffusers_list)} time={time.time()-t0:.2f}')
shared.log.info(f'Available Models: safetensors="{shared.opts.ckpt_dir}":{len(safetensors_list)} diffusers="{shared.opts.diffusers_dir}":{len(diffusers_list)} items={len(checkpoints_list)} time={time.time()-t0:.2f}')
checkpoints_list = dict(sorted(checkpoints_list.items(), key=lambda cp: cp[1].filename))

def update_model_hashes():
Expand Down
2 changes: 1 addition & 1 deletion modules/styles.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def list_folder(folder):

list_folder(self.path)
t1 = time.time()
shared.log.info(f'Available Styles: folder="{self.path}" items={len(self.styles.keys())} time={t1-t0:.2f}')
shared.log.info(f'Available Styles: path="{self.path}" items={len(self.styles.keys())} time={t1-t0:.2f}')

def find_style(self, name):
found = [style for style in self.styles.values() if style.name == name]
Expand Down
2 changes: 0 additions & 2 deletions modules/ui_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ def save_files(js_data, files, html_info, index):

class PObject: # pylint: disable=too-few-public-methods
def __init__(self, d=None):
# 'Parser': 'Full parser', 'Model': 'lyriel_v16', 'Model hash': 'ec6f68ea63', 'Backend': 'Diffusers', 'App': 'SD.Next', 'Version': '69d7fef', 'Operations': 'txt2img', 'Sampler options': 'order 2/low order', 'Pipeline': 'StableDiffusionPipeline'
# <pre>seq, uuid<br>date, datetime, job_timestamp<br>generation_number, batch_number<br>model, model_shortname<br>model_hash, model_name<br>sampler, seed, steps, cfg<br>clip_skip, denoising<br>hasprompt, prompt, styles<br>prompt_hash, prompt_no_styles<br>prompt_spaces, prompt_words<br>height, width, image_hash<br></pre>
if d is not None:
for k, v in d.items():
setattr(self, k, v)
Expand Down
2 changes: 1 addition & 1 deletion modules/ui_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def return_stats(t: float = None):
ram = shared.ram_stats()
if ram['used'] > 0:
cpu += f"| RAM {ram['used']} GB {round(100.0 * ram['used'] / ram['total'])}%"
return f"<div class='performance'><p>Time: {elapsed_text} | {summary} {gpu} {cpu}</p></div>"
return f"<div class='performance'><p>{elapsed_text} {summary} {gpu} {cpu}</p></div>"


def return_controls(res, t: float = None):
Expand Down
2 changes: 1 addition & 1 deletion modules/ui_extra_networks.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ def create_page(self, tabname, skip = False):
self.html += ''.join(htmls)
self.page_time = time.time()
self.html = f"<div id='~tabname_{self_name_id}_subdirs' class='extra-network-subdirs'>{subdirs_html}</div><div id='~tabname_{self_name_id}_cards' class='extra-network-cards'>{self.html}</div>"
shared.log.debug(f"Networks: page='{self.name}' items={len(self.items)} subfolders={len(subdirs)} tab={tabname} folders={self.allowed_directories_for_previews()} list={self.list_time:.2f} thumb={self.preview_time:.2f} desc={self.desc_time:.2f} info={self.info_time:.2f} workers={shared.max_workers}")
shared.log.debug(f"Networks: type='{self.name}' items={len(self.items)} subfolders={len(subdirs)} tab={tabname} folders={self.allowed_directories_for_previews()} list={self.list_time:.2f} thumb={self.preview_time:.2f} desc={self.desc_time:.2f} info={self.info_time:.2f} workers={shared.max_workers}")
if len(self.missing_thumbs) > 0:
threading.Thread(target=self.create_thumb).start()
return self.patch(self.html, tabname)
Expand Down
2 changes: 1 addition & 1 deletion wiki
Submodule wiki updated from 0ef2c8 to 910dc3

0 comments on commit c11952a

Please sign in to comment.