Spaces:
Running
on
Zero
Running
on
Zero
Commit
•
c8136d1
1
Parent(s):
e4b31e4
Update app.py
Browse files
app.py
CHANGED
@@ -37,7 +37,7 @@ pipe_normal.scheduler = EDMEulerScheduler(sigma_min=0.002, sigma_max=120.0, sigm
|
|
37 |
pipe_normal.to("cuda")
|
38 |
|
39 |
@spaces.GPU
|
40 |
-
def run_normal(prompt, negative_prompt, guidance_scale, progress=gr.Progress(track_tqdm=True)):
|
41 |
return pipe_normal(prompt, negative_prompt=negative_prompt, guidance_scale=guidance_scale, num_inference_steps=20).images[0]
|
42 |
|
43 |
@spaces.GPU
|
@@ -51,6 +51,7 @@ max-width: 768px !important;
|
|
51 |
margin: 0 auto;
|
52 |
}
|
53 |
'''
|
|
|
54 |
with gr.Blocks(css=css) as demo:
|
55 |
gr.Markdown('''# CosXL demo
|
56 |
Unofficial demo for CosXL, a SDXL model tuned to produce full color range images. CosXL Edit allows you to perform edits on images. Both have a [non-commercial community license](https://huggingface.co/stabilityai/cosxl/blob/main/LICENSE)
|
@@ -64,6 +65,7 @@ with gr.Blocks(css=css) as demo:
|
|
64 |
with gr.Accordion("Advanced Settings", open=False):
|
65 |
negative_prompt_normal = gr.Textbox(label="Negative Prompt")
|
66 |
guidance_scale_normal = gr.Number(label="Guidance Scale", value=7)
|
|
|
67 |
with gr.Tab("CosXL Edit"):
|
68 |
with gr.Group():
|
69 |
image_edit = gr.Image(label="Image you would like to edit", type="pil")
|
|
|
37 |
pipe_normal.to("cuda")
|
38 |
|
39 |
@spaces.GPU
|
40 |
+
def run_normal(prompt, negative_prompt="", guidance_scale=7, progress=gr.Progress(track_tqdm=True)):
|
41 |
return pipe_normal(prompt, negative_prompt=negative_prompt, guidance_scale=guidance_scale, num_inference_steps=20).images[0]
|
42 |
|
43 |
@spaces.GPU
|
|
|
51 |
margin: 0 auto;
|
52 |
}
|
53 |
'''
|
54 |
+
normal_examples = ["portrait photo of a girl, photograph, highly detailed face, depth of field, moody light, golden hour, style by Dan Winters, Russell James, Steve McCurry, centered, extremely detailed, Nikon D850, award winning photography", "backlit photography of a dog", "Self-portrait oil painting, a beautiful cyborg with golden hair, 8k"]
|
55 |
with gr.Blocks(css=css) as demo:
|
56 |
gr.Markdown('''# CosXL demo
|
57 |
Unofficial demo for CosXL, a SDXL model tuned to produce full color range images. CosXL Edit allows you to perform edits on images. Both have a [non-commercial community license](https://huggingface.co/stabilityai/cosxl/blob/main/LICENSE)
|
|
|
65 |
with gr.Accordion("Advanced Settings", open=False):
|
66 |
negative_prompt_normal = gr.Textbox(label="Negative Prompt")
|
67 |
guidance_scale_normal = gr.Number(label="Guidance Scale", value=7)
|
68 |
+
gr.Examples(examples=examples, fn=run_normal, inputs=[prompt_normal], outputs=[output_normal], cache_examples=True)
|
69 |
with gr.Tab("CosXL Edit"):
|
70 |
with gr.Group():
|
71 |
image_edit = gr.Image(label="Image you would like to edit", type="pil")
|