Spaces:
Configuration error
Configuration error
debug
Browse files
app.py
CHANGED
|
@@ -7,6 +7,7 @@ import gradio as gr
|
|
| 7 |
from PIL import Image
|
| 8 |
|
| 9 |
from diffusers import DDPMScheduler
|
|
|
|
| 10 |
from schedulers.lcm_single_step_scheduler import LCMSingleStepScheduler
|
| 11 |
|
| 12 |
from module.ip_adapter.utils import load_adapter_to_pipe
|
|
@@ -140,7 +141,8 @@ def instantir_restore(
|
|
| 140 |
elif preview_start > 1.0:
|
| 141 |
preview_start = preview_start / steps
|
| 142 |
print(lq)
|
| 143 |
-
lq =
|
|
|
|
| 144 |
lq = [resize_img(lq.convert("RGB"), size=(width, height))]
|
| 145 |
generator = torch.Generator(device=device).manual_seed(seed)
|
| 146 |
timesteps = [
|
|
@@ -169,12 +171,6 @@ def instantir_restore(
|
|
| 169 |
preview_img.append(f"preview_{i}")
|
| 170 |
return out[0][0], out[1]
|
| 171 |
|
| 172 |
-
examples = [
|
| 173 |
-
"Astronaut in a jungle, cold color palette, muted colors, detailed, 8k",
|
| 174 |
-
"An astronaut riding a green horse",
|
| 175 |
-
"A delicious ceviche cheesecake slice",
|
| 176 |
-
]
|
| 177 |
-
|
| 178 |
css="""
|
| 179 |
#col-container {
|
| 180 |
margin: 0 auto;
|
|
|
|
| 7 |
from PIL import Image
|
| 8 |
|
| 9 |
from diffusers import DDPMScheduler
|
| 10 |
+
from diffusers.utils import load_image
|
| 11 |
from schedulers.lcm_single_step_scheduler import LCMSingleStepScheduler
|
| 12 |
|
| 13 |
from module.ip_adapter.utils import load_adapter_to_pipe
|
|
|
|
| 141 |
elif preview_start > 1.0:
|
| 142 |
preview_start = preview_start / steps
|
| 143 |
print(lq)
|
| 144 |
+
lq = load_image(lq)
|
| 145 |
+
print(type(lq))
|
| 146 |
lq = [resize_img(lq.convert("RGB"), size=(width, height))]
|
| 147 |
generator = torch.Generator(device=device).manual_seed(seed)
|
| 148 |
timesteps = [
|
|
|
|
| 171 |
preview_img.append(f"preview_{i}")
|
| 172 |
return out[0][0], out[1]
|
| 173 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 174 |
css="""
|
| 175 |
#col-container {
|
| 176 |
margin: 0 auto;
|