Commit
·
78e17f2
1
Parent(s):
847d165
Update app.py
Browse filesAdded customized descriptions.
app.py
CHANGED
@@ -1,15 +1,18 @@
|
|
1 |
-
#
|
2 |
-
#
|
3 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
#add init image !!!
|
5 |
-
#
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
#changed description text for model
|
10 |
-
#changed sliders to set easier limits
|
11 |
-
#forced QR as INIT image temp
|
12 |
-
#removed some options and sliders by commenting out, may reenable
|
13 |
|
14 |
|
15 |
import torch
|
@@ -164,37 +167,42 @@ def inference(
|
|
164 |
with gr.Blocks() as blocks:
|
165 |
gr.Markdown(
|
166 |
"""
|
167 |
-
|
168 |
-
***DISCLAIMER - By using this model you agree to waive any liability and are assuming all responsibility for generated images.***
|
169 |
-
***IMAGES GENERATED BY THIS PUBLIC VERISON ARE NOT INTENDED FOR COMMERCIAL USE***
|
170 |
|
171 |
-
|
172 |
-
|
|
|
|
|
|
|
|
|
173 |
|
174 |
Then, type your QR code information such as a website link or enter your own QR code.
|
175 |
-
|
|
|
|
|
176 |
Hit generate!
|
177 |
|
178 |
|
179 |
===========================================================CUSTOM SETTINGS====================================================================================
|
180 |
-
The default settings should work for testing.
|
181 |
|
182 |
-
QR High Pass -
|
183 |
-
|
184 |
|
185 |
-
QR Initial Weight -
|
186 |
-
|
187 |
|
188 |
-
Prompt Weight - This determines how much the AI "Listens" to your prompt and try to put what you described into your image.
|
189 |
-
|
190 |
|
191 |
-
Seed - This is a randomizer! Use the same seed to generate the same image over and over. Change the seed to change up your image!
|
|
|
192 |
|
193 |
"""
|
194 |
)
|
195 |
prompt = gr.Textbox(
|
196 |
label="Prompt",
|
197 |
-
info="
|
198 |
)
|
199 |
|
200 |
negative_prompt = gr.Textbox(visible=True, label="Negative Prompt",
|
@@ -240,7 +248,7 @@ Seed - This is a randomizer! Use the same seed to generate the same image over a
|
|
240 |
minimum=0.6,
|
241 |
maximum=2.0,
|
242 |
step=0.01,
|
243 |
-
value=0.
|
244 |
label="QR High Pass",
|
245 |
)
|
246 |
strength = gr.Slider(
|
|
|
1 |
+
#Created for https://www.aiqrgenerator.com/ as a public beta version for embedding.
|
2 |
+
#May update again but will probably remain the final public version as I am still working on features and consider this a minimum viable product
|
3 |
+
#Further updates and custom models will be updated privately.
|
4 |
+
|
5 |
+
#Please ensure
|
6 |
+
|
7 |
+
|
8 |
+
#derivative and edited from QR-code-AI-art-generator by patrickvonplaten - customized AND COPYRIGHTED UNDER COMMERCIAL LICENSE
|
9 |
+
#ControlNet model is controlnet_qrcode-control_v1p_sd15 by DionTimmer from under OPENRAIL license
|
10 |
+
#to do - remove stable diff 2 API and use my custom model for generation for init image
|
11 |
#add init image !!!
|
12 |
+
#custom controlnetmodel implementation
|
13 |
+
#V1.02 public, not recent version
|
14 |
+
|
15 |
+
|
|
|
|
|
|
|
|
|
16 |
|
17 |
|
18 |
import torch
|
|
|
167 |
with gr.Blocks() as blocks:
|
168 |
gr.Markdown(
|
169 |
"""
|
170 |
+
======================================CREATED FOR https://www.aiqrgenerator.com/ EARLY BETA - PUBLIC ACCESS V1.02============================================
|
|
|
|
|
171 |
|
172 |
+
==================***DISCLAIMER - By using this model you agree to waive any liability and are assuming all responsibility for generated images.***==================
|
173 |
+
===============================================================================================================================================================
|
174 |
+
|
175 |
+
|
176 |
+
First, type in what you want the QR code to look like. Use major subjects seperated by commas like the example below - you can even include styles!
|
177 |
+
Ex. Mountian, snow, morning, trees, artist, oil painting, canvas
|
178 |
|
179 |
Then, type your QR code information such as a website link or enter your own QR code.
|
180 |
+
|
181 |
+
Feel free to test custom settings as well to tweak the look.
|
182 |
+
|
183 |
Hit generate!
|
184 |
|
185 |
|
186 |
===========================================================CUSTOM SETTINGS====================================================================================
|
187 |
+
The default settings should work for testing. Currently working on improving the model and offering more customization!
|
188 |
|
189 |
+
**QR High Pass** - Change this to affect how much the QR code is overlayed to your image in a second pass. Controlnet model.
|
190 |
+
(Higher setting is more QR code, lower setting is less QR code.)
|
191 |
|
192 |
+
**QR Initial Weight** - Change this to affect how much your image starts looking like a QR code!
|
193 |
+
(Higher settings mean your image starts with less QR, lower means the QR will appear sharper)
|
194 |
|
195 |
+
**Prompt Weight** - This determines how much the AI "Listens" to your prompt and try to put what you described into your image.
|
196 |
+
(Lower means it is more absract and higher follows your directions more.)
|
197 |
|
198 |
+
**Seed** - This is a randomizer! Use the same seed to generate the same image over and over. Change the seed to change up your image!
|
199 |
+
(Set it to negative -1 to randomize, you can copy your seed from a previous generation to get the same image)
|
200 |
|
201 |
"""
|
202 |
)
|
203 |
prompt = gr.Textbox(
|
204 |
label="Prompt",
|
205 |
+
info="Input subjects or styles you want to see that describes your image - Ex. Mountian, snow, morning, trees :: art, painting, digital",
|
206 |
)
|
207 |
|
208 |
negative_prompt = gr.Textbox(visible=True, label="Negative Prompt",
|
|
|
248 |
minimum=0.6,
|
249 |
maximum=2.0,
|
250 |
step=0.01,
|
251 |
+
value=0.70,
|
252 |
label="QR High Pass",
|
253 |
)
|
254 |
strength = gr.Slider(
|