patrickvonplaten commited on
Commit
48b3d1a
1 Parent(s): b966782

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -1
README.md CHANGED
@@ -85,11 +85,12 @@ import numpy as np
85
  from controlnet_utils import ade_palette
86
  import torch
87
  from diffusers import StableDiffusionControlNetPipeline, ControlNetModel, UniPCMultistepScheduler
 
88
 
89
  image_processor = AutoImageProcessor.from_pretrained("openmmlab/upernet-convnext-small")
90
  image_segmentor = UperNetForSemanticSegmentation.from_pretrained("openmmlab/upernet-convnext-small")
91
 
92
- image = Image.open("./images/house.png").convert('RGB')
93
 
94
  pixel_values = image_processor(image, return_tensors="pt").pixel_values
95
 
 
85
  from controlnet_utils import ade_palette
86
  import torch
87
  from diffusers import StableDiffusionControlNetPipeline, ControlNetModel, UniPCMultistepScheduler
88
+ from diffusers.utils import load_image
89
 
90
  image_processor = AutoImageProcessor.from_pretrained("openmmlab/upernet-convnext-small")
91
  image_segmentor = UperNetForSemanticSegmentation.from_pretrained("openmmlab/upernet-convnext-small")
92
 
93
+ image = load_image("https://huggingface.co/lllyasviel/sd-controlnet-seg/resolve/main/images/house.png").convert('RGB')
94
 
95
  pixel_values = image_processor(image, return_tensors="pt").pixel_values
96