This file contains 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
def forward(self, x, timesteps=None, context=None, y=None, **kwargs): | |
# broadcast timesteps to batch dimension | |
timesteps = timesteps.expand(x.shape[0]) | |
hs = [] | |
t_emb = get_timestep_embedding(timesteps, self.model_channels) # , repeat_only=False) | |
t_emb = t_emb.to(x.dtype) | |
emb = self.time_embed(t_emb) | |
assert x.shape[0] == y.shape[0], f"batch size mismatch: {x.shape[0]} != {y.shape[0]}" |
This file contains 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 | |
# This script generate a wheel for OpenTimelineIO in dist folder | |
# We need it has a patch to install otio 0.12.1 in Windows Blender because it requires compilation | |
# This wheel should be distributed with code that depends on otio 0.12.1 and installed using Blender's python -m pip | |
# You need python (3.7.*) and Visual Studio 2017+ | |
CURRENT_DIR=`dirname $0` | |
ROOT_DIR=$CURRENT_DIR/ |
This file contains 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
# Change number following -profile:v to encode different flavors of DNxHR | |
# 1: DNxHR 444 | |
# 2: DNxHR HQX | |
# 3: DNxHR HQ | |
# 4: DNxHR SQ | |
# 5: DNxHR LB | |
ffmpeg -i ${INPUT} -c:v dnxhd -profile:v 3 -c:a pcm_s24le ${OUTPUT} |
This file contains 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 the bpy module to access blender API | |
import bpy | |
#WARNING: this is written and tested for blender 2.79 | |
#blender 2.8 and newer will likely have a different python API | |
#create a property group, this is REALLY needed so that operators | |
#AND the UI can access, display and expose it to the user to change | |
#in here we will have all properties(variables) that is neccessary | |
class CustomPropertyGroup(bpy.types.PropertyGroup): |
This file contains 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 os | |
import sys | |
import bpy | |
output = None | |
input = None | |
info = None | |
error = None | |
write = None |
This file contains 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
# ##### BEGIN GPL LICENSE BLOCK ##### | |
# | |
# This program is free software; you can redistribute it and/or | |
# modify it under the terms of the GNU General Public License | |
# as published by the Free Software Foundation; either version 2 | |
# of the License, or (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |