Spaces:
Runtime error
Runtime error
fix app.py
Browse files
app.py
CHANGED
@@ -6,13 +6,11 @@ from diffusers import StableDiffusionPipeline
|
|
6 |
|
7 |
|
8 |
repo = "Tramac/style-portrait-v1-5"
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
variant="fp16"
|
15 |
-
).to("cuda")
|
16 |
|
17 |
@spaces.GPU(enable_queue=True)
|
18 |
def generate_image(prompt, neg_prompt):
|
@@ -50,4 +48,4 @@ with gr.Blocks() as demo:
|
|
50 |
outputs=img,
|
51 |
)
|
52 |
|
53 |
-
demo.queue().launch(
|
|
|
6 |
|
7 |
|
8 |
repo = "Tramac/style-portrait-v1-5"
|
9 |
+
pipeline = StableDiffusionPipeline.from_pretrained(
|
10 |
+
repo,
|
11 |
+
torch_dtype=torch.float16,
|
12 |
+
variant="fp16"
|
13 |
+
).to("cuda")
|
|
|
|
|
14 |
|
15 |
@spaces.GPU(enable_queue=True)
|
16 |
def generate_image(prompt, neg_prompt):
|
|
|
48 |
outputs=img,
|
49 |
)
|
50 |
|
51 |
+
demo.queue().launch()
|