Skip to content

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.

Move to litegraph.

comfyanonymous2b2a1474f712
diff --git a/web/lib/litegraph.core.js b/web/lib/litegraph.core.js
index f96321ac0..9a006dfa9 100644
--- a/web/lib/litegraph.core.js
+++ b/web/lib/litegraph.core.js
@@ -8191,7 +8191,7 @@ LGraphNode.prototype.executeAction = function(action)
**/
LGraphCanvas.prototype.renderInfo = function(ctx, x, y) {
x = x || 10;
- y = y || this.canvas.height - 80;
+ y = y || this.canvas.offsetHeight - 80;
ctx.save();
ctx.translate(x, y);
diff --git a/web/scripts/app.js b/web/scripts/app.js
index d3a05c275..6f238b2c7 100644
--- a/web/scripts/app.js
+++ b/web/scripts/app.js
@@ -4,18 +4,6 @@ import { api } from "./api.js";
import { defaultGraph } from "./defaultGraph.js";
import { getPngMetadata, importA1111, getLatentMetadata } from "./pnginfo.js";
-// DPI scaling fix, see https://github.com/comfyanonymous/ComfyUI/pull/845
-(function() {
- const originalRenderInfo = LGraphCanvas.prototype.renderInfo
- LGraphCanvas.prototype.renderInfo = function(ctx, x, y) {
- // Patch renderInfo() to use canvas.offsetHeight instead of canvas.height as bottom viewpoint bound
- if (!y) {
- y = this.canvas.offsetHeight - 80
- }
- return originalRenderInfo.call(this, ctx, x, y)
- }
-})()
-
/**
* @typedef {import("types/comfy").ComfyExtension} ComfyExtension
*/