lunarflu commited on
Commit ·
bb586e3
1
Parent(s): 3426c59
Update app.py
Browse files
app.py
CHANGED
|
@@ -291,6 +291,21 @@ async def react1234(reaction_emojis, combined_image_dfif):
|
|
| 291 |
|
| 292 |
|
| 293 |
#----------------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 294 |
#----------------------------------------------------------------------------------------------------------------------------
|
| 295 |
# running in thread
|
| 296 |
DISCORD_TOKEN = os.environ.get("DISCORD_TOKEN", None)
|
|
|
|
| 291 |
|
| 292 |
|
| 293 |
#----------------------------------------------------------------------------------------------------------------------------
|
| 294 |
+
#----------------------------------------------------------------------------------------------------------------------------------------------
|
| 295 |
+
# deepfloydif stage 1 generation ✅
|
| 296 |
+
def inference(prompt):
|
| 297 |
+
negative_prompt = ''
|
| 298 |
+
seed = random.randint(0, 1000)
|
| 299 |
+
#seed = 1
|
| 300 |
+
number_of_images = 4
|
| 301 |
+
guidance_scale = 7
|
| 302 |
+
custom_timesteps_1 = 'smart50'
|
| 303 |
+
number_of_inference_steps = 50
|
| 304 |
+
|
| 305 |
+
stage_1_results, stage_1_param_path, stage_1_result_path = df.predict(
|
| 306 |
+
prompt, negative_prompt, seed, number_of_images, guidance_scale, custom_timesteps_1, number_of_inference_steps, api_name='/generate64')
|
| 307 |
+
|
| 308 |
+
return [stage_1_results, stage_1_param_path, stage_1_result_path]
|
| 309 |
#----------------------------------------------------------------------------------------------------------------------------
|
| 310 |
# running in thread
|
| 311 |
DISCORD_TOKEN = os.environ.get("DISCORD_TOKEN", None)
|