diff --git a/jobs/process/BaseSDTrainProcess.py b/jobs/process/BaseSDTrainProcess.py index 857a49b..1a894aa 100644 --- a/jobs/process/BaseSDTrainProcess.py +++ b/jobs/process/BaseSDTrainProcess.py @@ -2099,24 +2099,25 @@ class BaseSDTrainProcess(BaseTrainProcess): block_compile = getattr(self.model_config, 'block_compile', False) cache_info = f", cache_size_limit={cache_size_limit}" if cache_size_limit != 8 else "" - # ==================================================== # BLOCK COMPILE # ==================================================== if block_compile: + BLOCK_LIST_ATTRS = self.sd.get_transformer_block_names() + + if BLOCK_LIST_ATTRS is None or len(BLOCK_LIST_ATTRS) == 0: + BLOCK_LIST_ATTRS = [ + 'layers', + 'transformer_blocks', + 'single_transformer_blocks', + 'double_stream_blocks', + 'single_stream_blocks', + 'double_blocks', + 'single_blocks', + 'blocks', + ] inner_unet = unwrap_model(self.sd.unet) - BLOCK_LIST_ATTRS = [ - 'layers', - 'transformer_blocks', - 'single_transformer_blocks', - 'double_stream_blocks', - 'single_stream_blocks', - 'double_blocks', - 'single_blocks', - 'blocks', - ] - compiled_block_count = 0 for attr_name in BLOCK_LIST_ATTRS: diff --git a/toolkit/config_modules.py b/toolkit/config_modules.py index d5c1079..86d44a4 100644 --- a/toolkit/config_modules.py +++ b/toolkit/config_modules.py @@ -709,7 +709,9 @@ class ModelConfig: if self.compile and self.quantize: print("Quantized model detected - allowing torch.compile (experimental - Does not work with offloaded transformer)") - # self.compile = False + # make it torchao instead of quantio for compatibility with torch compile + if self.qtype == "qfloat8": + self.qtype = "float8" self.block_compile = kwargs.get("block_compile", False) self.compile_mode = kwargs.get("compile_mode", "default") self.compile_fullgraph = kwargs.get("compile_fullgraph", True) diff --git a/ui/src/app/jobs/new/jobConfig.ts b/ui/src/app/jobs/new/jobConfig.ts index 49f216c..ec01502 100644 --- a/ui/src/app/jobs/new/jobConfig.ts +++ b/ui/src/app/jobs/new/jobConfig.ts @@ -32,11 +32,7 @@ export const defaultSliderConfig: SliderConfig = { }; export const defaultCompileOptions = { - block_compile: false, - compile_mode: 'default', - compile_fullgraph: false, - compile_dynamic: false, - cache_size_limit: undefined, + block_compile: true, }; export const defaultJobConfig: JobConfig = { @@ -102,7 +98,6 @@ export const defaultJobConfig: JobConfig = { diff_output_preservation_class: 'person', switch_boundary_every: 1, loss_type: 'mse', - compile: false, }, logging: { log_every: 1, @@ -117,6 +112,7 @@ export const defaultJobConfig: JobConfig = { arch: 'flex1', low_vram: false, model_kwargs: {}, + compile: false, }, sample: defaultSampleConfig, }, diff --git a/version.py b/version.py index 4b4c077..88817f6 100644 --- a/version.py +++ b/version.py @@ -1 +1 @@ -VERSION = "0.10.8" +VERSION = "0.10.9"