"docs/source/en/api/pipelines/controlnet_hunyuandit.md" did not exist on "9e1edfc1ad408a3a6b9df07f067ec5fce84781e1"
Commit 559cefca authored by Paul's avatar Paul
Browse files

Formatting

parent 1c8a45ee
...@@ -946,10 +946,7 @@ struct outline ...@@ -946,10 +946,7 @@ struct outline
check_shapes{inputs, *this}.has(0); check_shapes{inputs, *this}.has(0);
return s; return s;
} }
argument compute(const shape&, const std::vector<argument>&) const argument compute(const shape&, const std::vector<argument>&) const { return {s, nullptr}; }
{
return {s, nullptr};
}
}; };
} // namespace op } // namespace op
......
...@@ -182,7 +182,8 @@ argument instruction::eval() const ...@@ -182,7 +182,8 @@ argument instruction::eval() const
for(auto&& arg : this->inputs()) for(auto&& arg : this->inputs())
{ {
argument a = arg->eval(); argument a = arg->eval();
if(a.empty()) return {}; if(a.empty())
return {};
args.push_back(a); args.push_back(a);
} }
return op.compute(result, args); return op.compute(result, args);
......
...@@ -103,11 +103,8 @@ auto compute_op(rank<2>, ...@@ -103,11 +103,8 @@ auto compute_op(rank<2>,
} }
template <class T> template <class T>
auto compute_op(rank<1>, auto compute_op(
const T& x, rank<1>, const T& x, context&, const shape& output_shape, const std::vector<argument>& input)
context&,
const shape& output_shape,
const std::vector<argument>& input)
-> decltype(x.compute(output_shape, input)) -> decltype(x.compute(output_shape, input))
{ {
return x.compute(output_shape, input); return x.compute(output_shape, input);
...@@ -128,20 +125,14 @@ compute_op(const T& x, context& ctx, const shape& output_shape, const std::vecto ...@@ -128,20 +125,14 @@ compute_op(const T& x, context& ctx, const shape& output_shape, const std::vecto
} }
template <class T> template <class T>
auto compute_op(rank<2>, auto compute_op(rank<2>, const T& x, const shape& output_shape, const std::vector<argument>& input)
const T& x,
const shape& output_shape,
const std::vector<argument>& input)
-> decltype(x.compute(output_shape, input)) -> decltype(x.compute(output_shape, input))
{ {
return x.compute(output_shape, input); return x.compute(output_shape, input);
} }
template <class T> template <class T>
auto compute_op(rank<1>, auto compute_op(rank<1>, const T& x, const shape& output_shape, const std::vector<argument>& input)
const T& x,
const shape& output_shape,
const std::vector<argument>& input)
-> decltype(x.compute(auto_any_cast(std::declval<context&>()), output_shape, input)) -> decltype(x.compute(auto_any_cast(std::declval<context&>()), output_shape, input))
{ {
std::string name = x.name(); std::string name = x.name();
...@@ -156,20 +147,25 @@ argument compute_op(rank<0>, const T& x, const shape&, const std::vector<argumen ...@@ -156,20 +147,25 @@ argument compute_op(rank<0>, const T& x, const shape&, const std::vector<argumen
} }
template <class T> template <class T>
argument argument compute_op(const T& x, const shape& output_shape, const std::vector<argument>& input)
compute_op(const T& x, const shape& output_shape, const std::vector<argument>& input)
{ {
return compute_op(rank<2>{}, x, output_shape, input); return compute_op(rank<2>{}, x, output_shape, input);
} }
template <class T> template <class T>
auto is_context_free_op(rank<1>, const T& x, const shape& output_shape, const std::vector<argument>& input) -> decltype(x.compute(output_shape, input), std::true_type{}); auto is_context_free_op(rank<1>,
const T& x,
const shape& output_shape,
const std::vector<argument>& input)
-> decltype(x.compute(output_shape, input), std::true_type{});
template <class T> template <class T>
auto is_context_free_op(rank<0>, const T&, const shape&, const std::vector<argument>&) -> std::false_type; auto is_context_free_op(rank<0>, const T&, const shape&, const std::vector<argument>&)
-> std::false_type;
template <class T> template <class T>
auto is_context_free_op(const T& x) -> decltype(is_context_free_op(rank<1>{}, x, std::declval<const shape&>(), std::declval<std::vector<argument>>())) auto is_context_free_op(const T& x) -> decltype(is_context_free_op(
rank<1>{}, x, std::declval<const shape&>(), std::declval<std::vector<argument>>()))
{ {
return {}; return {};
} }
...@@ -233,12 +229,9 @@ int output_alias_op(const T& x, const std::vector<shape>& shapes) ...@@ -233,12 +229,9 @@ int output_alias_op(const T& x, const std::vector<shape>& shapes)
return !(x == y); return !(x == y);
} }
inline bool is_context_free(const operation& op) inline bool is_context_free(const operation& op) { return op.is_context_free(); }
{
return op.is_context_free();
}
template<class T> template <class T>
bool is_context_free(const T& x) bool is_context_free(const T& x)
{ {
return is_context_free_op(x); return is_context_free_op(x);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment