dbaranchuk
commited on
Commit
•
73b72bb
1
Parent(s):
7ccb3f3
Update space
Browse files
app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
import numpy as np
|
3 |
import random
|
4 |
-
from diffusers import DiffusionPipeline
|
5 |
import torch
|
6 |
|
7 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
@@ -15,6 +15,9 @@ else:
|
|
15 |
pipe = DiffusionPipeline.from_pretrained("stabilityai/sdxl-turbo", use_safetensors=True)
|
16 |
pipe = pipe.to(device)
|
17 |
|
|
|
|
|
|
|
18 |
MAX_SEED = np.iinfo(np.int32).max
|
19 |
MAX_IMAGE_SIZE = 1024
|
20 |
|
|
|
1 |
import gradio as gr
|
2 |
import numpy as np
|
3 |
import random
|
4 |
+
from diffusers import DiffusionPipeline, UNet2DConditionModel
|
5 |
import torch
|
6 |
|
7 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
|
15 |
pipe = DiffusionPipeline.from_pretrained("stabilityai/sdxl-turbo", use_safetensors=True)
|
16 |
pipe = pipe.to(device)
|
17 |
|
18 |
+
unet = UNet2DConditionModel.from_pretrained("dbaranchuk/sdxl-cfg-distill-unet")
|
19 |
+
pipe.unet = unet
|
20 |
+
|
21 |
MAX_SEED = np.iinfo(np.int32).max
|
22 |
MAX_IMAGE_SIZE = 1024
|
23 |
|