add boogu

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2026-07-04 15:26:36 +02:00
parent 5b486dc3cf
commit db26b77909
23 changed files with 5152 additions and 16 deletions
+13 -1
View File
@@ -11,7 +11,7 @@ import diffusers.loaders.single_file_utils
import torch
import huggingface_hub as hf
from modules.logger import log
from modules import timer, paths, shared, modelloader, devices, script_callbacks, sd_vae, sd_unet, errors, sd_models_compile, sd_detect, model_quant, sd_hijack_te, sd_hijack_accelerate, sd_hijack_safetensors, sd_hijack_transformers, sd_hijack_hfhub, attention
from modules import timer, paths, shared, modelloader, devices, script_callbacks, sd_vae, sd_unet, errors, sd_models_compile, sd_detect, model_quant, sd_hijack_te, sd_hijack_vae, sd_hijack_accelerate, sd_hijack_safetensors, sd_hijack_transformers, sd_hijack_hfhub, attention
from modules.memstats import memory_stats
from modules.shared_helpers import walk_files
from modules.modeldata import model_data
@@ -54,6 +54,8 @@ pipe_switch_task_exclude = [
'Kandinsky5I2IPipeline',
'GoogleNanoBananaPipeline',
'Step1XEditPipeline',
'BooguImagePipeline',
'BooguImageTurboPipeline',
]
i2i_pipes = [
'LEditsPPPipelineStableDiffusion', 'LEditsPPPipelineStableDiffusionXL',
@@ -480,6 +482,10 @@ def load_diffuser_force(detected_model_type: str, checkpoint_info: CheckpointInf
from pipelines.model_qwen import load_qwen
sd_model = load_qwen(checkpoint_info, diffusers_load_config)
allow_post_quant = False
elif model_type in ['Boogu']:
from pipelines.model_boogu import load_boogu
sd_model = load_boogu(checkpoint_info, diffusers_load_config)
allow_post_quant = False
elif model_type in ['HunyuanDiT']:
from pipelines.model_hunyuandit import load_hunyuandit
sd_model = load_hunyuandit(checkpoint_info, diffusers_load_config)
@@ -1225,6 +1231,8 @@ def backup_pipe_components(pipe):
'mask_processor': getattr(pipe, "mask_processor", None),
'restore_pipeline': getattr(pipe, "restore_pipeline", None),
'task_args': getattr(pipe, "task_args", None),
'hijack_prompt': hasattr(pipe, "orig_encode_prompt"),
'hijack_vae': hasattr(pipe, "vae") and hasattr(pipe.vae, "orig_decode")
}
@@ -1250,6 +1258,10 @@ def restore_pipe_components(pipe, components):
pipe.restore_pipeline = components['restore_pipeline']
if components['task_args'] is not None:
pipe.task_args = components['task_args']
if components['hijack_prompt']:
sd_hijack_te.init_hijack(pipe)
if components['hijack_vae']:
sd_hijack_vae.init_hijack(pipe)
if pipe.__class__.__name__ in ['FluxPipeline', 'StableDiffusion3Pipeline']:
pipe.register_modules(image_encoder = components['image_encoder'])