Spaces:
Runtime error
Runtime error
update app
Browse files
app.py
CHANGED
@@ -17,6 +17,14 @@ def predict(prompt, steps=30, seed=42, guidance_scale=7.5):
|
|
17 |
image = pipe(prompt, num_inference_steps=steps, guidance_scale=7.5).images[0]
|
18 |
return image
|
19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
random_seed = random.randint(0, 2147483647)
|
21 |
gr.Interface(
|
22 |
predict,
|
@@ -29,5 +37,5 @@ gr.Interface(
|
|
29 |
outputs=gr.Image(shape=[512, 512], type="pil", elem_id="output_image"),
|
30 |
css="#output_image{width: 256px}",
|
31 |
title="Demo of dicoo-finetuned-diffusion-model using Intel Neural Compressor 🧨",
|
32 |
-
description=
|
33 |
).launch()
|
|
|
17 |
image = pipe(prompt, num_inference_steps=steps, guidance_scale=7.5).images[0]
|
18 |
return image
|
19 |
|
20 |
+
md = """
|
21 |
+
This Spaces app is same as <a href=\"https://huggingface.co/spaces/Intel/dicoo_diffusion\">Intel/dicoo_diffusion</a>, created by Intel AIA/AIPC team with the model fine-tuned with one shot (one image) for a newly introduced object \"dicoo\". To replicate the model fine-tuning, please refer to the code sample in <a href=\"https://github.com/intel/neural-compressor/tree/master/examples/pytorch/diffusion_model/diffusers/textual_inversion\">Intel Neural Compressor</a>. You may also refer to our <a href=\"https://medium.com/intel-analytics-software/personalized-stable-diffusion-with-few-shot-fine-tuning-on-a-single-cpu-f01a3316b13\">blog</a> for more details.
|
22 |
+
|
23 |
+
**Tips:**
|
24 |
+
- When inputting prompts, you need to contain the word **<dicoo>** which represents the pretrained object \"dicoo\".
|
25 |
+
- For better generation, you maybe increase the inference steps.
|
26 |
+
"""
|
27 |
+
|
28 |
random_seed = random.randint(0, 2147483647)
|
29 |
gr.Interface(
|
30 |
predict,
|
|
|
37 |
outputs=gr.Image(shape=[512, 512], type="pil", elem_id="output_image"),
|
38 |
css="#output_image{width: 256px}",
|
39 |
title="Demo of dicoo-finetuned-diffusion-model using Intel Neural Compressor 🧨",
|
40 |
+
description=md,
|
41 |
).launch()
|