Diffusion Single File
comfyui

Anything new¿

#230
by zak01010101 - opened

This is boring are they going to make something or anything cool this Community page is dying

This is boring are they going to make something or anything cool this Community page is dying

Hi, a month of waiting is not a long time, especially since they are currently facing big problems that are not being resolved quickly.So you should wait at least 2-3 months, and maybe the anime will receive some updates. I hope...

big problems¿

big problems¿

I just suggested that one of the problems I would attribute is the resolution, which is upscaled to 1.5 maximum, and then there is ripples and noise.I could also point out the problem associated with training, i.e. you can make custom checkpoints, but you can’t train on these same custom checkpoints.

big problems¿

I just suggested that one of the problems I would attribute is the resolution, which is upscaled to 1.5 maximum, and then there is ripples and noise.I could also point out the problem associated with training, i.e. you can make custom checkpoints, but you can’t train on these same custom checkpoints.

I don't really think Anima base has an issue with generating directly at 1.5x resolution or doing HiRes Fix at 1.5x like the preview versions did. At worst you can just use MultiDiffusion or do a tiled upscale with the tile ControlNet, which both look better than HiRes Fix anyways.

Also you should be able to train on custom checkpoints (I assume merges or finetunes) just fine, it's likely that the trainer just isn't recognizing the model key prefix in the saved checkpoint vs the prefix on Anima normally (which is model.diffusion_model). Either just use a different trainer or code in recognition yourself. As far as I know ComfyUI especially does this where it renames the prefix when you use it to merge and save checkpoints (I forget what exactly, I think it renames to "net.") .

I don't really think Anima base has an issue with generating directly at 1.5x resolution or doing HiRes Fix at 1.5x like the preview versions did. At worst you can just use MultiDiffusion or do a tiled upscale with the tile ControlNet, which both look better than HiRes Fix anyways.

Also you should be able to train on custom checkpoints (I assume merges or finetunes) just fine, it's likely that the trainer just isn't recognizing the model key prefix in the saved checkpoint vs the prefix on Anima normally (which is model.diffusion_model). Either just use a different trainer or code in recognition yourself. As far as I know ComfyUI especially does this where it renames the prefix when you use it to merge and save checkpoints (I forget what exactly, I think it renames to "net.") .

I meant the resolution upscaled more than 1.5x, but otherwise everything works great.

Regarding training with custom models, I encountered errors like "dit layers" and as a result, I couldn't train them. I can't give you an example of the error right now; you need to dig into the queries for the IIS with the console output. I tried the following trainer: Kohya_ss, Anima standalone trainer. All of them usually crashed with this error.

Edited: I'm adding the startup log from start to crash.
2026-05-27 16:43:19 INFO Loading settings from D:\Anima train_util.py:4778
Standalone
trainer\Anima-Standalone-Traine
r\training-ui\jobs\experlora_merged_config.toml...
2026-05-27 16:43:20 INFO Loading dataset config from train_network.py:655
D:\Anima Standalone
trainer\Anima-Standalone-Trai
ner\training-ui\jobs\experlora\dataset.toml
INFO prepare images. train_util.py:2124
INFO get image size from name of train_util.py:2007
cache files
0%| | 0/46 [00:00<?, ?it/s]
100%|██████████| 46/46 [00:00<00:00, 564146.15it/s]
INFO set image size from cache train_util.py:2037
files: 0/46
INFO found directory train_util.py:2061
D:\Datasets\experlora\img\
amain contains 46 image files
INFO Using 9 workers for caption train_util.py:2070
reading
read caption: 0%| | 0/46 [00:00<?, ?it/s]
read caption: 100%|██████████| 46/46 [00:00<00:00, 19872.08it/s]
INFO 368 train images with repeats. train_util.py:2170
INFO 0 reg images with repeats. train_util.py:2174
WARNING no regularization images / train_util.py:2179
正則化画像が見つかりませんでし

INFO [Dataset 0] config_util.py:580
batch_size: 2
resolution: (1024, 1024)
resize_interpolation: None
enable_bucket: True
min_bucket_reso: 512
max_bucket_reso: 2048
bucket_reso_steps: 64
bucket_no_upscale: True

                           [Subset 0 of Dataset 0]                         
                             image_dir:                                    
                         "D:\Datasets\experlora\img\Main"                                           
                             image_count: 46                               
                             num_repeats: 8                                
                             shuffle_caption: True                         
                             keep_tokens: 1                                
                             caption_dropout_rate: 0.05                    
                             caption_dropout_every_n_epo                   
                         chs: 0                                            
                             caption_tag_dropout_rate: 0                   
                             caption_prefix: Character                     
                             caption_suffix: None                          
                             color_aug: False                              
                             flip_aug: False                               
                             face_crop_aug_range: None                     
                             random_crop: False                            
                             token_warmup_min: 1,                          
                             token_warmup_step: 0,                         
                             alpha_mask: True                              
                             resize_interpolation: None                    
                             custom_attributes: {}                         
                             is_reg: False                                 
                             class_tokens: None                            
                             caption_extension: .txt                       
                                                                           
                                                                           
                INFO     [Prepare dataset 0]             config_util.py:592
                INFO     loading image sizes.             train_util.py:999
                INFO     Using 9 workers for image size  train_util.py:1002
                         loading                                           

