Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ import time
|
|
7 |
import numpy as np
|
8 |
import cv2
|
9 |
from PIL import Image
|
10 |
-
|
11 |
|
12 |
def HWC3(x):
|
13 |
assert x.dtype == np.uint8
|
@@ -59,6 +59,11 @@ pipe_controlnet = StableDiffusionXLControlNetPipeline.from_pretrained(
|
|
59 |
)
|
60 |
clip_slider_controlnet = CLIPSliderXL(sd_pipe=pipe_controlnet,device=torch.device("cuda"))
|
61 |
|
|
|
|
|
|
|
|
|
|
|
62 |
|
63 |
@spaces.GPU(duration=120)
|
64 |
def generate(slider_x, slider_y, prompt, seed, iterations, steps, guidance_scale,
|
|
|
7 |
import numpy as np
|
8 |
import cv2
|
9 |
from PIL import Image
|
10 |
+
from ledits.pipeline_leditspp_stable_diffusion_xl import LEditsPPPipelineStableDiffusionXL
|
11 |
|
12 |
def HWC3(x):
|
13 |
assert x.dtype == np.uint8
|
|
|
59 |
)
|
60 |
clip_slider_controlnet = CLIPSliderXL(sd_pipe=pipe_controlnet,device=torch.device("cuda"))
|
61 |
|
62 |
+
pipe_inv = LEditsPPPipelineStableDiffusionXL.from_pretrained(
|
63 |
+
"stabilityai/stable-diffusion-xl-base-1.0", vae=vae,
|
64 |
+
torch_dtype=torch.float16
|
65 |
+
)
|
66 |
+
clip_slider_inv = CLIPSliderXL(sd_pipe=pipe_inv,device=torch.device("cuda"))
|
67 |
|
68 |
@spaces.GPU(duration=120)
|
69 |
def generate(slider_x, slider_y, prompt, seed, iterations, steps, guidance_scale,
|