jaehyunshin commited on
Commit
783a571
1 Parent(s): 8a3d535

Update text_to_image.py

Browse files

put num_inference_steps as an argument so we can change if necessary

Files changed (1) hide show
  1. text_to_image.py +2 -2
text_to_image.py CHANGED
@@ -40,12 +40,12 @@ class TextToImageTool(Tool):
40
 
41
  self.is_initialized = True
42
 
43
- def __call__(self, prompt):
44
  if not self.is_initialized:
45
  self.setup()
46
 
47
  negative_prompt = "low quality, bad quality, deformed, low resolution"
48
  added_prompt = " , highest quality, highly realistic, very high resolution"
49
 
50
- return self.pipeline(prompt + added_prompt, negative_prompt=negative_prompt, num_inference_steps=25).images[0]
51
 
 
40
 
41
  self.is_initialized = True
42
 
43
+ def __call__(self, prompt, num_inference_steps=25):
44
  if not self.is_initialized:
45
  self.setup()
46
 
47
  negative_prompt = "low quality, bad quality, deformed, low resolution"
48
  added_prompt = " , highest quality, highly realistic, very high resolution"
49
 
50
+ return self.pipeline(prompt + added_prompt, negative_prompt=negative_prompt, num_inference_steps=num_inference_steps).images[0]
51