Update app.py
Browse files
app.py
CHANGED
|
@@ -11,7 +11,7 @@ from diffusers.utils import load_image
|
|
| 11 |
pipeline_text2image = AutoPipelineForText2Image.from_pretrained("stabilityai/sdxl-turbo").to("cuda")
|
| 12 |
pipeline_image2image = AutoPipelineForImage2Image.from_pipe(pipeline_text2image).to("cuda")
|
| 13 |
|
| 14 |
-
def text2img(prompt = "A cinematic shot of a baby racoon wearing an intricate italian priest robe.",
|
| 15 |
image = pipeline_text2image(prompt=prompt, guidance_scale=guidance_scale, num_inference_steps=num_inference_steps).images[0]
|
| 16 |
return image
|
| 17 |
|
|
@@ -26,9 +26,6 @@ gradio_app_text2img = gr.Interface(
|
|
| 26 |
fn=text2img,
|
| 27 |
inputs=[
|
| 28 |
gr.Text(),
|
| 29 |
-
gr.Dropdown(
|
| 30 |
-
["flux", "stable diffusion"], label="model", info="model to use"
|
| 31 |
-
),
|
| 32 |
gr.Slider(0.0, 2.0, value=1,step=0.1),
|
| 33 |
gr.Slider(2.0, 20.0, value=1,step=1)
|
| 34 |
],
|
|
|
|
| 11 |
pipeline_text2image = AutoPipelineForText2Image.from_pretrained("stabilityai/sdxl-turbo").to("cuda")
|
| 12 |
pipeline_image2image = AutoPipelineForImage2Image.from_pipe(pipeline_text2image).to("cuda")
|
| 13 |
|
| 14 |
+
def text2img(prompt = "A cinematic shot of a baby racoon wearing an intricate italian priest robe.",guidance_scale=0.0, num_inference_steps=1):
|
| 15 |
image = pipeline_text2image(prompt=prompt, guidance_scale=guidance_scale, num_inference_steps=num_inference_steps).images[0]
|
| 16 |
return image
|
| 17 |
|
|
|
|
| 26 |
fn=text2img,
|
| 27 |
inputs=[
|
| 28 |
gr.Text(),
|
|
|
|
|
|
|
|
|
|
| 29 |
gr.Slider(0.0, 2.0, value=1,step=0.1),
|
| 30 |
gr.Slider(2.0, 20.0, value=1,step=1)
|
| 31 |
],
|