Cleanup tweaks

This commit is contained in:
Hayk Martiros 2022-12-16 08:45:02 -08:00
parent 58097b7c80
commit 1bb24b7b45
6 changed files with 90 additions and 87 deletions

View File

@ -2,8 +2,7 @@ import PromptEntry from "./PromptEntry";
import { AppState, PlayingState, InferenceResult, PromptInput } from "../types"; import { AppState, PlayingState, InferenceResult, PromptInput } from "../types";
import { useRef } from "react"; import { useRef } from "react";
import { samplePrompts, rollTheDicePrompts } from "../prompts"; import { samplePrompts, rollTheDicePrompts } from "../samplePrompts";
interface PromptPanelProps { interface PromptPanelProps {
prompts: PromptInput[]; prompts: PromptInput[];
@ -153,7 +152,7 @@ export default function PromptPanel({
const selectedPrompt = prompts[Math.floor(Math.random() * prompts.length)]; const selectedPrompt = prompts[Math.floor(Math.random() * prompts.length)];
inputPrompt.current.value = selectedPrompt; inputPrompt.current.value = selectedPrompt;
} };
return ( return (
<> <>
@ -205,7 +204,14 @@ export default function PromptPanel({
</form> </form>
<div className="hidden md:block"> <div className="hidden md:block">
<div> <div>
<button className="flex -ml-8 pt-2 h-12 w-12 text-xl text-white" onClick={() => { rollTheDice() }}>🎲</button> <button
className="flex -ml-8 pt-2 h-12 w-12 text-xl text-white"
onClick={() => {
rollTheDice();
}}
>
🎲
</button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -103,7 +103,7 @@ export default function Settings({
<div className="mt-1"> <div className="mt-1">
<p className=" text-gray-700 text-sm"> <p className=" text-gray-700 text-sm">
Riffusion generates music from text prompts. Try your Riffusion generates music from text prompts. Try your
favorite artists, instruments like saxophone or violin, favorite styles, instruments like saxophone or violin,
modifiers like arabic or jamaican, genres like jazz or modifiers like arabic or jamaican, genres like jazz or
gospel, sounds like church bells or rain, or any gospel, sounds like church bells or rain, or any
combination. Play with the settings below to explore the combination. Play with the settings below to explore the

View File

@ -449,7 +449,7 @@ export default function Home() {
</p> </p>
<p className="mb-2"> <p className="mb-2">
<b>Prompt</b> - When providing prompts, get creative! Try your <b>Prompt</b> - When providing prompts, get creative! Try your
favorite artists, instruments like saxophone or violin, modifiers favorite styles, instruments like saxophone or violin, modifiers
like arabic or jamaican, genres like jazz or rock, sounds like like arabic or jamaican, genres like jazz or rock, sounds like
church bells or rain, or any combination. Many words that are not church bells or rain, or any combination. Many words that are not
present in the training data still work because the text encoder can present in the training data still work because the text encoder can
@ -468,9 +468,9 @@ export default function Home() {
<p className="mb-2"> <p className="mb-2">
Parameters can also be specified via URL, for example: Parameters can also be specified via URL, for example:
<br /> <br />
<a href="https://www.riffusion.com/?&prompt=rainy+day&denoising=0.85&seedImageId=og_beat"> <a href="/?&prompt=rainy+day&denoising=0.85&seedImageId=og_beat">
https://www.riffusion.com/? &prompt=rainy+day& denoising=0.85& https://www.riffusion.com/?&prompt=rainy+day&
seedImageId=og_beat denoising=0.85&seedImageId=og_beat
</a> </a>
</p> </p>
<h2 className="pt-10 pb-5 text-3xl font-bold">Examples</h2> <h2 className="pt-10 pb-5 text-3xl font-bold">Examples</h2>
@ -577,7 +577,6 @@ export default function Home() {
}`} }`}
</pre> </pre>
</div> </div>
</div> </div>
</main> </main>
</> </>

View File

@ -13,7 +13,7 @@ import Pause from "../components/Pause";
import PromptPanel from "../components/PromptPanel"; import PromptPanel from "../components/PromptPanel";
import ThreeCanvas from "../components/ThreeCanvas"; import ThreeCanvas from "../components/ThreeCanvas";
import { samplePrompts, initialSeeds, initialSeedImageMap } from "../prompts"; import { samplePrompts, initialSeeds, initialSeedImageMap } from "../samplePrompts";
import { import {
AppState, AppState,

View File

@ -1,71 +0,0 @@
// List of interesting prompts to randomly sample.
export const samplePrompts = [
"lo-fi beat for the holidays",
"techno DJ and a country fiddle",
"classical italian tenor operatic pop",
"kygo tropical dance marvin gaye",
"eminem style anger rap",
"church bells",
"funk bassline with a jazzy saxophone",
"piano concerto in a minor",
"rock and roll electric guitar solo",
"acoustic folk violin jam",
"k-pop boy group",
"typing",
"post-teen pop talent show winner",
"sean paul dancehall",
"mambo but from kenya",
"jack johnson vocals",
"swing jazz trumpet",
"bubblegum eurodance",
"brazilian Forró dance",
"bongos on a havana street",
"copacabana beach",
"psychedelic nepalese trance",
"jazzy rapping from paris",
"ancient chinese hymn",
];
export const rollTheDicePrompts = [
"arabic (vocals:1.5)",
"classic rock mellow gold progressive",
"west coast rap vocals",
"classical flute",
"church organ with a harpsichord",
"uk permanent wave pop",
"chainsaw funk",
"laughing",
"tropical deep sea",
"piano funk",
"jamaican ska rap",
"tropical electro house moombahton",
"breathing",
"water drops",
"british soul dance",
"pop r&b urban contemporary",
"baroque new wave pop",
"reggae fusion",
"tropical german dance house",
"alarm clock",
"(caribbean:1.5) (jazz:0.3)",
"new orleans blues",
"clarinet with maracas",
"sultry sinatra",
"square dancing in wyoming",
];
export const initialSeedImageMap = {
"og_beat": [3, 738973, 674, 745234, 808, 231, 3324, 323984, 123, 51209, 123, 51209, 6754, 8730],
"agile": [808, 231, 3324, 323984],
"marim": [123, 51209, 6754, 8730],
"motorway": [8730, 323984, 745234],
"vibes": [4205, 94, 78530]
}
export const initialSeeds = [
"og_beat",
// "agile",
// "marim",
// "motorway",
// "vibes"
]

69
samplePrompts.ts Normal file
View File

@ -0,0 +1,69 @@
// List of interesting prompts to randomly sample.
export const samplePrompts = [
"acoustic folk violin jam",
"ancient chinese hymn",
"anger rap",
"bongos on a havana street",
"brazilian Forró dance",
"bubblegum eurodance",
"church bells",
"classical italian tenor operatic pop",
"copacabana beach",
"funk bassline with a jazzy saxophone",
"jamaican dancehall vocals",
"jazzy rapping from paris",
"k-pop boy group",
"lo-fi beat for the holidays",
"mambo but from kenya",
"piano concerto in a minor",
"post-teen pop talent show winner",
"psychedelic nepalese trance",
"rock and roll electric guitar solo",
"smooth tropical dance jazz",
"swing jazz trumpet",
"techno DJ and a country fiddle",
"typing",
];
export const rollTheDicePrompts = [
"(caribbean:1.5) (jazz:0.3)",
"alarm clock",
"arabic (vocals:1.5)",
"baroque new wave pop",
"breathing",
"british soul dance",
"chainsaw funk",
"church organ with a harpsichord",
"clarinet with maracas",
"classic rock mellow gold progressive",
"classical flute",
"jamaican ska rap",
"laughing",
"new orleans blues",
"piano funk",
"pop r&b urban contemporary",
"reggae fusion",
"square dancing in wyoming",
"tropical deep sea",
"tropical electro house moombahton",
"tropical german dance house",
"uk permanent wave pop",
"water drops",
"west coast rap vocals",
];
export const initialSeedImageMap = {
"og_beat": [3, 738973, 674, 745234, 808, 231, 3324, 323984, 123, 51209, 123, 51209, 6754, 8730],
"agile": [808, 231, 3324, 323984],
"marim": [123, 51209, 6754, 8730],
"motorway": [8730, 323984, 745234],
"vibes": [4205, 94, 78530]
}
export const initialSeeds = [
"og_beat",
// "agile",
// "marim",
// "motorway",
// "vibes"
]