loading image sizes: 0%| | 0/46 [00:00<?, ?it/s]
loading image sizes: 100%|██████████| 46/46 [00:00<00:00, 77454.03it/s]
INFO make buckets train_util.py:1017
WARNING min_bucket_reso and train_util.py:1034
max_bucket_reso are ignored if
bucket_no_upscale is set,
because bucket reso is defined
by image size automatically /
bucket_no_upscaleが指定された場
合は、bucketの解像度は画像サイ
ズから自動計算されるため、min_b
ucket_resoとmax_bucket_resoは無
視されます
INFO number of images (including train_util.py:1063
repeats) /
各bucketの画像枚数(繰り返し回
数を含む)
INFO bucket 0: resolution (576, train_util.py:1068
1216), count: 8
INFO bucket 1: resolution (768, train_util.py:1068
1280), count: 8
INFO bucket 2: resolution (896, train_util.py:1068
1024), count: 8
INFO bucket 3: resolution (1216, train_util.py:1068
832), count: 8
INFO bucket 4: resolution (1344, train_util.py:1068
768), count: 336
INFO mean ar error (without train_util.py:1076
repeats): 0.028046718226068103
INFO Migrating subset caption anima_train_network.py:58
dropout rate (0.05) to
global level for Anima
strategy
WARNING flash_attn package not anima_train_network.py:93
installed, falling back
to PyTorch SDPA
INFO preparing accelerator train_network.py:747
INFO Loading Qwen3 text anima_train_network.py:105
encoder...
INFO Loading Qwen3 text encoder from anima_utils.py:207
D:\AAGenNeo\sd-webui-forge-neo\
models\text_encoder\qwen_3_06b_
base.safetensors
2026-05-27 16:43:26 INFO Loaded Qwen3 state dict:
INFO Loaded Qwen3 text encoder. anima_utils.py:252
Parameters: 596,049,920
INFO Loading Anima DiT... anima_train_network.py:122
INFO Loading Anima DiT from anima_utils.py:53
D:\AAArtGenNeo\models\Stable-dif
fusion\JANIMA_v10.safetensors
accelerator device: cuda
Traceback (most recent call last):
File "D:\Anima Standalone trainer\Anima-Standalone-Trainer\anima_train_network.py", line 561, in
trainer.train(args)
~~~~~~~~~~~~~^^^^^^
File "D:\Anima Standalone trainer\Anima-Standalone-Trainer\train_network.py", line 759, in train
model_version, text_encoder, vae, unet = self.load_target_model(args, weight_dtype, accelerator)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Anima Standalone trainer\Anima-Standalone-Trainer\anima_train_network.py", line 124, in load_target_model
dit = anima_utils.load_anima_dit(
args.dit_path,
...<4 lines>...
disable_mmap=getattr(args, 'disable_mmap_load_safetensors', False),
)
File "D:\Anima Standalone trainer\Anima-Standalone-Trainer\library\anima_utils.py", line 69, in load_anima_dit
dit_config = anima_models.get_dit_config(state_dict)
File "D:\Anima Standalone trainer\Anima-Standalone-Trainer\library\anima_models.py", line 1721, in get_dit_config
dit_config["in_channels"] = (state_dict['{}x_embedder.proj.1.weight'.format(key_prefix)].shape[1] // 4) - int(concat_padding_mask)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'x_embedder.proj.1.weight'
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "D:\Anima Standalone trainer\Anima-Standalone-Trainer\venv\Lib\site-packages\accelerate\commands\launch.py", line 1223, in
main()
~~~~^^
File "D:\Anima Standalone trainer\Anima-Standalone-Trainer\venv\Lib\site-packages\accelerate\commands\launch.py", line 1219, in main
launch_command(args)
~~~~~~~~~~~~~~^^^^^^
File "D:\Anima Standalone trainer\Anima-Standalone-Trainer\venv\Lib\site-packages\accelerate\commands\launch.py", line 1213, in launch_command
simple_launcher(args)
~~~~~~~~~~~~~~~^^^^^^
File "D:\Anima Standalone trainer\Anima-Standalone-Trainer\venv\Lib\site-packages\accelerate\commands\launch.py", line 795, in simple_launcher
raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd)
subprocess.CalledProcessError: Command '['D:\Anima Standalone trainer\Anima-Standalone-Trainer\venv\Scripts\python.exe', 'D:\Anima Standalone trainer\Anima-Standalone-Trainer\anima_train_network.py', '--config_file=D:\Anima Standalone trainer\Anima-Standalone-Trainer\training-ui\jobs\experlora\_merged_config.toml']' returned non-zero exit status 1.

