Update app.py
Browse files
app.py
CHANGED
@@ -14,17 +14,18 @@ def get_prompts(prompt_text):
|
|
14 |
if prompt_text:
|
15 |
return MagicPrompt('dreamlikeart, ' + prompt_text)
|
16 |
else:
|
17 |
-
|
18 |
logging.info('loading Dreamlike Diffusion')
|
19 |
-
DreamDiffusion=App.Interface.load('models/dreamlike-art/dreamlike-
|
20 |
logging.info('Loading Dreamlike PhotoReal')
|
21 |
DreamPhotoReal = DreamDiffusion
|
22 |
-
#DreamPhotoReal=App.Interface.load('models/dreamlike-art/dreamlike-photoreal-2.0') # Credits to Dreamlike
|
23 |
|
24 |
def RestartScript():
|
25 |
while True:
|
26 |
RandomTime = random.randint(540, 600)
|
27 |
time.sleep(RandomTime)
|
|
|
28 |
os.execl(sys.executable, sys.executable, *sys.argv)
|
29 |
|
30 |
logging.info('Starting Auto-Restarter')
|
@@ -34,8 +35,7 @@ RestartThread.start()
|
|
34 |
queue = Queue()
|
35 |
queue_threshold = 100
|
36 |
|
37 |
-
def AddNoise(Prompt,
|
38 |
-
|
39 |
if NoiseLevel == 0:
|
40 |
NoiseLevel = 0.00
|
41 |
PercentageNoise = NoiseLevel * 5
|
@@ -142,11 +142,11 @@ with App.Blocks(css='style.css') as demo:
|
|
142 |
<div style='text-align: center; max-width: 650px; margin: 0 auto;'>
|
143 |
<div>
|
144 |
<h1 style='font-weight: 900; font-size: 3rem; margin-bottom:20px;'>
|
145 |
-
Dreamlike
|
146 |
</h1>
|
147 |
</div>
|
148 |
<p style='margin-bottom: 10px; font-size: 96%'>
|
149 |
-
Dreamlike Diffusion 1.
|
150 |
Noise Level: Controls how much randomness is added to the input before it is sent to the model. Higher noise level produces more diverse Outputs, while lower noise level produces similar Outputs,
|
151 |
<a created by phenomenon1981</a>.
|
152 |
</p>
|
@@ -184,18 +184,11 @@ with App.Blocks(css='style.css') as demo:
|
|
184 |
show_label=False,
|
185 |
max_lines=4,
|
186 |
placeholder='Full Prompt',
|
187 |
-
|
188 |
-
|
189 |
-
label='Enter your Negative prompt',
|
190 |
-
show_label=False,
|
191 |
-
max_lines=4,
|
192 |
-
placeholder='Full Negative Prompt',
|
193 |
-
).style(
|
194 |
-
container=False,
|
195 |
)
|
196 |
Run = App.Button('Generate Images').style(full_width=False)
|
197 |
-
|
198 |
-
|
199 |
with App.Row():
|
200 |
with App.Row():
|
201 |
NoiseLevel = App.Slider(minimum=0.1, maximum=3, step=0.1, label='Noise Level', value=0.5)
|
|
|
14 |
if prompt_text:
|
15 |
return MagicPrompt('dreamlikeart, ' + prompt_text)
|
16 |
else:
|
17 |
+
return MagicPrompt('')
|
18 |
logging.info('loading Dreamlike Diffusion')
|
19 |
+
DreamDiffusion=App.Interface.load('models/dreamlike-art/dreamlike-diffusion-1.0') # Credits to Dreamlike
|
20 |
logging.info('Loading Dreamlike PhotoReal')
|
21 |
DreamPhotoReal = DreamDiffusion
|
22 |
+
# DreamPhotoReal=App.Interface.load('models/dreamlike-art/dreamlike-photoreal-2.0') # Credits to Dreamlike
|
23 |
|
24 |
def RestartScript():
|
25 |
while True:
|
26 |
RandomTime = random.randint(540, 600)
|
27 |
time.sleep(RandomTime)
|
28 |
+
logging.info('Restarting')
|
29 |
os.execl(sys.executable, sys.executable, *sys.argv)
|
30 |
|
31 |
logging.info('Starting Auto-Restarter')
|
|
|
35 |
queue = Queue()
|
36 |
queue_threshold = 100
|
37 |
|
38 |
+
def AddNoise(Prompt, NoiseLevel=0.00):
|
|
|
39 |
if NoiseLevel == 0:
|
40 |
NoiseLevel = 0.00
|
41 |
PercentageNoise = NoiseLevel * 5
|
|
|
142 |
<div style='text-align: center; max-width: 650px; margin: 0 auto;'>
|
143 |
<div>
|
144 |
<h1 style='font-weight: 900; font-size: 3rem; margin-bottom:20px;'>
|
145 |
+
Dreamlike Grouped
|
146 |
</h1>
|
147 |
</div>
|
148 |
<p style='margin-bottom: 10px; font-size: 96%'>
|
149 |
+
Dreamlike Diffusion 1.0 | Dreamlike PhotoReal 2.0
|
150 |
Noise Level: Controls how much randomness is added to the input before it is sent to the model. Higher noise level produces more diverse Outputs, while lower noise level produces similar Outputs,
|
151 |
<a created by phenomenon1981</a>.
|
152 |
</p>
|
|
|
184 |
show_label=False,
|
185 |
max_lines=4,
|
186 |
placeholder='Full Prompt',
|
187 |
+
).style(
|
188 |
+
container=False,
|
|
|
|
|
|
|
|
|
|
|
|
|
189 |
)
|
190 |
Run = App.Button('Generate Images').style(full_width=False)
|
191 |
+
|
|
|
192 |
with App.Row():
|
193 |
with App.Row():
|
194 |
NoiseLevel = App.Slider(minimum=0.1, maximum=3, step=0.1, label='Noise Level', value=0.5)
|