Spaces:
Runtime error
Runtime error
envs
Browse files85 unmodified lines8687888990919298 unmodified lines19119219319319419519419519619719719819920020185 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 = device tokenizer = 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") tokenizer = 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("runwayml/stable-diffusion-v1-5", subfolder="unet", unet_additional_kwargs=OmegaConf.to_container(inference_config.unet_additional_kwargs)) 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