Skip to content

Commit

Permalink
Update model names and remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
Zingzy committed Jan 6, 2024
1 parent 187984b commit 960c97f
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 29 deletions.
2 changes: 1 addition & 1 deletion cogs/imagine_cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ async def model_autocomplete(self,
@app_commands.guild_only()
@app_commands.checks.cooldown(1, 15)
@app_commands.describe(prompt="Imagine a prompt", height="Height of the image", width="Width of the image", negative="The things not to include in the image", cached="Removes the image seed", nologo="Remove the logo", enhance="Disables Prompt enhancing if set to False", private="Only you can see the generated Image if set to True")
async def imagine_command(self, interaction, prompt:str, model: str = "Dreamshaper", width:int = 1000, height:int = 1000, negative:str|None = None, cached:bool = False, nologo:bool = False, enhance:bool = True, private:bool = False):
async def imagine_command(self, interaction, prompt:str, model: str = "Swizz8", width:int = 1000, height:int = 1000, negative:str|None = None, cached:bool = False, nologo:bool = False, enhance:bool = True, private:bool = False):
await interaction.response.send_message(embed=discord.Embed(title="Generating Image", description="Please wait while we generate your image", color=discord.Color.blurple()), ephemeral=True)

if len(prompt) > 1500:
Expand Down
40 changes: 20 additions & 20 deletions cogs/multi_imagine_cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,33 +89,33 @@ async def regerate_4(self, interaction: discord.Interaction, button: discord.ui.

await Multi_imagine.regenerate(interaction, button, data, 3)

@discord.ui.button(label="V5", style=discord.ButtonStyle.secondary, custom_id="v5")
async def regerate_5(self, interaction: discord.Interaction, button: discord.ui.Button):
await interaction.response.send_message(embed=discord.Embed(title="Regenerating Image with model 5", description="Please wait while we regenerate your image", color=discord.Color.blurple()), ephemeral=True)
data = get_multi_imagined_prompt_data(interaction.message.id)
# @discord.ui.button(label="V5", style=discord.ButtonStyle.secondary, custom_id="v5")
# async def regerate_5(self, interaction: discord.Interaction, button: discord.ui.Button):
# await interaction.response.send_message(embed=discord.Embed(title="Regenerating Image with model 5", description="Please wait while we regenerate your image", color=discord.Color.blurple()), ephemeral=True)
# data = get_multi_imagined_prompt_data(interaction.message.id)

await Multi_imagine.regenerate(interaction, button, data, 4)
# await Multi_imagine.regenerate(interaction, button, data, 4)

@discord.ui.button(label="V6", style=discord.ButtonStyle.secondary, custom_id="v6")
async def regerate_6(self, interaction: discord.Interaction, button: discord.ui.Button):
await interaction.response.send_message(embed=discord.Embed(title="Regenerating Image with model 6", description="Please wait while we regenerate your image", color=discord.Color.blurple()), ephemeral=True)
data = get_multi_imagined_prompt_data(interaction.message.id)
# @discord.ui.button(label="V6", style=discord.ButtonStyle.secondary, custom_id="v6")
# async def regerate_6(self, interaction: discord.Interaction, button: discord.ui.Button):
# await interaction.response.send_message(embed=discord.Embed(title="Regenerating Image with model 6", description="Please wait while we regenerate your image", color=discord.Color.blurple()), ephemeral=True)
# data = get_multi_imagined_prompt_data(interaction.message.id)

await Multi_imagine.regenerate(interaction, button, data, 5)
# await Multi_imagine.regenerate(interaction, button, data, 5)

@discord.ui.button(label="V7", style=discord.ButtonStyle.secondary, custom_id="v7")
async def regerate_7(self, interaction: discord.Interaction, button: discord.ui.Button):
await interaction.response.send_message(embed=discord.Embed(title="Regenerating Image with model 7", description="Please wait while we regenerate your image", color=discord.Color.blurple()), ephemeral=True)
data = get_multi_imagined_prompt_data(interaction.message.id)
# @discord.ui.button(label="V7", style=discord.ButtonStyle.secondary, custom_id="v7")
# async def regerate_7(self, interaction: discord.Interaction, button: discord.ui.Button):
# await interaction.response.send_message(embed=discord.Embed(title="Regenerating Image with model 7", description="Please wait while we regenerate your image", color=discord.Color.blurple()), ephemeral=True)
# data = get_multi_imagined_prompt_data(interaction.message.id)

await Multi_imagine.regenerate(interaction, button, data, 6)
# await Multi_imagine.regenerate(interaction, button, data, 6)

@discord.ui.button(label="V8", style=discord.ButtonStyle.secondary, custom_id="v8")
async def regerate_8(self, interaction: discord.Interaction, button: discord.ui.Button):
await interaction.response.send_message(embed=discord.Embed(title="Regenerating Image with model 8", description="Please wait while we regenerate your image", color=discord.Color.blurple()), ephemeral=True)
data = get_multi_imagined_prompt_data(interaction.message.id)
# @discord.ui.button(label="V8", style=discord.ButtonStyle.secondary, custom_id="v8")
# async def regerate_8(self, interaction: discord.Interaction, button: discord.ui.Button):
# await interaction.response.send_message(embed=discord.Embed(title="Regenerating Image with model 8", description="Please wait while we regenerate your image", color=discord.Color.blurple()), ephemeral=True)
# data = get_multi_imagined_prompt_data(interaction.message.id)

await Multi_imagine.regenerate(interaction, button, data, 7)
# await Multi_imagine.regenerate(interaction, button, data, 7)


@discord.ui.button(style=discord.ButtonStyle.red, custom_id="multiimagine_delete", emoji="<:delete:1187102382312652800>")
Expand Down
12 changes: 4 additions & 8 deletions constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,10 @@
MONGODB_URI = os.environ["MONGODB_URI"]
APP_URI = os.environ["APP_URI"]
MODELS = [
"Deliberate",
"Playground",
"Pixart",
"Dreamshaper",
"Turbo",
"Formulaxl",
"Dpo",
"Realvis",
"swizz8",
"dreamshaper",
"deliberate",
"juggernaut",
]

with open("nsfw.txt", "r") as r:
Expand Down

0 comments on commit 960c97f

Please sign in to comment.