Spaces:
Runtime error
Runtime error
Contrebande Labs
commited on
Commit
·
6657a5d
1
Parent(s):
e684e0f
metadata + requirements + layout
Browse files- README.md +6 -3
- app.py +13 -21
- requirements.txt +13 -0
README.md
CHANGED
|
@@ -1,13 +1,16 @@
|
|
| 1 |
---
|
| 2 |
title: CHARRED
|
| 3 |
emoji: 📈
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: gradio
|
| 7 |
-
|
|
|
|
| 8 |
app_file: app.py
|
| 9 |
pinned: true
|
| 10 |
license: cc-by-sa-4.0
|
|
|
|
|
|
|
| 11 |
tags:
|
| 12 |
- jax-diffusers-event
|
| 13 |
---
|
|
|
|
| 1 |
---
|
| 2 |
title: CHARRED
|
| 3 |
emoji: 📈
|
| 4 |
+
colorFrom: red
|
| 5 |
+
colorTo: navy
|
| 6 |
sdk: gradio
|
| 7 |
+
python_version: 3.10.6
|
| 8 |
+
sdk_version: 3.28.0
|
| 9 |
app_file: app.py
|
| 10 |
pinned: true
|
| 11 |
license: cc-by-sa-4.0
|
| 12 |
+
models: [ "character-aware-diffusion/charred", "google/byt5-base", flax/stable-diffusion-2-1" ]
|
| 13 |
+
datasets: [ "laion/laion-high-resolution" ]
|
| 14 |
tags:
|
| 15 |
- jax-diffusers-event
|
| 16 |
---
|
app.py
CHANGED
|
@@ -1,34 +1,26 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
title = "Character aware stable difusion"
|
| 3 |
-
description = "This is a demo of a character aware diffusion model"
|
| 4 |
-
def infer_sd(prompt, negative_prompt, image):
|
| 5 |
-
# your inference function for stable diffusion control
|
| 6 |
-
return None
|
| 7 |
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
# your inference function for charr stable difusion control
|
| 10 |
return None
|
| 11 |
|
| 12 |
with gr.Blocks(theme='gradio/soft') as demo:
|
| 13 |
-
|
|
|
|
| 14 |
|
| 15 |
-
with gr.Tab("
|
|
|
|
|
|
|
|
|
|
| 16 |
prompt_input_charr = gr.Textbox(label="Prompt")
|
| 17 |
-
negative_prompt_charr = gr.Textbox(label="Negative Prompt")
|
| 18 |
-
charr_input = gr.Image(label="Input Image")
|
| 19 |
charr_output = gr.Image(label="Output Image")
|
| 20 |
submit_btn = gr.Button(value = "Submit")
|
| 21 |
-
charr_inputs = [prompt_input_charr
|
| 22 |
-
submit_btn.click(fn=
|
| 23 |
-
|
| 24 |
-
with gr.Tab("Stable Diffusion"):
|
| 25 |
-
prompt_input_seg = gr.Textbox(label="Prompt")
|
| 26 |
-
negative_prompt_seg = gr.Textbox(label="Negative Prompt")
|
| 27 |
-
sd_input = gr.Image(label="Input Image")
|
| 28 |
-
sd_output = gr.Image(label="Output Image")
|
| 29 |
-
submit_btn = gr.Button(value = "Submit")
|
| 30 |
-
sd_inputs = [prompt_input_seg, negative_prompt_seg, sd_input]
|
| 31 |
-
submit_btn.click(fn=infer_sd, inputs=sd_inputs, outputs=[sd_output])
|
| 32 |
#examples = [["postage stamp from california", "low quality", "charr_output.png", "charr_output.png" ]]
|
| 33 |
#gr.Examples(fn = infer_sd, inputs = ["text", "text", "image", "image"], examples=examples, cache_examples=True)
|
| 34 |
|
|
|
|
| 1 |
import gradio as gr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
+
title = "Character-Aware Stable Diffusion (CHARRED)"
|
| 4 |
+
|
| 5 |
+
description = "This is a demo of the CHARRED character-aware stable diffusion model for you to enjoy at your own leisure, risk and peril"
|
| 6 |
+
|
| 7 |
+
def infer_charred(prompt):
|
| 8 |
# your inference function for charr stable difusion control
|
| 9 |
return None
|
| 10 |
|
| 11 |
with gr.Blocks(theme='gradio/soft') as demo:
|
| 12 |
+
|
| 13 |
+
gr.Markdown("# Character aware stable difusion")
|
| 14 |
|
| 15 |
+
with gr.Tab("Journal"):
|
| 16 |
+
gr.Markdown("## On How Four Crazy Fellow Embarked on Training a U-Net from Scratch in Five Days and Almost Died in the End.")
|
| 17 |
+
|
| 18 |
+
with gr.Tab("☢️ DEMO ☢️"):
|
| 19 |
prompt_input_charr = gr.Textbox(label="Prompt")
|
|
|
|
|
|
|
| 20 |
charr_output = gr.Image(label="Output Image")
|
| 21 |
submit_btn = gr.Button(value = "Submit")
|
| 22 |
+
charr_inputs = [prompt_input_charr]
|
| 23 |
+
submit_btn.click(fn=infer_charred, inputs=charr_inputs, outputs=[charr_output])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
#examples = [["postage stamp from california", "low quality", "charr_output.png", "charr_output.png" ]]
|
| 25 |
#gr.Examples(fn = infer_sd, inputs = ["text", "text", "image", "image"], examples=examples, cache_examples=True)
|
| 26 |
|
requirements.txt
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
|
| 2 |
+
jax[cuda12_pip]
|
| 3 |
+
flax
|
| 4 |
+
optax
|
| 5 |
+
diffusers
|
| 6 |
+
transformers
|
| 7 |
+
datasets
|
| 8 |
+
--extra-index-url https://download.pytorch.org/whl/cpu
|
| 9 |
+
torch
|
| 10 |
+
torchvision
|
| 11 |
+
wandb
|
| 12 |
+
Pillow
|
| 13 |
+
gradio
|