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

PaddleMIX单机单卡训练stable diffusion无法读取环境变量 #809

Closed
fxy1699 opened this issue Nov 11, 2024 · 2 comments
Closed

PaddleMIX单机单卡训练stable diffusion无法读取环境变量 #809

fxy1699 opened this issue Nov 11, 2024 · 2 comments
Assignees

Comments

@fxy1699
Copy link

fxy1699 commented Nov 11, 2024

@luyao-cv #806 #273
基础环境:AI Studio V100 32GB 单卡 cuda11.8
conda 环境:
python: 3.10.15
paddlepaddle-gpu:2.6.1(官网pip安装)
paddlenlp:2.7.2
ppdiffusers:0.24.1
image

问题:按照stable diffusion readme.md中在路径 ~/PaddleMIX/ppdiffusers/examples/stable_diffusion 新建单机单卡训练的脚本。
image
运行后会出现如下问题:(经测试ppdiffusers 0.24.0~0.29.0均会出现该问题,更低的环境未支持stable diffusion会有其他错)
017b161ca3f43f75078920f3ccc1e72
经过反复验证,最终确认是无法读取train.sh中的环境变量(我根据源代码尝试将脚本中的0和1替代为true、false依然报错)

Readme中提供的单机单卡脚本如下:
image

注释掉该部分环境变量后脚本可以正常运行:
image
image

注:多卡环境下能否读取环境变量没有条件进行测试,只测试了单机单卡环境。

@westfish
Copy link
Contributor

elif v.lower() in ("no", "false", "f", "n", "0"):

在linux跑是没有你这里的报错的,正常来说"no", "false", "f", "n", "0"应该会被解析的,是不是没有处理好空格或着字符格式的问题呢

@westfish westfish self-assigned this Nov 11, 2024
@fxy1699
Copy link
Author

fxy1699 commented Nov 11, 2024

破案了,aistudio的问题,aistudio里的主机环境没法在shell脚本里用export添加环境变量,但是在~/.bashrc可以添加这些环境变量
image
image

@fxy1699 fxy1699 closed this as completed Nov 11, 2024
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

3 participants