Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
from PIL import Image
|
2 |
import gradio as gr
|
3 |
import numpy as np
|
4 |
-
import random, os, gc, base64
|
5 |
import cv2
|
6 |
import torch
|
7 |
from accelerate import Accelerator
|
@@ -15,7 +15,7 @@ pipe_prior = accelerator.prepare(KandinskyV22PriorPipeline.from_pretrained("kand
|
|
15 |
pipe_prior = accelerator.prepare(pipe_prior.to("cpu"))
|
16 |
pipe = accelerator.prepare(KandinskyV22ControlnetPipeline.from_pretrained("kandinsky-community/kandinsky-2-2-controlnet-depth", torch_dtype=torch.float32))
|
17 |
pipe = accelerator.prepare(pipe.to("cpu"))
|
18 |
-
generator = torch.Generator("cpu").manual_seed(random.randint(1,
|
19 |
|
20 |
def make_hint(note):
|
21 |
client = Client("https://adpro-dpt-depth06.hf.space/")
|
|
|
1 |
from PIL import Image
|
2 |
import gradio as gr
|
3 |
import numpy as np
|
4 |
+
import random, os, gc, base64, io
|
5 |
import cv2
|
6 |
import torch
|
7 |
from accelerate import Accelerator
|
|
|
15 |
pipe_prior = accelerator.prepare(pipe_prior.to("cpu"))
|
16 |
pipe = accelerator.prepare(KandinskyV22ControlnetPipeline.from_pretrained("kandinsky-community/kandinsky-2-2-controlnet-depth", torch_dtype=torch.float32))
|
17 |
pipe = accelerator.prepare(pipe.to("cpu"))
|
18 |
+
generator = torch.Generator("cpu").manual_seed(random.randint(1, 867346))
|
19 |
|
20 |
def make_hint(note):
|
21 |
client = Client("https://adpro-dpt-depth06.hf.space/")
|