将“import os current_path = os.path.abspath('.') %cd $current_path ############################################### SESSION_DIR = "test3" #起个合适的session名字 GPU = 0 #指定在哪张卡上跑,可选0,1,2,3 model_id = "runwayml/stable-diffusion-v1-5" #使用sd1.5 "stabilityai/stable-diffusion-2"模型太大,无法用3090训练 Contains_faces = "No" #Women:训练图像是女生 Men:训练图像是男生 Mix :训练图像男女都有 No:不含脸 ############################################### session_path = current_path+'/content/Fast-Dreambooth/Sessions/'+SESSION_DIR instance_path = current_path+'/content/Fast-Dreambooth/Sessions/'+SESSION_DIR+"/instance_images" if not os.path.exists(str(session_path)): os.mkdir(session_path) if not os.path.exists(str(instance_path)): os.mkdir(instance_path) print('Please upload your pictures to ',instance_path) out_path = session_path + '/out' class_dir_path = '' # if Contains_faces != "No": class_dir_path = current_path+'/content/Fast-Dreambooth/Sessions/Regularization_images/'+Contains_faces if not os.path.exists(str(out_path)): os.mkdir(out_path)”转为python
时间: 2023-02-12 09:04:41 浏览: 453
Python常用模块os.path之文件及路径操作方法
I'm sorry, I didn't understand what you were asking. Can you please provide more information or ask a specific question?
阅读全文