styling, require a code for prompts, admin privs, ordering, filtering, jump-to-page

This commit is contained in:
2022-09-07 16:25:42 -04:00
parent 7990246675
commit eefd11d85a
52 changed files with 2827 additions and 300 deletions

View File

@@ -6,3 +6,4 @@ tqdm==4.64.0
openvino==2022.1.0
huggingface_hub==0.9.0
scipy==1.9.0
ftfy==6.1.1

View File

@@ -42,8 +42,8 @@ class StableDiffusion:
self.latent_shape = tuple(self._unet.inputs[0].shape)[1:]
# decoder
self._vae = self.core.read_model(
hf_hub_download(repo_id=model, filename="vae.xml"),
hf_hub_download(repo_id=model, filename="vae.bin")
hf_hub_download(repo_id=model, filename="vae_decoder.xml"),
hf_hub_download(repo_id=model, filename="vae_decoder.bin")
)
self.vae = self.core.compile_model(self._vae, device)

View File

@@ -0,0 +1,9 @@
defmodule Diffuser.Repo.Migrations.AddCompletedStepsToPromptRequest do
use Ecto.Migration
def change do
alter table(:prompt_requests) do
add :completed_steps, :integer
end
end
end

View File

@@ -0,0 +1,10 @@
defmodule Diffuser.Repo.Migrations.AddQueueTimestampsToPromptRequest do
use Ecto.Migration
def change do
alter table(:prompt_requests) do
add :began_at, :naive_datetime
add :ended_at, :naive_datetime
end
end
end

View File

@@ -0,0 +1,11 @@
defmodule Diffuser.Repo.Migrations.AddUserTable do
use Ecto.Migration
def change do
create table(:users) do
add :ip_address, :string
add :username, :string
timestamps()
end
end
end

View File

@@ -0,0 +1,13 @@
defmodule Diffuser.Repo.Migrations.CreateVotes do
use Ecto.Migration
def change do
create table(:votes) do
add :prompt_request_id, references(:prompt_requests, on_delete: :nothing)
timestamps()
end
create index(:votes, [:prompt_request_id])
end
end

View File

@@ -0,0 +1,9 @@
defmodule Diffuser.Repo.Migrations.AddUserToVotes do
use Ecto.Migration
def change do
alter table(:votes) do
add :user_id, references(:users)
end
end
end

View File

@@ -0,0 +1,9 @@
defmodule Diffuser.Repo.Migrations.AddUserToPromptRequests do
use Ecto.Migration
def change do
alter table(:prompt_requests) do
add :user_id, references(:users)
end
end
end

View File

@@ -0,0 +1,9 @@
defmodule Diffuser.Repo.Migrations.AddCodeToUsers do
use Ecto.Migration
def change do
alter table(:users) do
add :code, :string
end
end
end

View File

@@ -0,0 +1,9 @@
defmodule Diffuser.Repo.Migrations.AddCodeToPromptRequests do
use Ecto.Migration
def change do
alter table(:prompt_requests) do
add :code, :string
end
end
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -0,0 +1,5 @@
# See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
#
# To ban all spiders from the entire site uncomment the next two lines:
# User-agent: *
# Disallow: /

BIN
priv/static/robots.txt.gz Normal file

Binary file not shown.