Rahul8827 commited on
Commit
c13f57e
1 Parent(s): ca466ce

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -0
app.py CHANGED
@@ -46,6 +46,21 @@ guidance_scale = 3.0
46
  # A value of 1.0 is sharper, but sometimes results in grainy artifacts.
47
  upsample_temp = 0.997
48
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  import gradio as gr
50
  def generate_upsampled_image_from_text(prompt):
51
  # Set the prompt text
 
46
  # A value of 1.0 is sharper, but sometimes results in grainy artifacts.
47
  upsample_temp = 0.997
48
 
49
+ samples = diffusion.p_sample_loop(
50
+ model_fn,
51
+ (full_batch_size, 3, options["image_size"], options["image_size"]),
52
+ device=device,
53
+ clip_denoised=True,
54
+ progress=True,
55
+ model_kwargs=model_kwargs,
56
+ cond_fn=None,
57
+ )[:batch_size]
58
+ model.del_cache()
59
+
60
+ # Show the output
61
+ show_images(samples)
62
+
63
+
64
  import gradio as gr
65
  def generate_upsampled_image_from_text(prompt):
66
  # Set the prompt text