Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -70,7 +70,7 @@ import numpy as np
|
|
70 |
|
71 |
# 初始化 ControlNet 模型和 Stable Diffusion Pipeline
|
72 |
controlnet = ControlNetModel.from_pretrained("lllyasviel/sd-controlnet-canny", torch_dtype=torch.float16)
|
73 |
-
pipeline = StableDiffusionControlNetPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", controlnet=controlnet)
|
74 |
|
75 |
# 定义图像生成函数
|
76 |
def generate_image(prompt: str, input_image: Image.Image):
|
|
|
70 |
|
71 |
# 初始化 ControlNet 模型和 Stable Diffusion Pipeline
|
72 |
controlnet = ControlNetModel.from_pretrained("lllyasviel/sd-controlnet-canny", torch_dtype=torch.float16)
|
73 |
+
pipeline = StableDiffusionControlNetPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", controlnet=controlnet)
|
74 |
|
75 |
# 定义图像生成函数
|
76 |
def generate_image(prompt: str, input_image: Image.Image):
|