mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-09-13 04:55:53 +00:00
Created logging code for this branch so that it can be used to track down all the code paths where transformer_options would need to be added
This commit is contained in:
@@ -1019,6 +1019,7 @@ class CFGGuider:
|
||||
self.conds[k] = list(map(lambda a: a.copy(), self.original_conds[k]))
|
||||
preprocess_conds_hooks(self.conds)
|
||||
|
||||
import comfy.ldm.modules.attention #TODO: Remove this $$$$$
|
||||
try:
|
||||
orig_model_options = self.model_options
|
||||
self.model_options = comfy.model_patcher.create_model_options_clone(self.model_options)
|
||||
@@ -1033,12 +1034,17 @@ class CFGGuider:
|
||||
self,
|
||||
comfy.patcher_extension.get_all_wrappers(comfy.patcher_extension.WrappersMP.OUTER_SAMPLE, self.model_options, is_model_options=True)
|
||||
)
|
||||
comfy.ldm.modules.attention.LOG_ATTN_CALLS = True #TODO: Remove this $$$$$
|
||||
comfy.ldm.modules.attention.LOG_CONTENTS = {}
|
||||
output = executor.execute(noise, latent_image, sampler, sigmas, denoise_mask, callback, disable_pbar, seed)
|
||||
finally:
|
||||
cast_to_load_options(self.model_options, device=self.model_patcher.offload_device)
|
||||
self.model_options = orig_model_options
|
||||
self.model_patcher.hook_mode = orig_hook_mode
|
||||
self.model_patcher.restore_hook_patches()
|
||||
comfy.ldm.modules.attention.LOG_ATTN_CALLS = False #TODO: Remove this $$$$$
|
||||
comfy.ldm.modules.attention.save_log_contents()
|
||||
comfy.ldm.modules.attention.LOG_CONTENTS = {}
|
||||
|
||||
del self.conds
|
||||
return output
|
||||
|
Reference in New Issue
Block a user