PseudoTerminal X commited on
Commit
25a7fde
1 Parent(s): 6d172f3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -1,10 +1,10 @@
1
  import torch
2
- from diffusers import DiffusionPipeline
3
  import gradio as gr
4
  import spaces
5
 
6
  # Load the pre-trained diffusion model
7
- pipe = DiffusionPipeline.from_pretrained('ptx0/pseudo-flex-v2', torch_dtype=torch.bfloat16)
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="Flex v2 (SD 2.1-v) Demonstration",
54
- description="Flex v2 is a multi-aspect finetune of SD 2.1-v (768px) that is up-sized to a base resolution of 1 megapixel (1024px). This model utilises a zero-terminal SNR noise schedule, formulated to allow for very dark and very bright images."
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()