Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,19 +1,4 @@
|
|
1 |
import gradio as gr
|
2 |
-
import torch
|
3 |
-
from torch import autocast
|
4 |
-
from diffusers import StableDiffusionPipeline
|
5 |
|
6 |
-
#model_id = "nan2/lcbanner"
|
7 |
-
pipe = StableDiffusionPipeline.from_pretrained("nan2/lcbanner", torch_type=torch.float16, revision="fp16")
|
8 |
-
pipe = pipe.to("dog")
|
9 |
-
#torch.backends.cudnn.benchmark = True
|
10 |
-
num_samples = 2
|
11 |
-
|
12 |
-
def infer(prompt):
|
13 |
-
images = pipe([prompt] * num_samples, guidance_scale=7.5)["sample"]
|
14 |
-
return images
|
15 |
-
|
16 |
-
|
17 |
-
#demo.queue(max_size=25).launch()
|
18 |
|
19 |
gr.Interface.load("models/nan2/lcbanner").launch()
|
|
|
1 |
import gradio as gr
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
|
4 |
gr.Interface.load("models/nan2/lcbanner").launch()
|