Spaces:
Sleeping
Sleeping
PseudoTerminal X
commited on
Commit
•
25a7fde
1
Parent(s):
6d172f3
Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
import torch
|
2 |
-
from diffusers import
|
3 |
import gradio as gr
|
4 |
import spaces
|
5 |
|
6 |
# Load the pre-trained diffusion model
|
7 |
-
pipe =
|
8 |
pipe.to('cuda')
|
9 |
import re
|
10 |
|
@@ -25,7 +25,7 @@ def generate(prompt, guidance_scale, guidance_rescale, num_inference_steps, reso
|
|
25 |
prompt,
|
26 |
negative_prompt=negative_prompt,
|
27 |
guidance_scale=guidance_scale,
|
28 |
-
guidance_rescale=guidance_rescale,
|
29 |
num_inference_steps=num_inference_steps,
|
30 |
width=width, height=height
|
31 |
).images
|
@@ -50,6 +50,6 @@ iface = gr.Interface(
|
|
50 |
],
|
51 |
outputs=gr.Gallery(height=1024, min_width=1024, columns=2),
|
52 |
examples=example_prompts,
|
53 |
-
title="
|
54 |
-
description="
|
55 |
).launch()
|
|
|
1 |
import torch
|
2 |
+
from diffusers import StableDiffusion3Pipeline
|
3 |
import gradio as gr
|
4 |
import spaces
|
5 |
|
6 |
# Load the pre-trained diffusion model
|
7 |
+
pipe = StableDiffusion3Pipeline.from_pretrained('ptx0/sd3-diffusion-vpred-zsnr', torch_dtype=torch.bfloat16)
|
8 |
pipe.to('cuda')
|
9 |
import re
|
10 |
|
|
|
25 |
prompt,
|
26 |
negative_prompt=negative_prompt,
|
27 |
guidance_scale=guidance_scale,
|
28 |
+
#guidance_rescale=guidance_rescale,
|
29 |
num_inference_steps=num_inference_steps,
|
30 |
width=width, height=height
|
31 |
).images
|
|
|
50 |
],
|
51 |
outputs=gr.Gallery(height=1024, min_width=1024, columns=2),
|
52 |
examples=example_prompts,
|
53 |
+
title="SD3 Diffusion Demonstration",
|
54 |
+
description="Stable Diffusion 3 Diffusion is a v-prediction model trained to eliminate the rectified flow schedule from Stable Diffusion 3 as an experiment into this model architecture and its parameterisations."
|
55 |
).launch()
|