lunarflu
commited on
Commit
·
126bf6e
1
Parent(s):
a6a3407
Synced repo using 'sync_with_huggingface' Github Action
Browse files- deepfloydif.py +6 -5
deepfloydif.py
CHANGED
|
@@ -158,7 +158,7 @@ async def deepfloydif_generate64(ctx, prompt, client):
|
|
| 158 |
index = int(interaction.data["custom_id"]) # 0,1,2,3
|
| 159 |
|
| 160 |
await interaction.response.send_message(
|
| 161 |
-
f"{
|
| 162 |
)
|
| 163 |
result_path = await deepfloydif_upscale256(index, path_for_upscale256_upscaling)
|
| 164 |
|
|
@@ -174,7 +174,8 @@ async def deepfloydif_generate64(ctx, prompt, client):
|
|
| 174 |
await interaction.delete_original_response()
|
| 175 |
await channel.send(
|
| 176 |
content=(
|
| 177 |
-
f"{
|
|
|
|
| 178 |
),
|
| 179 |
file=discord.File(f, f"{prompt}.png"),
|
| 180 |
view=view,
|
|
@@ -184,14 +185,14 @@ async def deepfloydif_generate64(ctx, prompt, client):
|
|
| 184 |
index = int(interaction.data["custom_id"])
|
| 185 |
|
| 186 |
await interaction.response.send_message(
|
| 187 |
-
f"{
|
| 188 |
)
|
| 189 |
result_path = await deepfloydif_upscale1024(index, path_for_upscale256_upscaling, prompt)
|
| 190 |
|
| 191 |
with open(result_path, "rb") as f:
|
| 192 |
await interaction.delete_original_response()
|
| 193 |
await channel.send(
|
| 194 |
-
content=f"{
|
| 195 |
file=discord.File(f, f"{prompt}.png"),
|
| 196 |
)
|
| 197 |
|
|
@@ -207,7 +208,7 @@ async def deepfloydif_generate64(ctx, prompt, client):
|
|
| 207 |
view.add_item(button4)
|
| 208 |
|
| 209 |
# could store this message as combined_image_dfif in case it's useful for future testing
|
| 210 |
-
await
|
| 211 |
f"{ctx.author.mention} Click a button to upscale! (make larger + enhance quality)",
|
| 212 |
file=discord.File(f, f"{partial_path}.png"),
|
| 213 |
view=view,
|
|
|
|
| 158 |
index = int(interaction.data["custom_id"]) # 0,1,2,3
|
| 159 |
|
| 160 |
await interaction.response.send_message(
|
| 161 |
+
f"{interaction.user.mention} <a:loading:1114111677990981692>", ephemeral=True
|
| 162 |
)
|
| 163 |
result_path = await deepfloydif_upscale256(index, path_for_upscale256_upscaling)
|
| 164 |
|
|
|
|
| 174 |
await interaction.delete_original_response()
|
| 175 |
await channel.send(
|
| 176 |
content=(
|
| 177 |
+
f"{interaction.user.mention} Here is the upscaled image! Click to upscale even"
|
| 178 |
+
" more!"
|
| 179 |
),
|
| 180 |
file=discord.File(f, f"{prompt}.png"),
|
| 181 |
view=view,
|
|
|
|
| 185 |
index = int(interaction.data["custom_id"])
|
| 186 |
|
| 187 |
await interaction.response.send_message(
|
| 188 |
+
f"{interaction.user.mention} <a:loading:1114111677990981692>", ephemeral=True
|
| 189 |
)
|
| 190 |
result_path = await deepfloydif_upscale1024(index, path_for_upscale256_upscaling, prompt)
|
| 191 |
|
| 192 |
with open(result_path, "rb") as f:
|
| 193 |
await interaction.delete_original_response()
|
| 194 |
await channel.send(
|
| 195 |
+
content=f"{interaction.user.mention} Here's your high-quality x16 image!",
|
| 196 |
file=discord.File(f, f"{prompt}.png"),
|
| 197 |
)
|
| 198 |
|
|
|
|
| 208 |
view.add_item(button4)
|
| 209 |
|
| 210 |
# could store this message as combined_image_dfif in case it's useful for future testing
|
| 211 |
+
await channel.send(
|
| 212 |
f"{ctx.author.mention} Click a button to upscale! (make larger + enhance quality)",
|
| 213 |
file=discord.File(f, f"{partial_path}.png"),
|
| 214 |
view=view,
|