--- Training stopped (exit code: 1) ---

File "D:\Anima Standalone trainer\Anima-Standalone-Trainer\library\anima_utils.py", line 69, in load_anima_dit
dit_config = anima_models.get_dit_config(state_dict)
File "D:\Anima Standalone trainer\Anima-Standalone-Trainer\library\anima_models.py", line 1721, in get_dit_config
dit_config["in_channels"] = (state_dict['{}x_embedder.proj.1.weight'.format(key_prefix)].shape[1] // 4) - int(concat_padding_mask)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'x_embedder.proj.1.weight'
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "D:\Anima Standalone trainer\Anima-Standalone-Trainer\venv\Lib\site-packages\accelerate\commands\launch.py", line 1223, in
main()
~~~~^^
File "D:\Anima Standalone trainer\Anima-Standalone-Trainer\venv\Lib\site-packages\accelerate\commands\launch.py", line 1219, in main
launch_command(args)
~~~~~~~~~~~~~~^^^^^^
File "D:\Anima Standalone trainer\Anima-Standalone-Trainer\venv\Lib\site-packages\accelerate\commands\launch.py", line 1213, in launch_command
simple_launcher(args)
~~~~~~~~~~~~~~~^^^^^^
File "D:\Anima Standalone trainer\Anima-Standalone-Trainer\venv\Lib\site-packages\accelerate\commands\launch.py", line 795, in simple_launcher
raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd)
subprocess.CalledProcessError: Command '['D:\Anima Standalone trainer\Anima-Standalone-Trainer\venv\Scripts\python.exe', 'D:\Anima Standalone trainer\Anima-Standalone-Trainer\anima_train_network.py', '--config_file=D:\Anima Standalone trainer\Anima-Standalone-Trainer\training-ui\jobs\experlora\_merged_config.toml']' returned non-zero exit status 1.

--- Training stopped (exit code: 1) ---

Yeah that's a key prefix error. I downloaded the model you're trying to use and all of the prefixes use model.diffusion_model, including the one in the error which is "model.diffusion_model.x_embedder.proj.1.weight". The trainer is likely expecting just "net.x_embedder.proj.1.weight" as the prefix for all the keys (it looks like I had it the other way around with how Comfy saves, my bad). You can definitely just ask any AI to write a short python script to rename the key prefixes in the checkpoint to "net" instead which will fix this.

File "D:\Anima Standalone trainer\Anima-Standalone-Trainer\library\anima_utils.py", line 69, in load_anima_dit
dit_config = anima_models.get_dit_config(state_dict)
File "D:\Anima Standalone trainer\Anima-Standalone-Trainer\library\anima_models.py", line 1721, in get_dit_config
dit_config["in_channels"] = (state_dict['{}x_embedder.proj.1.weight'.format(key_prefix)].shape[1] // 4) - int(concat_padding_mask)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'x_embedder.proj.1.weight'
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "D:\Anima Standalone trainer\Anima-Standalone-Trainer\venv\Lib\site-packages\accelerate\commands\launch.py", line 1223, in
main()
~~~~^^
File "D:\Anima Standalone trainer\Anima-Standalone-Trainer\venv\Lib\site-packages\accelerate\commands\launch.py", line 1219, in main
launch_command(args)
~~~~~~~~~~~~~~^^^^^^
File "D:\Anima Standalone trainer\Anima-Standalone-Trainer\venv\Lib\site-packages\accelerate\commands\launch.py", line 1213, in launch_command
simple_launcher(args)
~~~~~~~~~~~~~~~^^^^^^
File "D:\Anima Standalone trainer\Anima-Standalone-Trainer\venv\Lib\site-packages\accelerate\commands\launch.py", line 795, in simple_launcher
raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd)
subprocess.CalledProcessError: Command '['D:\Anima Standalone trainer\Anima-Standalone-Trainer\venv\Scripts\python.exe', 'D:\Anima Standalone trainer\Anima-Standalone-Trainer\anima_train_network.py', '--config_file=D:\Anima Standalone trainer\Anima-Standalone-Trainer\training-ui\jobs\experlora\_merged_config.toml']' returned non-zero exit status 1.

--- Training stopped (exit code: 1) ---

Yeah that's a key prefix error. I downloaded the model you're trying to use and all of the prefixes use model.diffusion_model, including the one in the error which is "model.diffusion_model.x_embedder.proj.1.weight". The trainer is likely expecting just "net.x_embedder.proj.1.weight" as the prefix for all the keys (it looks like I had it the other way around with how Comfy saves, my bad). You can definitely just ask any AI to write a short python script to rename the key prefixes in the checkpoint to "net" instead which will fix this.

Thanks for the tip, I'll pass the checkpoints on to my training friends. 😁

Sign up or log in to comment