sayakpaul HF staff commited on
Commit
f00ed6c
1 Parent(s): 2495f4f

fix: images.

Browse files
Files changed (1) hide show
  1. app.py +2 -7
app.py CHANGED
@@ -1,5 +1,3 @@
1
- import random
2
-
3
  import gradio as gr
4
  import PIL
5
  import torch
@@ -9,11 +7,7 @@ cartoonization_id = "instruction-tuning-sd/cartoonizer"
9
  image_proc_id = "instruction-tuning-sd/low-level-img-proc"
10
 
11
  title = "Instruction-tuned Stable Diffusion"
12
- description = "This Space demonstrates the instruction-tuning on Stable Diffusion. To know more, "
13
- "please check out the [corresponding blog post](https://hf.co/blog/instruction-tuning-sd). "
14
- "Some experimentation tips on the hyperparameters are available from "
15
- "[the original InstructPix2Pix Space](https://huggingface.co/spaces/timbrooks/instruct-pix2pix). "
16
- "You can quickly try out the samples provided at the bottom of this demo."
17
 
18
 
19
  def load_pipeline(id: str):
@@ -43,6 +37,7 @@ def infer_cartoonization(
43
  image_guidance_scale=img_cfg,
44
  guidance_scale=text_cfg,
45
  generator=torch.manual_seed(int(seed)),
 
46
  ).images
47
  return images
48
 
 
 
1
  import gradio as gr
2
  import PIL
3
  import torch
7
  image_proc_id = "instruction-tuning-sd/low-level-img-proc"
8
 
9
  title = "Instruction-tuned Stable Diffusion"
10
+ description = "This Space demonstrates the instruction-tuning on Stable Diffusion. To know more, please check out the [corresponding blog post](https://hf.co/blog/instruction-tuning-sd). Some experimentation tips on the hyperparameters are available from [the original InstructPix2Pix Space](https://huggingface.co/spaces/timbrooks/instruct-pix2pix). You can quickly try out the samples provided at the bottom of this demo."
 
 
 
 
11
 
12
 
13
  def load_pipeline(id: str):
37
  image_guidance_scale=img_cfg,
38
  guidance_scale=text_cfg,
39
  generator=torch.manual_seed(int(seed)),
40
+ num_images_per_prompt=4
41
  ).images
42
  return images
43