MinusZoneAI / ComfyUI-TrainTools-MZ

在ComfyUI中进行lora微调的节点,依赖于kohya-ss/sd-scripts等训练工具(Nodes for fine-tuning lora in ComfyUI, dependent on training tools such as kohya-ss/sd-scripts)
28 stars 2 forks source link

这是什么原因 #4

Open Fihade opened 1 month ago

Fihade commented 1 month ago

image

wailovet commented 1 month ago

报错往上拉拉,这是哪个节点爆出的

Fihade commented 1 month ago

报错往上拉拉,这是哪个节点爆出的

If execution seems broken due to forward ComfyUI changes, you can disable the optimization from rgthree settings in ComfyUI. 当前分支(current branch): 71e2c91330a9d866ec05cdd10584bbb962896a99(HEAD) 目标分支(target branch): 71e2c91330a9d866ec05cdd10584bbb962896a99 From https://githubfast.com/kohya-ss/sd-scripts

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/root/ComfyUI/custom_nodes/ComfyUI-TrainTools-MZ/hook_kohya_ss_run.py", line 40, in from . import hook_kohya_ss_utils ImportError: attempted relative import with no known parent package !!! Exception during processing!!! 训练失败!!! 具体报错信息请查看控制台... Command '['/conda/bin/python', '/root/ComfyUI/custom_nodes/ComfyUI-TrainTools-MZ/hook_kohya_ss_run.py', '--sys_path', '/root/ComfyUI/models/minus_zone_models/train_tools/kohya_ss_lora', '--train_config_json', '{"pretrained_model_name_or_path": "/root/ComfyUI/models/checkpoints/sd_xl_base_1.0.safetensors", "max_train_steps": "15", "xformers": true, "sdpa": false, "fp8_base": false, "mixed_precision": "fp16", "cache_latents": true, "cache_latents_to_disk": true, "network_dim": "16", "network_alpha": "8", "network_module": "networks.lora", "network_train_unet_only": true, "learning_rate": "1e-5", "lr_scheduler": "cosine_with_restarts", "optimizer_type": "AdamW", "save_every_n_epochs": "5", "shuffle_caption": true, "lr_warmup_steps": "0", "save_precision": "fp16", "lr_scheduler_num_cycles": "1", "persistent_data_loader_workers": true, "no_metadata": true, "noise_offset": "0.1", "output_dir": "/root/ComfyUI/output/mz_train_workspaces/KiKi/output", "output_name": "KiKi_lora_sdxl_20240626_182017", "no_half_vae": true, "lowram": false, "dataset_config": "/root/ComfyUI/output/mz_train_workspaces/KiKi/dataset.toml", "max_train_epochs": "100"}', '--train_func', 'run_lora_sdxl', '--master_port', '60992', '--other_config_json', '{"sample_prompt": "Anya"}']' returned non-zero exit status 1. Traceback (most recent call last): File "/root/ComfyUI/custom_nodes/ComfyUI-TrainTools-MZ/mz_train_tools_core.py", line 416, in run_hook_kohya_ss_run_file subprocess.run( File "/conda/lib/python3.10/subprocess.py", line 526, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['/conda/bin/python', '/root/ComfyUI/custom_nodes/ComfyUI-TrainTools-MZ/hook_kohya_ss_run.py', '--sys_path', '/root/ComfyUI/models/minus_zone_models/train_tools/kohya_ss_lora', '--train_config_json', '{"pretrained_model_name_or_path": "/root/ComfyUI/models/checkpoints/sd_xl_base_1.0.safetensors", "max_train_steps": "15", "xformers": true, "sdpa": false, "fp8_base": false, "mixed_precision": "fp16", "cache_latents": true, "cache_latents_to_disk": true, "network_dim": "16", "network_alpha": "8", "network_module": "networks.lora", "network_train_unet_only": true, "learning_rate": "1e-5", "lr_scheduler": "cosine_with_restarts", "optimizer_type": "AdamW", "save_every_n_epochs": "5", "shuffle_caption": true, "lr_warmup_steps": "0", "save_precision": "fp16", "lr_scheduler_num_cycles": "1", "persistent_data_loader_workers": true, "no_metadata": true, "noise_offset": "0.1", "output_dir": "/root/ComfyUI/output/mz_train_workspaces/KiKi/output", "output_name": "KiKi_lora_sdxl_20240626_182017", "no_half_vae": true, "lowram": false, "dataset_config": "/root/ComfyUI/output/mz_train_workspaces/KiKi/dataset.toml", "max_train_epochs": "100"}', '--train_func', 'run_lora_sdxl', '--master_port', '60992', '--other_config_json', '{"sample_prompt": "Anya"}']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/root/ComfyUI/execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "/root/ComfyUI/execution.py", line 81, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "/root/ComfyUI/execution.py", line 74, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) File "/root/ComfyUI/custom_nodes/ComfyUI-TrainTools-MZ/init.py", line 278, in start return mz_train_tools_core.MZ_KohyaSSTrain_call(kwargs) File "/root/ComfyUI/custom_nodes/ComfyUI-TrainTools-MZ/mz_train_tools_core.py", line 518, in MZ_KohyaSSTrain_call run_hook_kohya_ss_run_file( File "/root/ComfyUI/custom_nodes/ComfyUI-TrainTools-MZ/mz_train_tools_core.py", line 426, in run_hook_kohya_ss_run_file raise Exception(f"训练失败!!! 具体报错信息请查看控制台... {e}") Exception: 训练失败!!! 具体报错信息请查看控制台... Command '['/conda/bin/python', '/root/ComfyUI/custom_nodes/ComfyUI-TrainTools-MZ/hook_kohya_ss_run.py', '--sys_path', '/root/ComfyUI/models/minus_zone_models/train_tools/kohya_ss_lora', '--train_config_json', '{"pretrained_model_name_or_path": "/root/ComfyUI/models/checkpoints/sd_xl_base_1.0.safetensors", "max_train_steps": "15", "xformers": true, "sdpa": false, "fp8_base": false, "mixed_precision": "fp16", "cache_latents": true, "cache_latents_to_disk": true, "network_dim": "16", "network_alpha": "8", "network_module": "networks.lora", "network_train_unet_only": true, "learning_rate": "1e-5", "lr_scheduler": "cosine_with_restarts", "optimizer_type": "AdamW", "save_every_n_epochs": "5", "shuffle_caption": true, "lr_warmup_steps": "0", "save_precision": "fp16", "lr_scheduler_num_cycles": "1", "persistent_data_loader_workers": true, "no_metadata": true, "noise_offset": "0.1", "output_dir": "/root/ComfyUI/output/mz_train_workspaces/KiKi/output", "output_name": "KiKi_lora_sdxl_20240626_182017", "no_half_vae": true, "lowram": false, "dataset_config": "/root/ComfyUI/output/mz_train_workspaces/KiKi/dataset.toml", "max_train_epochs": "100"}', '--train_func', 'run_lora_sdxl', '--master_port', '60992', '--other_config_json', '{"sample_prompt": "Anya"}']' returned non-zero exit status 1.

