speed up again (#527)

This commit is contained in:
lllyasviel
2023-10-03 17:14:38 -07:00
committed by GitHub
parent 6c56b580d7
commit ba58dbc8bc
6 changed files with 28 additions and 2 deletions
+14
View File
@@ -196,6 +196,20 @@ refresh_everything(
expansion = FooocusExpansion()
@torch.no_grad()
@torch.inference_mode()
def prepare_text_encoder(async_call=True):
if async_call:
# TODO: make sure that this is always called in an async way so that users cannot feel it.
pass
assert_model_integrity()
comfy.model_management.load_models_gpu([xl_base_patched.clip.patcher, expansion.patcher])
return
prepare_text_encoder(async_call=True)
@torch.no_grad()
@torch.inference_mode()
def process_diffusion(positive_cond, negative_cond, steps, switch, width, height, image_seed, callback, sampler_name, scheduler_name, latent=None, denoise=1.0, tiled=False, cfg_scale=7.0):