mirror of
https://github.com/vladmandic/automatic
synced 2026-09-06 13:00:44 +02:00
add disable_accelerate option
This commit is contained in:
@@ -847,6 +847,9 @@ def load_diffuser(checkpoint_info=None, already_loaded_state_dict=None, timer=No
|
||||
}
|
||||
if hasattr(pipeline, 'from_single_file'):
|
||||
diffusers_load_config['use_safetensors'] = True
|
||||
if shared.opts.disable_accelerate:
|
||||
from diffusers.utils import import_utils
|
||||
import_utils._accelerate_available = False # pylint: disable=protected-access
|
||||
sd_model = pipeline.from_single_file(checkpoint_info.path, **diffusers_load_config)
|
||||
if sd_model is not None and hasattr(sd_model, 'unet') and hasattr(sd_model.unet, 'config') and 'inpainting' in checkpoint_info.path.lower():
|
||||
shared.log.debug('Model patch: type=inpaint')
|
||||
|
||||
@@ -412,6 +412,7 @@ options_templates.update(options_section(('diffusers', "Diffusers Settings"), {
|
||||
"diffusers_vae_load_variant": OptionInfo("default", "Diffusers VAE loading variant", gr.Radio, {"choices": ['default', 'fp32', 'fp16']}),
|
||||
"custom_diffusers_pipeline": OptionInfo('', 'Load custom Diffusers pipeline'),
|
||||
"diffusers_eval": OptionInfo(True, "Force model eval"),
|
||||
"disable_accelerate": OptionInfo(False, "Disable use of accelerate library"),
|
||||
"diffusers_force_zeros": OptionInfo(True, "Force zeros for prompts when empty"),
|
||||
"diffusers_aesthetics_score": OptionInfo(False, "Require aesthetics score"),
|
||||
"diffusers_pooled": OptionInfo("default", "Diffusers SDXL pooled embeds (experimental)", gr.Radio, {"choices": ['default', 'weighted']}),
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ torchsde==0.2.6
|
||||
antlr4-python3-runtime==4.9.3
|
||||
requests==2.31.0
|
||||
tqdm==4.66.1
|
||||
accelerate==0.25.0
|
||||
accelerate==0.26.1
|
||||
opencv-contrib-python-headless==4.8.1.78
|
||||
diffusers==0.25.0
|
||||
einops==0.4.1
|
||||
|
||||
+1
-1
Submodule wiki updated: c47ef6e70c...1c90ea2065
Reference in New Issue
Block a user