Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flux.1.dev.fp8 CKPT trainning the avr_loss keep 'nan' #76

Open
Lecho303 opened this issue Sep 29, 2024 · 8 comments
Open

Flux.1.dev.fp8 CKPT trainning the avr_loss keep 'nan' #76

Lecho303 opened this issue Sep 29, 2024 · 8 comments

Comments

@Lecho303
Copy link

i was trying to trainning a lora which use flux.1.dev.fp8 CKPT,and the log keep telling me that avr_loss is nan,i do not know where i setting wrong or someting?

the system & version:
[START] Security scan
[DONE] Security scan

ComfyUI-Manager: installing dependencies done.

** ComfyUI startup time: 2024-09-28 16:52:30.478163
** Platform: Windows
** Python version: 3.11.8 (tags/v3.11.8:db85d51, Feb 6 2024, 22:03:32) [MSC v.1937 64 bit (AMD64)]
** Python executable: D:\comfyUI\ComfyUI_windows_portable_nvidia.7z\python_embeded\python.exe
** ComfyUI Path: D:\comfyUI\ComfyUI_windows_portable_nvidia.7z\ComfyUI
** Log path: D:\comfyUI\ComfyUI_windows_portable_nvidia.7z\comfyui.log

Prestartup times for custom nodes:
0.0 seconds: D:\comfyUI\ComfyUI_windows_portable_nvidia.7z\ComfyUI\custom_nodes\rgthree-comfy
0.0 seconds: D:\comfyUI\ComfyUI_windows_portable_nvidia.7z\ComfyUI\custom_nodes\ComfyUI-Easy-Use
4.2 seconds: D:\comfyUI\ComfyUI_windows_portable_nvidia.7z\ComfyUI\custom_nodes\ComfyUI-Manager

Total VRAM 6144 MB, total RAM 32461 MB
pytorch version: 2.3.1+cu121
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 3060 Laptop GPU : cudaMallocAsync
Using pytorch cross attention

屏幕截图 2024-09-29 142304

@kijai
Copy link
Owner

kijai commented Sep 29, 2024

Not seen that happen myself, I'd recommend updating to torch 2.4.1 though, it's what kohya recommends to be used and it has solved lots of memory and speed issues for many who have updated.

@Lecho303
Copy link
Author

我自己没见过这种情况,但我建议更新到 torch 2.4.1,这是 kohya 建议使用的,它已经为许多更新过的人解决了许多内存和速度问题。

ok ,i will try to update,thank you so much

@Lecho303
Copy link
Author

Lecho303 commented Oct 1, 2024

Not seen that happen myself, I'd recommend updating to torch 2.4.1 though, it's what kohya recommends to be used and it has solved lots of memory and speed issues for many who have updated.

hi, i am upgrade the pytorch to 2.4.1,but the loss still keep "nan"……

@Lecho303
Copy link
Author

Lecho303 commented Oct 1, 2024

屏幕截图 2024-10-01 101021

@Lecho303
Copy link
Author

Lecho303 commented Oct 1, 2024

Uploading 屏幕截图 2024-10-01 101004.png…

@Orenji-Tangerine
Copy link

What is your optimizer used? Or maybe u attach your workflow here.

@RaySteve312
Copy link

RaySteve312 commented Oct 8, 2024

大概率是学习率问题

你是怎么做到这么慢的,如果是batch size太大按理说这个速度早就oom了

@RaySteve312
Copy link

RaySteve312 commented Oct 8, 2024

速度应该和笔记本而非台式机有关。nan和你的batch size,alpha,lr这几个有关

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants