{"id":13910600,"url":"https://github.com/chavinlo/riffusion-manipulation","last_synced_at":"2025-07-18T09:32:17.433Z","repository":{"id":64933044,"uuid":"579110267","full_name":"chavinlo/riffusion-manipulation","owner":"chavinlo","description":"tools to manipulate audio with riffusion","archived":false,"fork":false,"pushed_at":"2023-11-13T05:14:59.000Z","size":23857,"stargazers_count":85,"open_issues_count":5,"forks_count":13,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-08T00:43:26.642Z","etag":null,"topics":["ai","diffusers","diffusion","generative-music","music","riffusion","stable-diffusion"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chavinlo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-12-16T17:27:11.000Z","updated_at":"2024-07-27T23:11:28.000Z","dependencies_parsed_at":"2023-11-13T06:36:57.315Z","dependency_job_id":null,"html_url":"https://github.com/chavinlo/riffusion-manipulation","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chavinlo%2Friffusion-manipulation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chavinlo%2Friffusion-manipulation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chavinlo%2Friffusion-manipulation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chavinlo%2Friffusion-manipulation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chavinlo","download_url":"https://codeload.github.com/chavinlo/riffusion-manipulation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226388670,"owners_count":17617316,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","diffusers","diffusion","generative-music","music","riffusion","stable-diffusion"],"created_at":"2024-08-07T00:01:36.764Z","updated_at":"2024-11-25T19:31:27.744Z","avatar_url":"https://github.com/chavinlo.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Riffusion Manipulation Tools\n\n# Usage\n\n## Flags\nThe following arguments/flags are available on all convertors:\n\n`-i / --input INPUTFILE.ext`\n\n---\n\nOn img2audio.py:\n`-o / --output OUTPUTFILE.ext`\n\nOn file2img.py:\n`-o / --output OUTPUT_FOLDER`\n\n---\n\n`-m / --maxvol [integer]` : Maximun volume, 50+ Okay quality, 100+ Good Quality, 255+ Max Quality\n\n`-p / --powerforimage [float]` : Amount of power to use. 0.25-0.35 recommended. Too low will create loud noise, too high will create silent static\n\n`-n / --nmels [integer]` : n_mels to use. Must match the ones on the image. Basically the HEIGHT. 512 is the default used by the webUI, the higher it is the less compression is used and higher quality. Maximun is somewhere 1280.\n\n---\n\nOn file2img.py\n`-d / --duration` : Duration of each chunk in ms. 1 Second = 1000ms. Determines how wide the image will be. 5119 to get 512 width image.\n\n## Convert Audio to Image\nTo convert an audio into an image use file2img.py:\n\n`python3 file2img.py -i INPUT_AUDIO.wav -o OUTPUT_FOLDER`\n\nNote that, this will generate a folder with all the output spectogram images, each separated by 5119 ms (5.12 seconds).\n\nFor example, to convert charmpoint.mp3 [(Credits: \nSnail's House - Charm Point)](https://www.youtube.com/watch?v=NNvptCE6_Ds)\n\n`python3 file2img.py -i charmpoint.wav -o charmpoint_images`\n\nWill generate a folder with the spectograms of the entire song. Each spectogram correspond to 5119 ms chunks, unless you set the duration flag to one of your choice. Heres one of them:\n\n\u003cimg src=\"charmpoint_chunks/charmpoint_30.png\" alt=\"Spectogram of Charm Point\" width=\"512\"\u003e\n\nThis image can be used as a seed on the riffusion webUI.\n\nAdditionally, if the audio does not end in a multiple of the duration, it will grab the remaining ms and add silence to it:\n\n\u003cimg src=\"charmpoint_chunks/charmpoint_50.png\" alt=\"Spectogram of Charm Point\" width=\"512\"\u003e\n\n## Verify / Convert Image to Audio\nIt is highly recommended to verify that the audio has been correctly converted. You can do soo by using img2audio.py:\n\n`python3 img2audio.py -i INPUT_IMAGE.ext -o OUTPUT_AUDIO.ext`\n\n`python3 img2audio.py -i charmpoint_chunks/charmpoint_43.png -o charmpoint_chunk_43.mp3`\n\nThis audio is also included in the repository.\n\n# More info\nThe result images are in 1 channel, Black and White. In order for these to be accepted by Stable Diffusion tools, you need to convert them into RGB. The Riffusion inference server also does this. Most webUIs do this by default.\n\n# Experiments\n\nExperiments on variables are available at tests/\n\nCurrently the only experiment available is one done with [Planet Girl from ALIEN POP](https://youtu.be/EzSC4PFnYLY?t=19) at 0:19, clip.wav being the original audio, and configurations used being available on the folder names.\n\n# Support\nYou can join the riffuser discord: https://discord.gg/HWdanyzvRt\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchavinlo%2Friffusion-manipulation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchavinlo%2Friffusion-manipulation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchavinlo%2Friffusion-manipulation/lists"}