Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,6 +8,7 @@ from PIL import Image
|
|
| 8 |
from RealESRGAN import RealESRGAN
|
| 9 |
import cv2
|
| 10 |
import numpy as np
|
|
|
|
| 11 |
|
| 12 |
# Constants
|
| 13 |
SD15_WEIGHTS = "weights"
|
|
@@ -144,7 +145,7 @@ pipe.scheduler = DDIMScheduler.from_config(pipe.scheduler.config)
|
|
| 144 |
|
| 145 |
# Move the pipeline to the device and enable memory efficient attention
|
| 146 |
pipe = pipe.to(device)
|
| 147 |
-
pipe.
|
| 148 |
|
| 149 |
# Enable FreeU
|
| 150 |
pipe.enable_freeu(s1=0.9, s2=0.2, b1=1.3, b2=1.4)
|
|
|
|
| 8 |
from RealESRGAN import RealESRGAN
|
| 9 |
import cv2
|
| 10 |
import numpy as np
|
| 11 |
+
from diffusers.models.attention_processor import AttnProcessor2_0
|
| 12 |
|
| 13 |
# Constants
|
| 14 |
SD15_WEIGHTS = "weights"
|
|
|
|
| 145 |
|
| 146 |
# Move the pipeline to the device and enable memory efficient attention
|
| 147 |
pipe = pipe.to(device)
|
| 148 |
+
pipe.unet.set_attn_processor(AttnProcessor2_0())
|
| 149 |
|
| 150 |
# Enable FreeU
|
| 151 |
pipe.enable_freeu(s1=0.9, s2=0.2, b1=1.3, b2=1.4)
|