captainzero93 / extract-unet-safetensor

Processes SafeTensors files for Stable Diffusion 1.5 (SD 1.5), Stable Diffusion XL (SDXL), and FLUX models. It extracts the UNet into a separate file and creates a new file with the remaining model components (without the UNet).
MIT License
43 stars 4 forks source link

bug #3

Open kalle07 opened 1 month ago

kalle07 commented 1 month ago

crashes on all in webui forge (newest version) ... only for a1111 ?

Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)] Version: f2.0.1v1.10.1-previous-571-g1ef54368 Commit hash: 1ef5436833ae5438ff4bba5cf586f041cc711e21 UNet Loader install script is running UNet Loader extension installed successfully. CUDA 12.1 Launching Web UI with arguments: Total VRAM 16380 MB, total RAM 65349 MB pytorch version: 2.3.1+cu121 Set vram state to: NORMAL_VRAM Device: cuda:0 NVIDIA GeForce RTX 4060 Ti : native Hint: your device supports --cuda-malloc for potential speed improvements. VAE dtype preferences: [torch.bfloat16, torch.float32] -> torch.bfloat16 CUDA Using Stream: False e:\WebUI_Forge\system\python\lib\site-packages\transformers\utils\hub.py:127: FutureWarning: Using TRANSFORMERS_CACHE is deprecated and will be removed in v5 of Transformers. Use HF_HOME instead. warnings.warn( 2024-10-20 21:41:30.717289: I tensorflow/core/util/port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable TF_ENABLE_ONEDNN_OPTS=0. 2024-10-20 21:41:31.469034: I tensorflow/core/util/port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable TF_ENABLE_ONEDNN_OPTS=0. Using pytorch cross attention Using pytorch attention for VAE ControlNet preprocessor location: E:\WebUI_Forge\webui\models\ControlNetPreprocessor [-] ADetailer initialized. version: 24.9.0, num models: 20 *** Error loading script: init.py Traceback (most recent call last): File "E:\WebUI_Forge\webui\modules\scripts.py", line 525, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "E:\WebUI_Forge\webui\modules\script_loading.py", line 13, in load_module module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "E:\WebUI_Forge\webui\extensions\load-extracted-unet-automatic1111\scripts__init__.py", line 1, in from .unet_loader import on_app_started, on_ui_tabs ModuleNotFoundError: No module named 'init'


UNet Loader script is being imported UNet Loader script loaded successfully UNet Loader script is being imported UNet Loader script loaded successfully UNet Loader init.py is being executed UNet Loader init.py execution completed *** Error loading script: console_log_patch.py Traceback (most recent call last): File "E:\WebUI_Forge\webui\modules\scripts.py", line 525, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "E:\WebUI_Forge\webui\modules\script_loading.py", line 13, in load_module module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "E:\WebUI_Forge\webui\extensions\sd-webui-reactor\scripts\console_log_patch.py", line 17, in from scripts.reactor_logger import logger ModuleNotFoundError: No module named 'scripts.reactor_logger'


*** Error loading script: reactor_api.py Traceback (most recent call last): File "E:\WebUI_Forge\webui\modules\scripts.py", line 525, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "E:\WebUI_Forge\webui\modules\script_loading.py", line 13, in load_module module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "E:\WebUI_Forge\webui\extensions\sd-webui-reactor\scripts\reactor_api.py", line 28, in from scripts.reactor_swapper import EnhancementOptions, blend_faces, swap_face, DetectionOptions ModuleNotFoundError: No module named 'scripts.reactor_swapper'


*** Error loading script: reactor_faceswap.py Traceback (most recent call last): File "E:\WebUI_Forge\webui\modules\scripts.py", line 525, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "E:\WebUI_Forge\webui\modules\script_loading.py", line 13, in load_module module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "E:\WebUI_Forge\webui\extensions\sd-webui-reactor\scripts\reactor_faceswap.py", line 18, in from reactor_ui import ( File "E:\WebUI_Forge\webui\extensions\sd-webui-reactor\reactor_ui__init__.py", line 2, in import reactor_ui.reactor_tools_ui as ui_tools File "E:\WebUI_Forge\webui\extensions\sd-webui-reactor\reactor_ui\reactor_tools_ui.py", line 2, in from scripts.reactor_swapper import build_face_model, blend_faces ModuleNotFoundError: No module named 'scripts.reactor_swapper'


*** Error loading script: reactor_helpers.py Traceback (most recent call last): File "E:\WebUI_Forge\webui\modules\scripts.py", line 525, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "E:\WebUI_Forge\webui\modules\script_loading.py", line 13, in load_module module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "E:\WebUI_Forge\webui\extensions\sd-webui-reactor\scripts\reactor_helpers.py", line 14, in from scripts.reactor_globals import DEVICE, BASE_PATH, FACE_MODELS_PATH, IS_SDNEXT ModuleNotFoundError: No module named 'scripts.reactor_globals'


*** Error loading script: reactor_logger.py Traceback (most recent call last): File "E:\WebUI_Forge\webui\modules\scripts.py", line 525, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "E:\WebUI_Forge\webui\modules\script_loading.py", line 13, in load_module module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "E:\WebUI_Forge\webui\extensions\sd-webui-reactor\scripts\reactor_logger.py", line 6, in from scripts.reactor_globals import IS_RUN ModuleNotFoundError: No module named 'scripts.reactor_globals'


*** Error loading script: reactor_swapper.py Traceback (most recent call last): File "E:\WebUI_Forge\webui\modules\scripts.py", line 525, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "E:\WebUI_Forge\webui\modules\script_loading.py", line 13, in load_module module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "E:\WebUI_Forge\webui\extensions\sd-webui-reactor\scripts\reactor_swapper.py", line 14, in from scripts.reactor_globals import FACE_MODELS_PATH ModuleNotFoundError: No module named 'scripts.reactor_globals'


*** Error loading script: reactor_version.py Traceback (most recent call last): File "E:\WebUI_Forge\webui\modules\scripts.py", line 525, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "E:\WebUI_Forge\webui\modules\script_loading.py", line 13, in load_module module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "E:\WebUI_Forge\webui\extensions\sd-webui-reactor\scripts\reactor_version.py", line 4, in from scripts.reactor_logger import logger, get_Run, set_Run ModuleNotFoundError: No module named 'scripts.reactor_logger'


*** Error loading script: reactor_xyz.py Traceback (most recent call last): File "E:\WebUI_Forge\webui\modules\scripts.py", line 525, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "E:\WebUI_Forge\webui\modules\script_loading.py", line 13, in load_module module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "E:\WebUI_Forge\webui\extensions\sd-webui-reactor\scripts\reactor_xyz.py", line 8, in from scripts.reactor_helpers import ( ModuleNotFoundError: No module named 'scripts.reactor_helpers'


*** Error loading script: GenParamGetter.py Traceback (most recent call last): File "E:\WebUI_Forge\webui\modules\scripts.py", line 525, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "E:\WebUI_Forge\webui\modules\script_loading.py", line 13, in load_module module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "E:\WebUI_Forge\webui\extensions\sd-webui-supermerger\scripts\GenParamGetter.py", line 2, in import scripts.mergers.components as components ModuleNotFoundError: No module named 'scripts.mergers'


*** Error loading script: supermerger.py Traceback (most recent call last): File "E:\WebUI_Forge\webui\modules\scripts.py", line 525, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "E:\WebUI_Forge\webui\modules\script_loading.py", line 13, in load_module module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "E:\WebUI_Forge\webui\extensions\sd-webui-supermerger\scripts\supermerger.py", line 24, in import scripts.mergers.mergers ModuleNotFoundError: No module named 'scripts.mergers'


Loading additional modules ... done. 2024-10-20 21:41:46,502 - ControlNet - INFO - ControlNet UI callback registered. Found existing models directory: E:\WebUI_Forge\webui\extensions\load-extracted-unet-automatic1111\models Found safetensors files: [] UNet Loader interface created Found existing models directory: E:\WebUI_Forge\webui\extensions\load-extracted-unet-automatic1111\models Found safetensors files: [] UNet Loader interface created Model selected: {'checkpoint_info': {'filename': 'E:\WebUI_Forge\webui\models\Stable-diffusion\flux1-schnell_fp8_unet.safetensors', 'hash': '543134a1'}, 'additional_modules': ['E:\WebUI_Forge\webui\models\VAE\ae.safetensors', 'E:\WebUI_Forge\webui\models\VAE\t5xxl_fp16.safetensors', 'E:\WebUI_Forge\webui\models\VAE\ViT-L-14-BEST-smooth.safetensors'], 'unet_storage_dtype': None} Using online LoRAs in FP16: True Running on local URL: http://127.0.0.1:7860

if i uncheck both of your extensions all runging fine ...

captainzero93 commented 1 month ago

Hi, this is not a FORGE plugin it's a standalone Python program for extracting the UNET, the only plugin is a loader https://github.com/captainzero93/load-extracted-unet-automatic1111 please read the readme for both