import argparse import binascii # 自定义类型转换函数 def str_to_bool(value): if value.lower() in ('yes', 'true', 't', 'y', '1'): return True elif value.lower() in ('no', 'false', 'f', 'n', '0'): return False else: raise argparse.ArgumentTypeError('Invalid boolean value: {}'.format(value)) # 创建参数解析器 parser = argparse.ArgumentParser() parser.add_argument('--Version', type=str) parser.add_argument('--ControlNet', type=str_to_bool) # 解析命令行参数 args = parser.parse_args() Version = args.Version ControlNet = args.ControlNet ################################################################################################################################################ import sys import os import base64 import importlib.util from IPython import get_ipython from IPython.display import clear_output import tensorflow as tf print("TensorFlow version:", tf.__version__) if tf.test.gpu_device_name(): print("GPU is available") else: print("GPU is NOT available") raise Exception("\n没有使用GPU,请在代码执行程序-更改运行时类型-设置为GPU!\n如果不能使用GPU,建议更换账号!") w = base64.b64decode(("d2VidWk=").encode('ascii')).decode('ascii') sdw = base64.b64decode(("c3RhYmxlLWRpZmZ1c2lvbi13ZWJ1aQ==").encode('ascii')).decode('ascii') l = base64.b64decode(("bGF1bmNo").encode('ascii')).decode('ascii') # sdw = binascii.a2b_uu("6