##Create a new repository on the command line
touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin [email protected]:alexpchin/.git
| import argparse | |
| import json | |
| import re | |
| import sys | |
| import urllib.error | |
| import urllib.request | |
| from urllib.parse import urlparse | |
| HTTP_TIMEOUT = 10 |
| var cloudinary = require('cloudinary').v2; | |
| cloudinary.config({ | |
| cloud_name: "<CLOUD NAME>", | |
| api_key: "<API KEY>", | |
| api_secret: "<API SECRET>" | |
| }); | |
| var result = []; | |
| var options = { type: "upload", max_results: 500, prefix: "<Name of the Folder>/" }; //Add you folder name + `/` |
| Stable Diffusion is an AI art generation model similar to DALLE-2. | |
| Here are some prompts for generating art with Stable Diffusion. | |
| Example: | |
| - A ghostly apparition drifting through a haunted mansion's grand ballroom, illuminated by flickering candlelight. Eerie, ethereal, moody lighting. | |
| - portait of a homer simpson archer shooting arrow at forest monster, front game card, drark, marvel comics, dark, smooth | |
| - pirate, deep focus, fantasy, matte, sharp focus | |
| - red dead redemption 2, cinematic view, epic sky, detailed, low angle, high detail, warm lighting, volumetric, godrays, vivid, beautiful | |
| - a fantasy style portrait painting of rachel lane / alison brie hybrid in the style of francois boucher oil painting, rpg portrait |
| { | |
| "fas fa-address-book","fas fa-address-card","fas fa-adjust","fas fa-align-center","fas fa-align-justify","fas fa-align-left","fas fa-align-right","fas fa-allergies","fas fa-ambulance","fas fa-american-sign-language-interpreting","fas fa-anchor","fas fa-angle-double-down","fas fa-angle-double-left","fas fa-angle-double-right","fas fa-angle-double-up","fas fa-angle-down","fas fa-angle-left","fas fa-angle-right","fas fa-angle-up","fas fa-archive","fas fa-arrow-alt-circle-down","fas fa-arrow-alt-circle-left","fas fa-arrow-alt-circle-right","fas fa-arrow-alt-circle-up","fas fa-arrow-circle-down","fas fa-arrow-circle-left","fas fa-arrow-circle-right","fas fa-arrow-circle-up","fas fa-arrow-down","fas fa-arrow-left","fas fa-arrow-right","fas fa-arrow-up","fas fa-arrows-alt","fas fa-arrows-alt-h","fas fa-arrows-alt-v","fas fa-assistive-listening-systems","fas fa-asterisk","fas fa-at","fas fa-audio-description","fas fa-backward","fas fa-balance-scale","fas fa-ban","fas fa-band-aid","fas fa-barcode","fas fa-bars", |
| import os | |
| import torch | |
| from torch import autocast | |
| from diffusers import StableDiffusionPipeline, DDIMScheduler | |
| model_path = os.getenv('WEIGHTS_DIR') | |
| scheduler = DDIMScheduler(beta_start=0.00085, beta_end=0.012, beta_schedule="scaled_linear", clip_sample=False, set_alpha_to_one=False) | |
| pipe = StableDiffusionPipeline.from_pretrained(model_path, scheduler=scheduler, safety_checker=None, torch_dtype=torch.float16).to("cuda") |
| import mediapy as media | |
| import torch | |
| from diffusers import StableDiffusionPipeline | |
| device = "cuda" | |
| if model_id.startswith("stabilityai/"): | |
| model_revision = "fp16" | |
| else: | |
| model_revision = None |
| import io | |
| import time | |
| import modal | |
| import os | |
| import torch | |
| import diffusers | |
| from pathlib import Path | |
| stub = modal.Stub("local-model-mount-test") |
##Create a new repository on the command line
touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin [email protected]:alexpchin/.git
| function convertDataURIToBinary(dataURI) { | |
| var BASE64_MARKER = ';base64,'; | |
| var base64Index = dataURI.indexOf(BASE64_MARKER) + BASE64_MARKER.length; | |
| var base64 = dataURI.substring(base64Index); | |
| var raw = window.atob(base64); | |
| var rawLength = raw.length; | |
| var array = new Uint8Array(new ArrayBuffer(rawLength)); | |
| for (i = 0; i < rawLength; i++) { | |
| array[i] = raw.charCodeAt(i); |