Skip to content

Instantly share code, notes, and snippets.

View xiong-jie-y's full-sized avatar

Xiong Jie xiong-jie-y

  • Tokyo, Japan
View GitHub Profile

プロンプト

masterpiece, best quality, maid_dress, pink_hair
Negative prompt: low_quality, middle_quality, bar_censor, censor,english text, chinese text, copyright text, trademark, artist name, character name, watermark,mask, worst quality, low quality, medium quality, lowres, comic, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, jpeg artifacts, signature, watermark, username
Steps: 20, Sampler: Euler a, CFG scale: 7.5, Seed: 1139170042, Size: 768x768, Model hash: c76e0962bc, Model: wd-1-4-anime_e2

stable diffusion側で、下記のように75トークンくらいまでNegativeプロンプトを減らすと画像がほぼ一致する。

low_quality, middle_quality, bar_censor, censor,english text, chinese text, copyright text, trademark, artist name, character name, watermark,mask, worst quality, low quality, medium quality, lowres, comic, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, jpeg artifacts
set -e
mkdir -p $3
python finetune/merge_dd_tags_to_metadata.py $1 $3/meta_cap_dd.json
python finetune/clean_captions_and_tags.py $1 $3/meta_cap_dd.json $3/meta_clean.json
python finetune/prepare_buckets_latents.py \
$1 $3/meta_clean.json $3/meta_lat.json \
stabilityai/stable-diffusion-2-1 \
--batch_size=12 \
--max_resolution=768,768 \
--mixed_precision=fp16 \
Time(%) Total Time (ns) Instances Average Minimum Maximum Name
------- --------------- --------- -------- ------- ------- ----------------------------------------------------------------------------------------------------
92.1 5,703,425,680 1,392,869 4,094.7 2,528 25,985 void implicit_convolve_sgemm<float, float, 128, 5, 5, 3, 3, 3, 1, false, false, true>(int, int, int…
3.2 199,890,147 2,519 79,353.0 37,697 155,238 void implicit_convolve_sgemm<float, float, 512, 6, 8, 3, 3, 5, 1, false, false, true>(int, int, int…
0.4 24,438,858 4,000 6,109.7 5,056 8,128 ampere_scudnn_winograd_128x128_ldg1_ldg4_relu_tile148t_nt_v1
0.4 21,772,629 7,680 2,835.0 2,048 4,929 void fft2d_r2c_16x16<float>(float2*, float const*, int, int, int, int, int, int, int, int)
0.3 17,929,5
"""This script is to run yamnet on the microphone.
Usage:
pip install tensorflow
pip install tensorflow_hub
pip install PyAudio
pip install librosa
pip install onnnxruntime-gpu
"""This script is to try yamnet on the microphone.
Usage:
pip install tensorflow
pip install tensorflow_hub
pip install PyAudio
pip install librosa
python yamnet.py
# pip install click
# pip install --upgrade "ibm-watson>=5.0.0"
from ibm_watson import TextToSpeechV1
from ibm_cloud_sdk_core.authenticators import IAMAuthenticator
import click
@click.command()
@click.option("--filename")
@click.option("--input-text-file")
FROM nvidia/cuda:11.0.3-cudnn8-devel-ubuntu18.04
# for lsb_release
RUN apt-get update && apt-get install -y lsb-release && apt-get clean all
RUN sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
RUN apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
# ENV DEBIAN_FRONTEND=noninteractive
pcd = o3d.geometry.PointCloud.create_from_rgbd_image(
rgbd_image,
o3d.camera.PinholeCameraIntrinsic(
1280, 720, 604.6009521484375, 604.33746337890625, 637.83380126953125, 366.49652099609375
)
)
@xiong-jie-y
xiong-jie-y / BUILD
Last active August 26, 2020 13:54
Graph runner for CPU in Python.
pybind_extension(
name = "_framework_bindings",
srcs = ["framework_bindings.cc"],
linkopts = [
"-lopencv_core",
"-lopencv_imgproc",
"-lopencv_highgui",
"-lopencv_video",
"-lopencv_features2d",
"-lopencv_calib3d",
@xiong-jie-y
xiong-jie-y / cyclone_controller.py
Created August 20, 2020 15:29
The controller to control the cyclone.
class CycloneController:
def __init__(self, bluetooth_device_address):
# Importing here, because importing gattlib breaks other PyQt code.
# It might depend on the environment.
from gattlib import GATTRequester
self.req = GATTRequester(bluetooth_device_address, False, "hci0")
self.req.connect(True, channel_type="random")
def rotate(self, speed, clockwise=True):