Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -4,8 +4,8 @@ import torch
|
|
4 |
from diffusers import DiffusionPipeline
|
5 |
|
6 |
def get_completion(prompt,params):
|
7 |
-
return pipeline(prompt=prompt, height=params['height'], width=params['width'], num_inference_steps=int(params['num_inference_steps']), guidance_scale=params['guidance_scale'])['sample'][0]
|
8 |
-
|
9 |
def generate(prompt,steps,guidance,width,height):
|
10 |
params = {
|
11 |
"num_inference_steps": steps,
|
|
|
4 |
from diffusers import DiffusionPipeline
|
5 |
|
6 |
def get_completion(prompt,params):
|
7 |
+
# return pipeline(prompt=prompt, height=params['height'], width=params['width'], num_inference_steps=int(params['num_inference_steps']), guidance_scale=params['guidance_scale'])['sample'][0]
|
8 |
+
return pipeline(prompt=prompt, height=params['height'], width=params['width'], num_inference_steps=int(params['num_inference_steps']), guidance_scale=params['guidance_scale']).images[0]
|
9 |
def generate(prompt,steps,guidance,width,height):
|
10 |
params = {
|
11 |
"num_inference_steps": steps,
|