Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -9,11 +9,11 @@ device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
9 |
context = autocast if device == "cuda" else nullcontext
|
10 |
dtype = torch.float16 if device == "cuda" else torch.float32
|
11 |
|
12 |
-
pipe = StableDiffusionPipeline.from_pretrained("lambdalabs/sd-
|
13 |
pipe = pipe.to(device)
|
14 |
|
15 |
|
16 |
-
# Sometimes the nsfw checker is confused by the
|
17 |
# it at your own risk here
|
18 |
disable_safety = True
|
19 |
|
@@ -115,19 +115,19 @@ block = gr.Blocks(css=css)
|
|
115 |
|
116 |
examples = [
|
117 |
[
|
118 |
-
'
|
119 |
2,
|
120 |
7.5,
|
121 |
],
|
122 |
[
|
123 |
-
'
|
124 |
2,
|
125 |
7.5,
|
126 |
],
|
127 |
[
|
128 |
-
'
|
129 |
2,
|
130 |
-
7
|
131 |
],
|
132 |
]
|
133 |
|
@@ -139,11 +139,11 @@ with block:
|
|
139 |
<img class="logo" src="https://lambdalabs.com/static/images/lambda-logo.svg" alt="Lambda Logo"
|
140 |
style="margin: auto; max-width: 7rem;">
|
141 |
<h1 style="font-weight: 900; font-size: 3rem;">
|
142 |
-
|
143 |
</h1>
|
144 |
</div>
|
145 |
<p style="margin-bottom: 10px; font-size: 94%">
|
146 |
-
Generate new
|
147 |
<a href="https://lambdalabs.com/blog/how-to-fine-tune-stable-diffusion-how-we-made-the-text-to-pokemon-model-at-lambda/">created by Lambda Labs</a>.
|
148 |
</p>
|
149 |
</div>
|
@@ -193,10 +193,10 @@ with block:
|
|
193 |
</p>
|
194 |
</div>
|
195 |
<div class="acknowledgments">
|
196 |
-
<p> Put in a text prompt and generate your own
|
197 |
<p>If you want to find out how we made this model read about it in <a href="https://lambdalabs.com/blog/how-to-fine-tune-stable-diffusion-how-we-made-the-text-to-pokemon-model-at-lambda/">this blog post</a>.
|
198 |
<p>And if you want to train your own Stable Diffusion variants, see our <a href="https://github.com/LambdaLabsML/examples/tree/main/stable-diffusion-finetuning">Examples Repo</a>!
|
199 |
-
<p>Trained by
|
200 |
</div>
|
201 |
"""
|
202 |
)
|
|
|
9 |
context = autocast if device == "cuda" else nullcontext
|
10 |
dtype = torch.float16 if device == "cuda" else torch.float32
|
11 |
|
12 |
+
pipe = StableDiffusionPipeline.from_pretrained("lambdalabs/sd-pokemon-diffusers", torch_dtype=dtype)
|
13 |
pipe = pipe.to(device)
|
14 |
|
15 |
|
16 |
+
# Sometimes the nsfw checker is confused by the Pokémon images, you can disable
|
17 |
# it at your own risk here
|
18 |
disable_safety = True
|
19 |
|
|
|
115 |
|
116 |
examples = [
|
117 |
[
|
118 |
+
'Yoda',
|
119 |
2,
|
120 |
7.5,
|
121 |
],
|
122 |
[
|
123 |
+
'Abraham Lincoln',
|
124 |
2,
|
125 |
7.5,
|
126 |
],
|
127 |
[
|
128 |
+
'George Washington',
|
129 |
2,
|
130 |
+
7,
|
131 |
],
|
132 |
]
|
133 |
|
|
|
139 |
<img class="logo" src="https://lambdalabs.com/static/images/lambda-logo.svg" alt="Lambda Logo"
|
140 |
style="margin: auto; max-width: 7rem;">
|
141 |
<h1 style="font-weight: 900; font-size: 3rem;">
|
142 |
+
Pokémon text to image
|
143 |
</h1>
|
144 |
</div>
|
145 |
<p style="margin-bottom: 10px; font-size: 94%">
|
146 |
+
Generate new Pokémon from a text description,
|
147 |
<a href="https://lambdalabs.com/blog/how-to-fine-tune-stable-diffusion-how-we-made-the-text-to-pokemon-model-at-lambda/">created by Lambda Labs</a>.
|
148 |
</p>
|
149 |
</div>
|
|
|
193 |
</p>
|
194 |
</div>
|
195 |
<div class="acknowledgments">
|
196 |
+
<p> Put in a text prompt and generate your own Pokémon character, no "prompt engineering" required!
|
197 |
<p>If you want to find out how we made this model read about it in <a href="https://lambdalabs.com/blog/how-to-fine-tune-stable-diffusion-how-we-made-the-text-to-pokemon-model-at-lambda/">this blog post</a>.
|
198 |
<p>And if you want to train your own Stable Diffusion variants, see our <a href="https://github.com/LambdaLabsML/examples/tree/main/stable-diffusion-finetuning">Examples Repo</a>!
|
199 |
+
<p>Trained by <a href="justinpinkney.com">Justin Pinkney</a> (<a href="https://twitter.com/Buntworthy">@Buntworthy</a>) at <a href="https://lambdalabs.com/">Lambda Labs</a>.</p>
|
200 |
</div>
|
201 |
"""
|
202 |
)
|