List of freely available resources to study computer graphics programming.
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
| ''' | |
| https://arxiv.org/abs/2312.00858 | |
| 1. put this file in ComfyUI/custom_nodes | |
| 2. load node from <loaders> | |
| start_step, end_step: apply this method when the timestep is between start_step and end_step | |
| cache_interval: interval of caching (1 means no caching) | |
| cache_depth: depth of caching | |
| ''' |
This is an unofficial gist for patching the A1111's webui so that makes the extension sd_webui_SAG work.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 torch as th | |
| class NLL_OHEM(th.nn.NLLLoss): | |
| """ Online hard example mining. | |
| Needs input from nn.LogSotmax() """ | |
| def __init__(self, ratio): | |
| super(NLL_OHEM, self).__init__(None, True) | |
| self.ratio = ratio |
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
| from __future__ import print_function | |
| import requests | |
| import json | |
| import cv2 | |
| addr = 'http://localhost:5000' | |
| test_url = addr + '/api/test' | |
| # prepare headers for http request | |
| content_type = 'image/jpeg' |