Spaces:
Runtime error
Runtime error
init
Browse files63 unmodified lines6465666768697071727335 unmodified lines10911011111211311411511611756 unmodified lines17417517617717817918018118263 unmodified linesTuple[AutoImageProcessor, UperNetForSemanticSegmentation]: segmentation pipeline"""image_processor = AutoImageProcessor.from_pretrained("models/openmmlab--upernet-convnext-small")image_segmentor = UperNetForSemanticSegmentation.from_pretrained("models/openmmlab--upernet-convnext-small")return image_processor, image_segmentor35 unmodified linesdef get_depth_pipeline():feature_extractor = AutoImageProcessor.from_pretrained("models/models--LiheYoung--depth-anything-large-hf",torch_dtype=dtype)depth_estimator = AutoModelForDepthEstimation.from_pretrained("models/models--LiheYoung--depth-anything-large-hf",torch_dtype=dtype)return feature_extractor, depth_estimator56 unmodified lines#os.environ['HF_HUB_OFFLINE'] = "True"controlnet_depth= ControlNetModel.from_pretrained("models/controlnet_depth", torch_dtype=dtype, use_safetensors=True)controlnet_seg = ControlNetModel.from_pretrained("models/own_controlnet", torch_dtype=dtype, use_safetensors=True)self.pipe = StableDiffusionControlNetInpaintPipeline.from_pretrained("SG161222/Realistic_Vision_V5.1_noVAE",63 unmodified lines6465666768697071727335 unmodified lines10911011111211311411511611756 unmodified lines17417517617717817918018118263 unmodified linesTuple[AutoImageProcessor, UperNetForSemanticSegmentation]: segmentation pipeline"""image_processor = AutoImageProcessor.from_pretrained("openmmlab/upernet-convnext-small")image_segmentor = UperNetForSemanticSegmentation.from_pretrained("openmmlab/upernet-convnext-small")return image_processor, image_segmentor35 unmodified linesdef get_depth_pipeline():feature_extractor = AutoImageProcessor.from_pretrained("LiheYoung/depth-anything-large-hf",torch_dtype=dtype)depth_estimator = AutoModelForDepthEstimation.from_pretrained("LiheYoung/depth-anything-large-hf",torch_dtype=dtype)return feature_extractor, depth_estimator56 unmodified lines#os.environ['HF_HUB_OFFLINE'] = "True"controlnet_depth= ControlNetModel.from_pretrained("controlnet_depth", torch_dtype=dtype, use_safetensors=True)controlnet_seg = ControlNetModel.from_pretrained("own_controlnet", torch_dtype=dtype, use_safetensors=True)self.pipe = StableDiffusionControlNetInpaintPipeline.from_pretrained("SG161222/Realistic_Vision_V5.1_noVAE",
app.py+6-6