Spaces:
Runtime error
Runtime error
Commit
•
843cf9f
1
Parent(s):
4c35fda
No token needed
Browse files- app.py +4 -4
- train_dreambooth.py +1 -1
app.py
CHANGED
@@ -18,7 +18,7 @@ model_to_load = "multimodalart/sd-fine-tunable"
|
|
18 |
maximum_concepts = 3
|
19 |
|
20 |
def swap_text(option):
|
21 |
-
mandatory_liability = "You must have the right to do so and you are liable for the images you use"
|
22 |
if(option == "object"):
|
23 |
instance_prompt_example = "cttoy"
|
24 |
freeze_for = 50
|
@@ -222,7 +222,7 @@ with gr.Blocks(css=css) as demo:
|
|
222 |
gr.HTML('''
|
223 |
<div class="gr-prose" style="max-width: 80%">
|
224 |
<h2>Attention - This Space doesn't work in this shared UI</h2>
|
225 |
-
<p>For it to work, you have to duplicate the Space and run it on your own profile where a (paid) private GPU will be attributed to it during runtime.
|
226 |
<img class="instruction" src="file/duplicate.png">
|
227 |
<img class="arrow" src="file/arrow.png" />
|
228 |
</div>
|
@@ -231,7 +231,7 @@ with gr.Blocks(css=css) as demo:
|
|
231 |
gr.HTML('''
|
232 |
<div class="gr-prose" style="max-width: 80%">
|
233 |
<h2>You have successfully cloned the Dreambooth Training Space</h2>
|
234 |
-
<p>If you haven't already, attribute a T4 GPU to it (via the Settings tab) and run the training below. You will be billed by the minute
|
235 |
</div>
|
236 |
''')
|
237 |
gr.Markdown("# Dreambooth training")
|
@@ -241,7 +241,7 @@ with gr.Blocks(css=css) as demo:
|
|
241 |
|
242 |
with gr.Row():
|
243 |
with gr.Column():
|
244 |
-
thing_description = gr.Markdown("You are going to train an `object`, upload 5-10 images of the object you are planning on training on from different angles/perspectives. You must have the right to do so and you are liable for the images you use")
|
245 |
thing_image_example = gr.HTML('''<img src="file/cat-toy.png" />''')
|
246 |
things_naming = gr.Markdown("You should name your concept with a unique made up word that has low chance of the model already knowing it (e.g.: `cttoy` here). Images will be automatically cropped to 512x512.")
|
247 |
with gr.Column():
|
|
|
18 |
maximum_concepts = 3
|
19 |
|
20 |
def swap_text(option):
|
21 |
+
mandatory_liability = "You must have the right to do so and you are liable for the images you use, example:"
|
22 |
if(option == "object"):
|
23 |
instance_prompt_example = "cttoy"
|
24 |
freeze_for = 50
|
|
|
222 |
gr.HTML('''
|
223 |
<div class="gr-prose" style="max-width: 80%">
|
224 |
<h2>Attention - This Space doesn't work in this shared UI</h2>
|
225 |
+
<p>For it to work, you have to duplicate the Space and run it on your own profile where a (paid) private GPU will be attributed to it during runtime. As each T4 costs US$0,60/h, it should cost you < US$1 to train a model with less than 100 images on default settings! 🤑</p>
|
226 |
<img class="instruction" src="file/duplicate.png">
|
227 |
<img class="arrow" src="file/arrow.png" />
|
228 |
</div>
|
|
|
231 |
gr.HTML('''
|
232 |
<div class="gr-prose" style="max-width: 80%">
|
233 |
<h2>You have successfully cloned the Dreambooth Training Space</h2>
|
234 |
+
<p>If you haven't already, attribute a T4 GPU to it (via the Settings tab) and run the training below. You will be billed by the minute from when you activate the GPU until when you turn it off.</p>
|
235 |
</div>
|
236 |
''')
|
237 |
gr.Markdown("# Dreambooth training")
|
|
|
241 |
|
242 |
with gr.Row():
|
243 |
with gr.Column():
|
244 |
+
thing_description = gr.Markdown("You are going to train an `object`, upload 5-10 images of the object you are planning on training on from different angles/perspectives. You must have the right to do so and you are liable for the images you use, example:")
|
245 |
thing_image_example = gr.HTML('''<img src="file/cat-toy.png" />''')
|
246 |
things_naming = gr.Markdown("You should name your concept with a unique made up word that has low chance of the model already knowing it (e.g.: `cttoy` here). Images will be automatically cropped to 512x512.")
|
247 |
with gr.Column():
|
train_dreambooth.py
CHANGED
@@ -498,7 +498,7 @@ def run_training(args_imported):
|
|
498 |
if args.tokenizer_name:
|
499 |
tokenizer = CLIPTokenizer.from_pretrained(args.tokenizer_name)
|
500 |
elif args.pretrained_model_name_or_path:
|
501 |
-
tokenizer = CLIPTokenizer.from_pretrained(args.pretrained_model_name_or_path, subfolder="tokenizer"
|
502 |
|
503 |
# Load models and create wrapper for stable diffusion
|
504 |
if args.train_only_unet:
|
|
|
498 |
if args.tokenizer_name:
|
499 |
tokenizer = CLIPTokenizer.from_pretrained(args.tokenizer_name)
|
500 |
elif args.pretrained_model_name_or_path:
|
501 |
+
tokenizer = CLIPTokenizer.from_pretrained(args.pretrained_model_name_or_path, subfolder="tokenizer")
|
502 |
|
503 |
# Load models and create wrapper for stable diffusion
|
504 |
if args.train_only_unet:
|