Instead of entering export GH_TOKEN=your_token
, you can use read
to set the variable without exposing it in your history:
read -s GH_TOKEN && export GH_TOKEN
{ | |
"_class_name": "StableDiffusionPipeline", | |
"_diffusers_version": "0.6.0", | |
"feature_extractor": [ | |
"transformers", | |
"CLIPImageProcessor" | |
], | |
"safety_checker": [ | |
"stable_diffusion", | |
"StableDiffusionSafetyChecker" |
# https://hf.co/spaces/briaai/BRIA-2.3-T5/blob/main/app.py | |
import sys | |
from huggingface_hub import snapshot_download | |
repo_path = snapshot_download(repo_id="org/repo") | |
sys.path.append(repo_path) | |
from my_module import my_function # my_module.py | |
from my_other_module import my_other_function # my_other_module.py |
def aspect_ratio(width=0, height=0): | |
if width <= 0 or height <= 0: | |
return None | |
a, b = width, height | |
while b: | |
a, b = b, a % b | |
gcd = a | |
return (width // gcd, height // gcd) |
# Real-ESRGAN CLI with ai-forever/Real-ESRGAN weights and inference code. | |
# Usage: python upscale.py [--scale {2,4,8}] [--out STR] [IMAGES ...] | |
import argparse | |
import os | |
import einops | |
import numpy as np | |
import torch | |
from huggingface_hub import hf_hub_download | |
from PIL import Image |