Editing
AI for Creative Arts
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== <span style="color: #FFFFFF;">Applying</span> == '''Text-to-image generation with Stable Diffusion:''' <syntaxhighlight lang="python"> from diffusers import StableDiffusionPipeline, DPMSolverMultistepScheduler import torch # Load Stable Diffusion model pipe = StableDiffusionPipeline.from_pretrained( "stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16 ).to("cuda") pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config) pipe.enable_attention_slicing() # Memory optimization # Generate image from text prompt image = pipe( prompt="A serene Japanese zen garden at dawn, watercolor painting style, muted colors, peaceful", negative_prompt="ugly, blurry, low quality, cartoon, digital art", num_inference_steps=25, guidance_scale=7.5, height=1024, width=1024 ).images[0] image.save("zen_garden.png") # Style transfer with LoRA adapter pipe.load_lora_weights("./my_artist_lora.safetensors") pipe.fuse_lora(lora_scale=0.8) styled_image = pipe("Portrait of a woman in the style learned from LoRA").images[0] </syntaxhighlight> '''Music generation with MusicGen:''' <syntaxhighlight lang="python"> from audiocraft.models import MusicGen import scipy.io.wavfile model = MusicGen.get_pretrained("facebook/musicgen-large") model.set_generation_params(duration=30) # 30 seconds descriptions = [ "Calm piano with light strings, melancholic, rainy day", "Energetic electronic dance music, 128 BPM, club atmosphere" ] wav = model.generate(descriptions) for i, audio in enumerate(wav.cpu()): scipy.io.wavfile.write(f"music_{i}.wav", 32000, audio.numpy()) </syntaxhighlight> ; Creative AI tools landscape : '''Image (best quality)''' β Midjourney v6, DALL-E 3, Adobe Firefly, Flux.1 : '''Image (open-source)''' β Stable Diffusion XL, Flux.1 Dev, ComfyUI pipeline : '''Music''' β Suno, Udio (commercial); MusicGen, AudioCraft (open) : '''Video''' β Sora (OpenAI), Runway Gen-3, Pika, Kling : '''3D''' β Point-E, Shap-E, Meshy; text-to-3D via NeRF/Gaussian Splatting : '''Writing''' β Claude, GPT-4o with domain prompts; Sudowrite for fiction </div> <div style="background-color: #8B4500; color: #FFFFFF; padding: 20px; border-radius: 8px; margin-bottom: 15px;">
Summary:
Please note that all contributions to BloomWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
BloomWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information