kohya-ss / kohya-ss/sd-scripts

subprocess.CalledProcessError, please help me

Open
#145 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
7.2k
Forks
1.2k
Avg merge
11m
Merged PRs (30d)
2

Description

import network module: networks.lora
Traceback (most recent call last):
File "./train_network.py", line 538, in
train(args)
File "./train_network.py", line 177, in train
network = network_module.create_network(1.0, args.network_dim, args.network_alpha, vae, text_encoder, unet, **net_kwargs)
File "/home/uqwenf/sd-scripts/networks/lora.py", line 60, in create_network
network = LoRANetwork(text_encoder, unet, multiplier=multiplier, lora_dim=network_dim, alpha=network_alpha)
File "/home/uqwenf/sd-scripts/networks/lora.py", line 101, in __init__
def create_modules(prefix, root_module: torch.nn.Module, target_replace_modules) -> list[LoRAModule]:
TypeError: 'type' object is not subscriptable
Traceback (most recent call last):
File "/home/uqwenf/sd-scripts/venv/bin/accelerate", line 8, in
sys.exit(main())
File "/home/uqwenf/sd-scripts/venv/lib/python3.8/site-packages/accelerate/commands/accelerate_cli.py", line 45, in main
args.func(args)
File "/home/uqwenf/sd-scripts/venv/lib/python3.8/site-packages/accelerate/commands/launch.py", line 1104, in launch_command
simple_launcher(args)
File "/home/uqwenf/sd-scripts/venv/lib/python3.8/site-packages/accelerate/commands/launch.py", line 567, in simple_launcher
raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd)
subprocess.CalledProcessError: Command '['/home/uqwenf/sd-scripts/venv/bin/python3', './train_network.py', '--enable_bucket', '--pretrained_model_name_or_path=models/model.safetensors', '--train_data_dir=tt/tt-input', '--output_dir=tt/tt-output', '--logging_dir=logs', '--resolution=512,512', '--network_module=networks.lora', '--max_train_epochs=10', '--learning_rate=1e-4', '--unet_lr=1e-4', '--text_encoder_lr=1e-5', '--network_dim=32', '--network_alpha=32', '--output_name=tt-output', '--lr_scheduler=cosine_with_restarts', '--train_batch_size=1', '--save_every_n_epochs=2', '--mixed_precision=fp16', '--save_precision=fp16', '--seed=1337', '--cache_latents', '--clip_skip=2', '--prior_loss_weight=1', '--max_token_length=225', '--caption_extension=.txt', '--save_model_as=safetensors', '--shuffle_caption', '--use_8bit_adam']' returned non-zero exit status 1.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with networks/lora.py at line 101 and the train_network.py call that creates the network. Reproduce the failure in the Python 3.8 environment shown in the traceback and check the annotation involved in the TypeError. Done means network creation proceeds without this error and the training command gets past the reported failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.