Files

45 lines
2.6 KiB
Python
Executable File

from .cfg_optimization import cfg_skip
from .discrete_sampler import DiscreteSampling
from .flex_chunking import (broadcast_chunk_sizes, build_pyramid_partitions,
chunk_boundaries, chunk_ends_tensor,
chunk_sizes_to_block_kwargs, normalize_chunk_spec,
refine_partition, sample_flexible_chunks,
uniform_chunks, validate_nested_partitions)
from .fm_solvers import FlowDPMSolverMultistepScheduler
from .fm_solvers_minimax_h3 import MiniMaxH3Scheduler
from .fm_solvers_unipc import FlowUniPCMultistepScheduler
from .fp4_optimization import (convert_float4_weight_dtype_wrapper,
convert_model_weight_to_float4,
dequantize_weight_from_float4,
quantize_weight_to_float4)
from .fp8_optimization import (autocast_model_forward,
convert_model_weight_to_float8,
convert_weight_dtype_wrapper,
replace_parameters_by_name)
from .fsdp_ema import FSDPEMA, LORAFSDPEMA
from .gpu_memory_mode import (GPU_MEMORY_MODES, QUANT_MODES,
apply_gpu_memory_mode, register_quant_mode,
split_gpu_memory_mode)
from .group_offload import (register_auto_device_hook,
safe_enable_group_offload,
safe_remove_group_offloading)
from .lora_utils import (LoadedTaomateH3LoRA, TaomateH3LoRACheckpointError,
canonical_taomate_h3_lora_targets,
convert_peft_lora_to_kohya_lora,
convert_taomate_h3_adapter, create_network,
load_taomate_h3_adapter, merge_lora,
official_to_kohya_lora_state_dict, unmerge_lora)
from .perf_metrics import install as install_perf_metrics
from .perf_metrics import install_training as install_perf_training
from .perf_metrics import instrument_pipeline
from .sd3_sde_with_logprob import sde_step_with_logprob
from .tqdm_bar import PauseAwareTqdm
from .trigflow_sampler import (RectifiedFlow_TrigFlowWrapper,
sample_trigflow_timesteps)
from .utils import (SegmentVideoSaver, StreamVideoSaver, calculate_dimensions,
filter_kwargs, get_autocast_dtype, get_image,
get_image_latent, get_image_to_video_latent,
get_video_to_video_latent, merge_video_audio,
save_videos_grid, save_videos_with_audio_grid)
from .utils_yolo import ObjectDetector, ObjectInstanceDetector