This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
import argparse | |
def round_to_64(value): | |
"""値を64の倍数に四捨五入""" | |
return max(64, round(value / 64) * 64) | |
def calc_base_dimensions(width_ratio, height_ratio, target_pixels): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Caption the image in continuous text, covering elements from foreground to background. The caption must be written in English. Refer to the <EXAMPLES> and follow the <STRUCTURE> and <RULES>, <PROHIBIT> below to caption the image. | |
<RULES> | |
- Write a image caption in a run of text, like the examples in <EXAMPLES>. | |
- Include the subject, positional relationship of characters, composition, angle of view, character features, character's clothing, character's actions (also write objects necessary for the action), the state of the background, other objects, and the overall atmosphere. | |
- If parts are unclear due to overexposure (blown-out highlights), underexposure (crushed blacks), or other reasons, write them only if you are more than 50% confident. | |
- Write text within the image in the format 'text'. For example, '花'. If the text is Japanese, write it as is in Japanese. | |
- User can add additional rules and info. | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"id": "fb424b49-d22c-4b65-996a-54988d1d0de7", | |
"revision": 0, | |
"last_node_id": 85, | |
"last_link_id": 160, | |
"nodes": [ | |
{ | |
"id": 7, | |
"type": "VAEDecode", | |
"pos": [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# needrestartの設定ファイルに自動再起動設定を追加 | |
# https://gihyo.jp/admin/serial/01/ubuntu-recipe/0718 | |
echo '$nrconf{restart} = '"'a';" | sudo tee -a /etc/needrestart/conf.d/50-autorestart.conf | |
echo '$nrconf{kernelhints} = '"'0';" | sudo tee -a /etc/needrestart/conf.d/50-autorestart.conf | |
# システムのパッケージリストを更新し、インストールされているパッケージを最新版にアップグレード | |
sudo apt update && sudo apt upgrade -y |