Spaces:
Runtime error
Runtime error
envs
Browse files85 unmodified lines86878889909198 unmodified lines19019119219319419519619719819920085 unmodified linesos.system(f'wget https://huggingface.co/TencentARC/ImageConductor/blob/main/unet.ckpt -P models/')os.system(f'wget https://huggingface.co/TencentARC/ImageConductor/blob/main/helloobjects_V12c.safetensors -P models/personalized')os.system(f'wget https://huggingface.co/TencentARC/ImageConductor/blob/main/TUSUN.safetensors -P models/personalized')98 unmodified linesclass ImageConductor:def __init__(self, device, unet_path, image_controlnet_path, flow_controlnet_path, height, width, model_length, lora_rank=64):self.device = devicetokenizer = CLIPTokenizer.from_pretrained("runwayml/stable-diffusion-v1-5", subfolder="tokenizer")text_encoder = CLIPTextModel.from_pretrained("runwayml/stable-diffusion-v1-5", subfolder="text_encoder")vae = AutoencoderKL.from_pretrained("runwayml/stable-diffusion-v1-5", subfolder="vae")inference_config = OmegaConf.load("configs/inference/inference.yaml")unet = UNet3DConditionFlowModel.from_pretrained_2d("runwayml/stable-diffusion-v1-5", subfolder="unet", unet_additional_kwargs=OmegaConf.to_container(inference_config.unet_additional_kwargs))self.vae = vae85 unmodified lines8687888990919298 unmodified lines19119219319419519619719819920020185 unmodified linesos.system(f'wget https://huggingface.co/TencentARC/ImageConductor/blob/main/unet.ckpt -P models/')os.system(f'wget https://huggingface.co/TencentARC/ImageConductor/blob/main/helloobjects_V12c.safetensors -P models/personalized')os.system(f'wget https://huggingface.co/TencentARC/ImageConductor/blob/main/TUSUN.safetensors -P models/personalized')os.system(f'git clone https://huggingface.co/runwayml/stable-diffusion-v1-5')98 unmodified linesclass ImageConductor:def __init__(self, device, unet_path, image_controlnet_path, flow_controlnet_path, height, width, model_length, lora_rank=64):self.device = devicetokenizer = CLIPTokenizer.from_pretrained("stable-diffusion-v1-5", subfolder="tokenizer")text_encoder = CLIPTextModel.from_pretrained("stable-diffusion-v1-5", subfolder="text_encoder").cuda()vae = AutoencoderKL.from_pretrained("stable-diffusion-v1-5", subfolder="vae").cuda()inference_config = OmegaConf.load("configs/inference/inference.yaml")unet = UNet3DConditionFlowModel.from_pretrained_2d("stable-diffusion-v1-5", subfolder="unet", unet_additional_kwargs=OmegaConf.to_container(inference_config.unet_additional_kwargs))self.vae = vae
app.py+5-4