cocktailpeanut / fluxgym

Dead simple FLUX LoRA training UI with LOW VRAM support
950 stars 73 forks source link

FileNotFoundError: [WinError 3] The system cannot find the path specified: 'E:\\pinokio\\api\\fluxgym.g it\\outputs\\ging-freecss\\sample' #151

Open Jofle14 opened 1 week ago

Jofle14 commented 1 week ago

Do i have to pre make the file?

Traceback (most recent call last): File "E:\pinokio\api\fluxgym.git\env\lib\site-packages\gradio\queueing.py", line 575, in process_even ts response = await route_utils.call_process_api( File "E:\pinokio\api\fluxgym.git\env\lib\site-packages\gradio\route_utils.py", line 322, in call_proc ess_api output = await app.get_blocks().process_api( File "E:\pinokio\api\fluxgym.git\env\lib\site-packages\gradio\blocks.py", line 1935, in process_api
result = await self.call_function( File "E:\pinokio\api\fluxgym.git\env\lib\site-packages\gradio\blocks.py", line 1532, in call_function prediction = await utils.async_iteration(iterator) File "E:\pinokio\api\fluxgym.git\env\lib\site-packages\gradio\utils.py", line 671, in async_iteration return await iterator.anext() File "E:\pinokio\api\fluxgym.git\env\lib\site-packages\gradio\utils.py", line 664, in anext
return await anyio.to_thread.run_sync( File "E:\pinokio\api\fluxgym.git\env\lib\site-packages\anyio\to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread( File "E:\pinokio\api\fluxgym.git\env\lib\site-packages\anyio_backends_asyncio.py", line 2405, in ru n_sync_in_worker_thread return await future File "E:\pinokio\api\fluxgym.git\env\lib\site-packages\anyio_backends_asyncio.py", line 914, in run result = context.run(func, *args) File "E:\pinokio\api\fluxgym.git\env\lib\site-packages\gradio\utils.py", line 647, in run_sync_iterat or_async return next(iterator) File "E:\pinokio\api\fluxgym.git\env\lib\site-packages\gradio\utils.py", line 809, in gen_wrapper
response = next(iterator) File "E:\pinokio\api\fluxgym.git\app.py", line 630, in start_training md = readme(base_model, lora_name, concept_sentence, sample_prompts) File "E:\pinokio\api\fluxgym.git\app.py", line 60, in readme for filename in os.listdir(samples_dir): FileNotFoundError: [WinError 3] The system cannot find the path specified: 'E:\pinokio\api\fluxgym.g it\outputs\ging-freecss\sample'

Friedrish933 commented 1 week ago

Hello, I do make the file manually but then got another error :

https://github.com/cocktailpeanut/fluxgym/issues/133

baobao1712 commented 1 week ago

create that folder manually might help

cocktailpeanut commented 1 week ago

This is the same issue as this one https://github.com/cocktailpeanut/fluxgym/issues/142

and basically this seemed to happen when you don't set the "sample image Every n steps" field (by default it's 0).

I pushed a fix so it doesn't throw the error even if you don't set it, just 1 hour ago. So please try reinstalling from scratch and let me know how it goes.

Jofle14 commented 1 week ago

I reinstalled fluxgym, not file error anymore but i got this, it did say Lora created successfully, i checked the output its only a dataset and not .sft

image image

[2024-09-30 22:09:12] [INFO] Traceback (most recent call last): [2024-09-30 22:09:12] [INFO] File "E:\pinokio\bin\miniconda\lib\runpy.py", line 196, in _run_module_as_main [2024-09-30 22:09:12] [INFO] return _run_code(code, main_globals, None, [2024-09-30 22:09:12] [INFO] File "E:\pinokio\bin\miniconda\lib\runpy.py", line 86, in _run_code [2024-09-30 22:09:12] [INFO] exec(code, run_globals) [2024-09-30 22:09:12] [INFO] File "E:\pinokio\api\fluxgym.git\env\Scripts\accelerate.exe__main__.py", line 7, in [2024-09-30 22:09:12] [INFO] File "E:\pinokio\api\fluxgym.git\env\lib\site-packages\accelerate\commands\accelerate_cli.py", line 48, in main [2024-09-30 22:09:12] [INFO] args.func(args) [2024-09-30 22:09:12] [INFO] File "E:\pinokio\api\fluxgym.git\env\lib\site-packages\accelerate\commands\launch.py", line 1106, in launch_command [2024-09-30 22:09:12] [INFO] simple_launcher(args) [2024-09-30 22:09:12] [INFO] File "E:\pinokio\api\fluxgym.git\env\lib\site-packages\accelerate\commands\launch.py", line 704, in simple_launcher [2024-09-30 22:09:12] [INFO] raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd) [2024-09-30 22:09:12] [INFO] subprocess.CalledProcessError: Command '['E:\pinokio\api\fluxgym.git\env\Scripts\python.exe', 'sd-scripts/flux_train_network.py', '--pretrained_model_name_or_path', 'E:\pinokio\api\fluxgym.git\models\unet\flux1-dev.sft', '--clip_l', 'E:\pinokio\api\fluxgym.git\models\clip\clip_l.safetensors', '--t5xxl', 'E:\pinokio\api\fluxgym.git\models\clip\t5xxl_fp16.safetensors', '--ae', 'E:\pinokio\api\fluxgym.git\models\vae\ae.sft', '--cache_latents_to_disk', '--save_model_as', 'safetensors', '--sdpa', '--persistent_data_loader_workers', '--max_data_loader_n_workers', '2', '--seed', '42', '--gradient_checkpointing', '--mixed_precision', 'bf16', '--save_precision', 'bf16', '--network_module', 'networks.lora_flux', '--network_dim', '4', '--optimizer_type', 'adafactor', '--optimizer_args', 'relative_step=False', 'scale_parameter=False', 'warmup_init=False', '--split_mode', '--network_args', 'train_blocks=single', '--lr_scheduler', 'constant_with_warmup', '--max_grad_norm', '0.0', '--sample_prompts=E:\pinokio\api\fluxgym.git\outputs\gingfreecss\sample_prompts.txt', '--sample_every_n_steps=100', '--learning_rate', '8e-4', '--cache_text_encoder_outputs', '--cache_text_encoder_outputs_to_disk', '--fp8_base', '--highvram', '--max_train_epochs', '16', '--save_every_n_epochs', '4', '--dataset_config', 'E:\pinokio\api\fluxgym.git\outputs\gingfreecss\dataset.toml', '--output_dir', 'E:\pinokio\api\fluxgym.git\outputs\gingfreecss', '--output_name', 'gingfreecss', '--timestep_sampling', 'shift', '--discrete_flow_shift', '3.1582', '--model_prediction_type', 'raw', '--guidance_scale', '1', '--loss_type', 'l2']' returned non-zero exit status 3221225477. [2024-09-30 22:09:14] [ERROR] Command exited with code 1 [2024-09-30 22:09:14] [INFO] Runner:

Jofle14 commented 1 week ago

I also set the N steps

cocktailpeanut commented 1 week ago

@Jofle14 this is a completely different problem. please search the github issues to see if there are similar issues as yours and post there, or create a new thread. If you read through the logs you posted, it did NOT succeed. That's why there's no output. The banner simply gets displayed at the end of everything regardless of whether it was successful or not (which is a different issue)

Also the fact that you set the N steps doesn't help since this fix was precisely to fix when you did NOT set the N steps. Of course it will not fail at that step if you set the N steps.

p.s.

I also occasionally get crashes and i have no reason why it happens but if i re-run it, seems to work. Probably an issue with the underlying kohya script project. Try re-running with a fresh new name first.