Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,7 +18,7 @@ def infer(source_img, prompt, negative_prompt, guide, steps, seed, Strength):
|
|
| 18 |
generator = torch.Generator(device).manual_seed(seed)
|
| 19 |
source_image = resize(768, source_img)
|
| 20 |
source_image.save('source.png')
|
| 21 |
-
image = pipe(prompt, negative_prompt=negative_prompt,
|
| 22 |
return image
|
| 23 |
|
| 24 |
gr.Interface(fn=infer, inputs=[gr.Image(source="upload", type="filepath", label="Raw Image. Must Be .png"), gr.Textbox(label = 'Prompt Input Text. 77 Token (Keyword or Symbol) Maximum'), gr.Textbox(label='What you Do Not want the AI to generate.'),
|
|
|
|
| 18 |
generator = torch.Generator(device).manual_seed(seed)
|
| 19 |
source_image = resize(768, source_img)
|
| 20 |
source_image.save('source.png')
|
| 21 |
+
image = pipe(prompt, negative_prompt=negative_prompt, image=source_image, strength=Strength, guidance_scale=guide, num_inference_steps=steps).images[0]
|
| 22 |
return image
|
| 23 |
|
| 24 |
gr.Interface(fn=infer, inputs=[gr.Image(source="upload", type="filepath", label="Raw Image. Must Be .png"), gr.Textbox(label = 'Prompt Input Text. 77 Token (Keyword or Symbol) Maximum'), gr.Textbox(label='What you Do Not want the AI to generate.'),
|