Spaces:
Paused
Paused
test gradio
Browse files
app.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
import gradio as gr
|
2 |
import torch
|
3 |
-
from diffusers import
|
4 |
from huggingface_hub import login
|
5 |
import os
|
6 |
import spaces
|
@@ -14,7 +14,7 @@ controlnet_id = "lllyasviel/control_v11p_sd15_inpaint"
|
|
14 |
|
15 |
# Load the ControlNet model and Stable Diffusion pipeline
|
16 |
controlnet = ControlNetModel.from_pretrained(controlnet_id, torch_dtype=torch.float16)
|
17 |
-
pipe =
|
18 |
model_id, controlnet=controlnet, torch_dtype=torch.float16
|
19 |
)
|
20 |
pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)
|
|
|
1 |
import gradio as gr
|
2 |
import torch
|
3 |
+
from diffusers import StableDiffusion3ControlNetPipeline, ControlNetModel, UniPCMultistepScheduler
|
4 |
from huggingface_hub import login
|
5 |
import os
|
6 |
import spaces
|
|
|
14 |
|
15 |
# Load the ControlNet model and Stable Diffusion pipeline
|
16 |
controlnet = ControlNetModel.from_pretrained(controlnet_id, torch_dtype=torch.float16)
|
17 |
+
pipe = StableDiffusion3ControlNetPipeline.from_pretrained(
|
18 |
model_id, controlnet=controlnet, torch_dtype=torch.float16
|
19 |
)
|
20 |
pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)
|