Prompt executed in 15.24 seconds ===========================httpd.serve_forever() end=======================================

diffusers 是什么版本

Fihade commented 1 month ago

### 更新 diffusers 版本之后,解决 ‘AttributeError: module 'diffusers.loaders.single_file' has no attribute 'snapshot_download'这个问题,遇到了新的问题,如下:

=============================================== 当前分支(current branch): 71e2c91330a9d866ec05cdd10584bbb962896a99(HEAD) 目标分支(target branch): 71e2c91330a9d866ec05cdd10584bbb962896a99 From https://githubfast.com/kohya-ss/sd-scripts

wailovet commented 1 month ago

### 更新 diffusers 版本之后,解决 ‘AttributeError: module 'diffusers.loaders.single_file' has no attribute 'snapshot_download'这个问题,遇到了新的问题,如下:

=============================================== 当前分支(current branch): 71e2c91330a9d866ec05cdd10584bbb962896a99(HEAD) 目标分支(target branch): 71e2c91330a9d866ec05cdd10584bbb962896a99 From https://githubfast.com/kohya-ss/sd-scripts

  • branch 71e2c91330a9d866ec05cdd10584bbb962896a99 -> FETCH_HEAD HEAD is now at 71e2c91 Merge pull request #1230 from kohya-ss/dependabot/github_actions/crate-ci/typos-1.19.0 ===========================httpd.serve_forever() start======================================= WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for: PyTorch 2.3.0+cu121 with CUDA 1201 (you have 2.1.2+cu121) Python 3.10.14 (you have 3.10.13) Please reinstall xformers (see https://github.com/facebookresearch/xformers#installing-xformers) Memory-efficient attention, SwiGLU, sparse and more won't be available. Set XFORMERS_MORE_DETAILS=1 for more details /conda/lib/python3.10/site-packages/diffusers/models/transformers/transformer_2d.py:34: FutureWarning: Transformer2DModelOutput is deprecated and will be removed in version 1.0.0. Importing Transformer2DModelOutput from diffusers.models.transformer_2d is deprecated and this will be removed in a future version. Please use from diffusers.models.modeling_outputs import Transformer2DModelOutput, instead. deprecate("Transformer2DModelOutput", "1.0.0", deprecation_message) master_port = 47353 Traceback (most recent call last): File "/root/ComfyUI/custom_nodes/ComfyUI-TrainTools-MZ/hook_kohya_ss_run.py", line 212, in func_maptrain_func File "/root/ComfyUI/custom_nodes/ComfyUI-TrainTools-MZ/hook_kohya_ss_run.py", line 163, in run_lora_sdxl LOG({ File "/root/ComfyUI/custom_nodes/ComfyUI-TrainTools-MZ/hook_kohya_ss_run.py", line 183, in LOG raise Exception(f"LOG failed: {resp.text}") Exception: LOG failed:
ERROR: The requested URL could not be retrieved