mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-01-22 20:40:55 -08:00
added tool for profiling code
This commit is contained in:
parent
aafbb5b403
commit
57e6d05a43
5 changed files with 78 additions and 5 deletions
|
|
@ -16,7 +16,7 @@ from skimage import exposure
|
|||
from typing import Any
|
||||
|
||||
import modules.sd_hijack
|
||||
from modules import devices, prompt_parser, masking, sd_samplers, lowvram, infotext_utils, extra_networks, sd_vae_approx, scripts, sd_samplers_common, sd_unet, errors, rng
|
||||
from modules import devices, prompt_parser, masking, sd_samplers, lowvram, infotext_utils, extra_networks, sd_vae_approx, scripts, sd_samplers_common, sd_unet, errors, rng, profiling
|
||||
from modules.rng import slerp # noqa: F401
|
||||
from modules.sd_hijack import model_hijack
|
||||
from modules.sd_samplers_common import images_tensor_to_samples, decode_first_stage, approximation_indexes
|
||||
|
|
@ -843,7 +843,8 @@ def process_images(p: StableDiffusionProcessing) -> Processed:
|
|||
# backwards compatibility, fix sampler and scheduler if invalid
|
||||
sd_samplers.fix_p_invalid_sampler_and_scheduler(p)
|
||||
|
||||
res = process_images_inner(p)
|
||||
with profiling.Profiler():
|
||||
res = process_images_inner(p)
|
||||
|
||||
finally:
|
||||
sd_models.apply_token_merging(p.sd_model, 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue